2015-02-22 10:42:49 -08:00
|
|
|
class Foo {
|
2015-09-01 08:16:04 -07:00
|
|
|
construct new() {}
|
2015-11-11 07:55:48 -08:00
|
|
|
method(a, b) { "method %(a) %(b)" }
|
|
|
|
|
[a, b] { "subscript %(a) %(b)" }
|
2015-02-22 10:42:49 -08:00
|
|
|
}
|
|
|
|
|
|
2015-07-10 09:18:22 -07:00
|
|
|
var foo = Foo.new()
|
2015-02-22 10:42:49 -08:00
|
|
|
|
|
|
|
|
// Allow newlines after commas and before ")".
|
2015-09-15 07:46:09 -07:00
|
|
|
System.print(foo.method("a",
|
2015-02-22 10:42:49 -08:00
|
|
|
|
|
|
|
|
"b"
|
|
|
|
|
|
|
|
|
|
)) // expect: method a b
|
|
|
|
|
|
|
|
|
|
// Allow newlines after commas and before "]".
|
2015-09-15 07:46:09 -07:00
|
|
|
System.print(foo["a",
|
2015-02-22 10:42:49 -08:00
|
|
|
|
|
|
|
|
"b"
|
|
|
|
|
|
|
|
|
|
]) // expect: subscript a b
|