Files
mgmt/lang/interpret_test/TestAstFunc2/slow-unification2/classes.mcl
James Shubin a0e756317c lang: Add tests for slow unification
These used to be cases where our algorithm was unusably slow.

Thanks to foxxx0 for the report!
2019-07-21 03:15:06 -04:00

14 lines
315 B
Plaintext

import "datetime"
import "math"
class foo($bar) {
$now = datetime.now()
print "/tmp/some-module-${bar}" {
msg => if datetime.weekday($now) == "friday" { "TGIF YAY!" } else { "meh..." },
}
$x = math.mod($now, 2)
print "/tmp/some-module-${bar}-flipflop" {
msg => if $x == 0 { "FLIP" } else { "FLOP" },
}
}