blob: 585be83a96010af3d1918c949abaf21660463cff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
struct Foo {
public string[] sa;
public Foo (params string[] strv) {
assert (strv.length == 3);
assert (strv[0] == "foo");
assert (strv[1] == "bar");
assert (strv[2] == "manam");
sa = strv;
}
}
void main () {
var foo = Foo ("foo", "bar", "manam");
assert (foo.sa[1] == "bar");
}
|