]> granicus.if.org Git - python/commitdiff
Issue #28649: fix second issue with _ForwardRef (#328)
authorGuido van Rossum <guido@python.org>
Thu, 10 Nov 2016 16:29:18 +0000 (08:29 -0800)
committerGuido van Rossum <guido@python.org>
Thu, 10 Nov 2016 16:29:18 +0000 (08:29 -0800)
Lib/typing.py

index 462cc225f6cd1af9a37eeea808a51e7295656f27..7a64e07a1843f5607fd7da477b71d9f0089a027d 100644 (file)
@@ -218,7 +218,7 @@ class _ForwardRef(_TypingBase, _root=True):
         self.__forward_value__ = None
 
     def _eval_type(self, globalns, localns):
-        if not self.__forward_evaluated__:
+        if not self.__forward_evaluated__ or localns is not globalns:
             if globalns is None and localns is None:
                 globalns = localns = {}
             elif globalns is None: