Fix a small _get_annotated_class_object, fixes #1550

This commit is contained in:
Dave Halter
2020-04-18 00:36:32 +02:00
parent 0850b86456
commit a793dd7c91
2 changed files with 20 additions and 3 deletions

View File

@@ -630,3 +630,19 @@ class C1(MyBase):
self.f1() . # hey'''
#? 13 MyBase.f1
self.f1() . # hey'''
# -----------------
# With a very weird __init__
# -----------------
class WithWeirdInit:
class __init__:
def __init__(self, a):
self.a = a
def y(self):
return self.a
#?
WithWeirdInit(1).y()