aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/parsing/Parsers.scala
diff options
context:
space:
mode:
authorLucas Burson <ljdelight@gmail.com>2016-10-25 22:50:03 -0500
committerLucas Burson <ljdelight@gmail.com>2016-10-31 09:12:25 -0500
commit7c473613266526eb51c3bd7b2003bb281a1f5343 (patch)
treebf5166aa6d68073de7ad9e80326a3c24dc703c94 /src/dotty/tools/dotc/parsing/Parsers.scala
parentb4f0c6e7856d1dff7139b9500b6a990f181b5f2d (diff)
downloaddotty-7c473613266526eb51c3bd7b2003bb281a1f5343.tar.gz
dotty-7c473613266526eb51c3bd7b2003bb281a1f5343.tar.bz2
dotty-7c473613266526eb51c3bd7b2003bb281a1f5343.zip
Update error msg for Parsers.scala:1738 and 1739
These error messages are for aux ctors needing non-implicit params. I'm testing the error messages with this code ``` class Square(val len: Int) { // typical cases: // (1) this() parens are forgotten, (2) argument set as implicit def this(implicit width: Double) = this(0) def this = { this(4) } } class MyList(val s: String) { def this ```
Diffstat (limited to 'src/dotty/tools/dotc/parsing/Parsers.scala')
-rw-r--r--src/dotty/tools/dotc/parsing/Parsers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/parsing/Parsers.scala b/src/dotty/tools/dotc/parsing/Parsers.scala
index 4926ebb9f..95626846d 100644
--- a/src/dotty/tools/dotc/parsing/Parsers.scala
+++ b/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -1742,8 +1742,8 @@ object Parsers {
if (owner == nme.CONSTRUCTOR && (result.isEmpty || (result.head take 1 exists (_.mods is Implicit)))) {
in.token match {
case LBRACKET => syntaxError("no type parameters allowed here")
- case EOF => incompleteInputError("auxiliary constructor needs non-implicit parameter list")
- case _ => syntaxError("auxiliary constructor needs non-implicit parameter list", start)
+ case EOF => incompleteInputError(AuxConstructorNeedsNonImplicitParameter())
+ case _ => syntaxError(AuxConstructorNeedsNonImplicitParameter(), start)
}
}
result