Files
wren/test/io/write.wren
T

13 lines
293 B
Plaintext
Raw Normal View History

class Foo {
toString { return "Foo.toString" }
}
// Calls toString on argument.
2014-01-05 12:27:12 -08:00
IO.print(new Foo) // expect: Foo.toString
// Returns argument.
2014-01-05 12:27:12 -08:00
var result = IO.print(123) // expect: 123
IO.print(result == 123) // expect: true
// TODO: What if toString on argument doesn't return a string?