Tests for finding if branches that are correct.

This commit is contained in:
Dave Halter
2015-07-01 14:44:31 +02:00
parent e355ab201e
commit d1218c97bf

View File

@@ -30,3 +30,17 @@ if x == y:
else:
#! 6 type-error-operation
z = x + y
# -----------------
# With a function
# -----------------
def addition(a, b):
if type(a) == type(b):
return a + b
else:
#! 9 type-error-operation
return a + b
addition(1, 1)
addition(1.0, '')