mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
19 lines
379 B
Python
19 lines
379 B
Python
class A:
|
|
def __eq__(self, other):
|
|
return True
|
|
|
|
def __hash__(self):
|
|
return 7
|
|
|
|
# B is automatically non-hashable - so eq without hash never needs to alert
|
|
class B:
|
|
def __eq__(self, other):
|
|
return True
|
|
|
|
class C: # $ Alert
|
|
def __hash__(self):
|
|
return 5
|
|
|
|
class D(A): # $ Alert
|
|
def __hash__(self):
|
|
return 4 |