lang_2023/tests/default_constructors.lang
2023-06-03 19:01:03 +03:00

18 lines
475 B
Text

namespace \employee {
decl gen-employee : \unit -> \employee
def gen-employee = {
var x = $@complex & 11.3 & 15.87 // construct on heap
return
$employee // construct on stack
& name = "John"
& role =
($manager
& "John"
& productivity =
($productivity.high
& duration = 10.3
& sleep-on-work = ($productivity.sleep-on-work.no))
& salary = 123)
}
}