@@ -180,28 +180,6 @@ NameResolutionContext::resolve_path (
180180 // TODO: does NonShadowable matter?
181181 return Rib::Definition::NonShadowable (id);
182182 }
183- else
184- {
185- // HACK: check for a module after we check the language prelude
186- for (auto &kv :
187- stack.find_closest_module (starting_point.get ()).children )
188- {
189- auto &link = kv.first ;
190-
191- if (link.path .map_or (
192- [&seg] (Identifier path) {
193- auto &path_str = path.as_string ();
194- return path_str == seg.name ;
195- },
196- false ))
197- {
198- // FIXME: Is the NS to insert_segment_resolution valid?
199- insert_segment_resolution (Usage (seg.node_id ),
200- Definition (kv.second .id ), N);
201- return Rib::Definition::NonShadowable (kv.second .id );
202- }
203- }
204- }
205183 }
206184
207185 // FIXME: Is the NS to insert_segment_resolution valid?
@@ -262,27 +240,6 @@ NameResolutionContext::resolve_path (
262240 if (!res)
263241 res = stack.get_lang_prelude (seg_name);
264242
265- if (N == Namespace::Types && !res)
266- {
267- // HACK: check for a module after we check the language prelude
268- for (auto &kv : final_node.children )
269- {
270- auto &link = kv.first ;
271-
272- if (link.path .map_or (
273- [&seg_name] (Identifier path) {
274- auto &path_str = path.as_string ();
275- return path_str == seg_name;
276- },
277- false ))
278- {
279- insert_segment_resolution (Usage (seg.node_id ),
280- Definition (kv.second .id ), N);
281- return Rib::Definition::NonShadowable (kv.second .id );
282- }
283- }
284- }
285-
286243 if (res && !res->is_ambiguous ())
287244 insert_segment_resolution (Usage (seg.node_id ),
288245 Definition (res->get_node_id ()), N);
0 commit comments