Skip to content

Commit

Permalink
fix bug in var override check
Browse files Browse the repository at this point in the history
  • Loading branch information
paulzfm committed Nov 2, 2019
1 parent 3c7ccd5 commit f9f552f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/decaf/frontend/typecheck/Namer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class Namer(implicit config: Config) extends Phase[Tree, Typed.Tree]("namer", co
issue(new DeclConflictError(field.name, earlier.pos, field.pos)); None
case Some(earlier) => // maybe override?
(earlier, field) match {
case (_: MemberVarSymbol, _: VarSymbol) =>
case (_: MemberVarSymbol, _: VarDef) =>
issue(new OverridingVarError(field.name, field.pos))
None
case (suspect: MethodSymbol, m @ MethodDef(mod, id, returnType, params, body))
Expand Down

0 comments on commit f9f552f

Please sign in to comment.