forked from Mirror/wren
Handle toString not returning a string in IO.print and IO.write.
Fix #67.
This commit is contained in:
5
test/io/print_bad_to_string.wren
Normal file
5
test/io/print_bad_to_string.wren
Normal file
@ -0,0 +1,5 @@
|
||||
class BadToString {
|
||||
toString { 3 }
|
||||
}
|
||||
|
||||
IO.print(new BadToString) // expect: [invalid toString]
|
||||
6
test/io/write_bad_to_string.wren
Normal file
6
test/io/write_bad_to_string.wren
Normal file
@ -0,0 +1,6 @@
|
||||
class BadToString {
|
||||
toString { 3 }
|
||||
}
|
||||
|
||||
IO.write(new BadToString) // expect: [invalid toString]
|
||||
IO.print
|
||||
Reference in New Issue
Block a user