Skip to content

Commit

Permalink
Merge pull request #2 from decaf-lang/master
Browse files Browse the repository at this point in the history
Merge pull request decaf-lang#6 from equation314/master
  • Loading branch information
fengjixuchui authored Oct 28, 2019
2 parents a727a5e + 0317c46 commit 4c53028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/decaf/frontend/typecheck/Namer.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public void visitMethodDef(Tree.MethodDef method, ScopeStack ctx) {
if (earlier.isPresent()) {
if (earlier.get().isMethodSymbol()) { // may be overriden
var suspect = (MethodSymbol) earlier.get();
if (!suspect.isStatic() && !method.isStatic()) {
if (suspect.domain() != ctx.currentScope() && !suspect.isStatic() && !method.isStatic()) {
// Only non-static methods can be overriden, but the type signature must be equivalent.
var formal = new FormalScope();
typeMethod(method, ctx, formal);
Expand Down

0 comments on commit 4c53028

Please sign in to comment.