Make test for wrong bool type pass

This commit is contained in:
Rasmus Lerchedahl Petersen
2020-05-14 15:56:57 +02:00
parent 7b004c3746
commit 1817d2af2b
2 changed files with 3 additions and 0 deletions

View File

@@ -116,6 +116,8 @@ predicate preferred_raise(string name, ClassObject ex) {
ordering_method(name) and ex = theTypeErrorType()
or
arithmetic_method(name) and ex = Object::builtin("ArithmeticError")
or
name = "__bool__" and ex = theTypeErrorType()
}
predicate no_need_to_raise(string name, string message) {