A few small cleanups.

This commit is contained in:
Bob Nystrom
2014-04-19 11:44:51 -07:00
parent 05717e763d
commit 48dab5323d
6 changed files with 16 additions and 16 deletions

View File

@ -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

View File

@ -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?