Files
mgmt/examples/lang/class-include.mcl
2019-02-04 05:03:37 -05:00

23 lines
370 B
Plaintext

import "fmt"
class foo {
print "foo1" {
msg => "inside foo",
Meta:autogroup => false,
}
}
class bar($a, $b) { # a parameterized class
print "bar-"+ $a {
msg => fmt.printf("inside bar: %s", $b),
Meta:autogroup => false,
}
}
include foo
include foo # duplicate
include bar("b1", "hello")
include bar("b2", "world")
include bar("b2", "world") # duplicate