25 lines
422 B
Plaintext
25 lines
422 B
Plaintext
import "fmt"
|
|
class foo {
|
|
print "foo1" {
|
|
msg => "inside foo",
|
|
|
|
Meta:autogroup => false,
|
|
}
|
|
}
|
|
|
|
$wow = "this is wow" # gets captured
|
|
|
|
class bar($a, $b) { # a parameterized class
|
|
print "bar-"+ $a {
|
|
msg => fmt.printf("inside bar: %s", $b + "; " + $wow),
|
|
|
|
Meta:autogroup => false,
|
|
}
|
|
}
|
|
|
|
include foo
|
|
include foo # duplicate
|
|
include bar("b1", "hello")
|
|
include bar("b2", "world")
|
|
include bar("b2", "world") # duplicate
|