diff options
Diffstat (limited to 'tests/functional/c/class_scope.py')
-rw-r--r-- | tests/functional/c/class_scope.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/functional/c/class_scope.py b/tests/functional/c/class_scope.py index 527e5efa2..4e1561c9a 100644 --- a/tests/functional/c/class_scope.py +++ b/tests/functional/c/class_scope.py @@ -21,3 +21,23 @@ class Well(object): def func(self): """check Sub is not defined here""" return Sub(), self # [undefined-variable] + + +class Right: + """right""" + class Result1: + """result one""" + OK = 0 + def work(self) -> Result1: + """good type hint""" + return self.Result1.OK + + +class Wrong: + """wrong""" + class Result2: + """result two""" + OK = 0 + def work(self) -> self.Result2: # [undefined-variable] + """bad type hint""" + return self.Result2.OK |