Commit af96ff71 authored by Stefan Behnel's avatar Stefan Behnel

Simplify name lookup when analysing types by name.

parent 8d3d6952
...@@ -1376,9 +1376,7 @@ def _analyse_name_as_type(name, pos, env): ...@@ -1376,9 +1376,7 @@ def _analyse_name_as_type(name, pos, env):
if type is not None: if type is not None:
return type return type
global_entry = env.global_scope().lookup_here(name) global_entry = env.global_scope().lookup(name)
if global_entry is None:
global_entry = env.builtin_scope().lookup_here(name)
if global_entry and global_entry.type and ( if global_entry and global_entry.type and (
global_entry.type.is_extension_type global_entry.type.is_extension_type
or global_entry.type.is_struct_or_union or global_entry.type.is_struct_or_union
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment