Files
wren/test/language/method/newlines.wren

22 lines
357 B
Plaintext
Raw Normal View History

2015-02-22 10:42:49 -08:00
class Foo {
construct new() {}
method(a, b) { "method %(a) %(b)" }
[a, b] { "subscript %(a) %(b)" }
2015-02-22 10:42:49 -08:00
}
var foo = Foo.new()
2015-02-22 10:42:49 -08:00
// Allow newlines after commas and before ")".
System.print(foo.method("a",
2015-02-22 10:42:49 -08:00
"b"
)) // expect: method a b
// Allow newlines after commas and before "]".
System.print(foo["a",
2015-02-22 10:42:49 -08:00
"b"
]) // expect: subscript a b