mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-16 20:28:04 +01:00
13 lines
293 B
Plaintext
13 lines
293 B
Plaintext
class Foo {
|
|
toString { return "Foo.toString" }
|
|
}
|
|
|
|
// Calls toString on argument.
|
|
IO.write(new Foo) // expect: Foo.toString
|
|
|
|
// Returns argument.
|
|
var result = IO.write(123) // expect: 123
|
|
IO.write(result == 123) // expect: true
|
|
|
|
// TODO: What if toString on argument doesn't return a string?
|