mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
Tests for finding if branches that are correct.
This commit is contained in:
@@ -30,3 +30,17 @@ if x == y:
|
|||||||
else:
|
else:
|
||||||
#! 6 type-error-operation
|
#! 6 type-error-operation
|
||||||
z = x + y
|
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, '')
|
||||||
|
|||||||
Reference in New Issue
Block a user