Static Analyzer for Solidity
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.
 
 
 
 
slither/tests/e2e/vyper_parsing/test_data/in.vy

36 lines
571 B

enum Roles:
A
B
roles: public(HashMap[address, Roles])
@external
def baz(x: Roles) -> bool:
if x in (Roles.A | Roles.B):
return True
if x not in (Roles.A | Roles.B):
return False
return False
@external
def bar(x: Roles) -> bool:
if x in self.roles[self]:
return True
if x not in self.roles[self]:
return False
return False
@external
def foo(x: int128) -> bool:
a: int128 = 0
b: int128 = 0
if x in [a, b]:
return True
if x not in [a, b]:
raise "nope"
return False