1
0
forked from Mirror/wren

Handle toString not returning a string in IO.print and IO.write.

Fix #67.
This commit is contained in:
Bob Nystrom
2015-01-08 07:53:37 -08:00
parent 92fcfc1b00
commit 15b0d8777c
4 changed files with 35 additions and 6 deletions

View File

@ -0,0 +1,5 @@
class BadToString {
toString { 3 }
}
IO.print(new BadToString) // expect: [invalid toString]

View File

@ -0,0 +1,6 @@
class BadToString {
toString { 3 }
}
IO.write(new BadToString) // expect: [invalid toString]
IO.print