File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -1002,21 +1002,21 @@ void funcDeclarationSemantic(Scope* sc, FuncDeclaration funcdecl)
10021002 auto p1 = params1[i];
10031003 auto p2 = params2[i];
10041004
1005- // Check for scope difference
1006- if ((p1.storageClass & STC .scope_) != (p2.storageClass & STC .scope_))
1005+ if ((p1.storageClass & STC .scope_) == (p2.storageClass & STC .scope_))
1006+ continue ;
1007+
1008+ if (! (p2.storageClass & STC .scope_))
1009+ continue ;
1010+
1011+ if (! hasScopeDifference)
10071012 {
1008- if (p2.storageClass & STC .scope_)
1009- {
1010- if (! hasScopeDifference)
1011- {
1012- // Intended signature
1013- errorSupplemental(funcdecl.loc, " Did you intend to override:" );
1014- errorSupplemental(funcdecl.loc, " `%s`" , buf1.peekChars());
1015- hasScopeDifference = true ;
1016- }
1017- errorSupplemental(funcdecl.loc, " Parameter %d is missing `scope`" , cast (int )(i + 1 ));
1018- }
1013+ // Intended signature
1014+ errorSupplemental(funcdecl.loc, " Did you intend to override:" );
1015+ errorSupplemental(funcdecl.loc, " `%s`" , buf1.peekChars());
1016+ hasScopeDifference = true ;
10191017 }
1018+ errorSupplemental(funcdecl.loc, " Parameter %d is missing `scope`" ,
1019+ cast (int )(i + 1 ));
10201020 }
10211021 }
10221022 }
You can’t perform that action at this time.
0 commit comments