You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ChocoPy/pa2-tests/core/bad_duplicate_local.py

22 lines
320 B

x:int = 1
y:int = 2
z:int = 3
def foo(x:int) -> object:
y:int = 4 # OK
x:int = 5 # Duplicate declaration
global z # OK
global y # Duplicate declaration
def x() -> int: # Duplicate declaration
return 0
pass
def bar(x:int, x:int) -> int: # Duplicate params
return x
foo(1)