File tree Expand file tree Collapse file tree 4 files changed +76
-248
lines changed
Expand file tree Collapse file tree 4 files changed +76
-248
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ impl<'a> AnalyzeContext<'a> {
275275 TypeDefinition :: ProtectedBody ( ref mut body) => {
276276 body. type_reference . clear_reference ( ) ;
277277
278- match parent. lookup_extended ( & type_decl. ident . item . clone ( ) . into ( ) ) {
278+ match parent. lookup_immediate ( & type_decl. ident . item . clone ( ) . into ( ) ) {
279279 Some ( visible) => {
280280 let is_ok = match visible. clone ( ) . into_non_overloaded ( ) {
281281 Ok ( ent) => {
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ impl<'a> AnalyzeContext<'a> {
223223
224224 unit. entity_name . set_reference_pos ( Some ( entity. pos ( ) ) ) ;
225225
226- let mut root_region = Region :: extend ( & entity. result ( ) . root_region , None ) ;
226+ let mut root_region = Region :: with_parent ( & entity. result ( ) . root_region ) ;
227227 self . analyze_context_clause ( & mut root_region, & mut unit. context_clause , diagnostics) ?;
228228 let mut region = Region :: extend ( & entity. result ( ) . region , Some ( & root_region) ) ;
229229
@@ -266,7 +266,7 @@ impl<'a> AnalyzeContext<'a> {
266266
267267 unit. ident . set_reference_pos ( Some ( package. pos ( ) ) ) ;
268268 // @TODO make pattern of primary/secondary extension
269- let mut root_region = Region :: extend ( & package. result ( ) . root_region , None ) ;
269+ let mut root_region = Region :: with_parent ( & package. result ( ) . root_region ) ;
270270 self . analyze_context_clause ( & mut root_region, & mut unit. context_clause , diagnostics) ?;
271271
272272 let mut region = Region :: extend ( & package. result ( ) . region , Some ( & root_region) ) ;
Original file line number Diff line number Diff line change @@ -199,23 +199,6 @@ impl NamedEntity {
199199 }
200200 }
201201
202- /// Return a duplicate declaration of the previously declared named entity
203- pub fn is_duplicate_of < ' a > ( & self , prev : & ' a Self ) -> bool {
204- if self . is_overloaded ( ) && prev. is_overloaded ( ) {
205- return false ;
206- }
207-
208- match prev. kind {
209- // Everything expect deferred combinations are forbidden
210- NamedEntityKind :: DeferredConstant if self . kind . is_non_deferred_constant ( ) => { }
211- _ => {
212- return true ;
213- }
214- }
215-
216- false
217- }
218-
219202 /// Strip aliases and return reference to actual named entity
220203 pub fn as_actual ( & self ) -> & NamedEntity {
221204 match self . kind ( ) {
You can’t perform that action at this time.
0 commit comments