Clean up text handling a bit:
- Rename IO.write -> IO.print. - Make IO.write not print a newline. - Support \u Unicode escapes in strings.
This commit is contained in:
+3
-3
@@ -3,10 +3,10 @@ class Foo {
|
||||
}
|
||||
|
||||
// Calls toString on argument.
|
||||
IO.write(new Foo) // expect: Foo.toString
|
||||
IO.print(new Foo) // expect: Foo.toString
|
||||
|
||||
// Returns argument.
|
||||
var result = IO.write(123) // expect: 123
|
||||
IO.write(result == 123) // expect: true
|
||||
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