mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 14:54:47 +08:00
Tests for finding if branches that are correct.
This commit is contained in:
@@ -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, '')
|
||||
|
||||
Reference in New Issue
Block a user