1.1 --- a/inspector.py Fri Dec 16 18:07:58 2016 +0100
1.2 +++ b/inspector.py Fri Dec 16 18:45:33 2016 +0100
1.3 @@ -497,9 +497,9 @@
1.4 # the storage of namespace-related information.
1.5
1.6 class_name = self.get_object_path(n.name)
1.7 - ref = self.get_object(class_name)
1.8 + ref = self.get_object(class_name, defer=False)
1.9
1.10 - if ref.static():
1.11 + if ref and ref.static():
1.12 raise InspectError("Multiple definitions for the same name are not permitted.", class_name, n)
1.13
1.14 # Record bases for the class and retain the class name.
1.15 @@ -586,9 +586,9 @@
1.16 # the storage of namespace-related information.
1.17
1.18 function_name = self.get_object_path(name)
1.19 - ref = self.get_object(function_name)
1.20 + ref = self.get_object(function_name, defer=False)
1.21
1.22 - if ref.static():
1.23 + if ref and ref.static():
1.24 raise InspectError("Multiple definitions for the same name are not permitted.", function_name, n)
1.25
1.26 # Initialise argument and local records.