mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-18 13:49:59 +01:00
A few small cleanups.
This commit is contained in:
@ -1,3 +1,10 @@
|
||||
class Foo {
|
||||
toString { "Foo.toString" }
|
||||
}
|
||||
|
||||
// Calls toString on argument.
|
||||
IO.print(new Foo) // expect: Foo.toString
|
||||
|
||||
// With one argument, returns the argument.
|
||||
IO.print(IO.print(1) == 1) // expect: 1
|
||||
// expect: true
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
class Foo {
|
||||
toString { "Foo.toString" }
|
||||
}
|
||||
|
||||
// Calls toString on argument.
|
||||
IO.print(new Foo) // expect: Foo.toString
|
||||
|
||||
// Returns argument.
|
||||
var result = IO.print(123) // expect: 123
|
||||
IO.print(result == 123) // expect: true
|
||||
|
||||
// TODO: What if toString on argument doesn't return a string?
|
||||
Reference in New Issue
Block a user