Skip to content

Add error message about double definition (#1589) #4064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 19, 2018
Prev Previous commit
Next Next commit
fix grammar and wording
  • Loading branch information
Jendrik Wenke committed Mar 11, 2018
commit c569c8aa978ff75f187ed0c5d5ed6ea60312b4ce
Original file line number Diff line number Diff line change
Expand Up @@ -2087,11 +2087,11 @@ object messages {
// compare the signatures when both symbols represent methods
decl.signature.matchDegree(previousDecl.signature) match {
/* case Signature.NoMatch => // can't happen because decl.matches(previousDecl) is checked before reporting this error */
case Signature.ParamMatch => "\nOverloads with equal parameter types but different return types are not allowed."
case _ /* Signature.FullMatch */ => "\nThe definitions have the same signature after erasure."
case Signature.ParamMatch => "\nOverloads with matching parameter types are not allowed."
case _ /* Signature.FullMatch */ => "\nThe definitions have matching type signatures after erasure."
}
} else ""
hl"${decl.showLocated} is already defined as ${previousDecl.showDcl} in line ${previousDecl.pos.line + 1}." + details
hl"${decl.showLocated} is already defined as ${previousDecl.showDcl} at line ${previousDecl.pos.line + 1}." + details
}
val explanation = ""
}
Expand Down