summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2015-11-07 17:30:26 -0500
committerSeth Tisue <seth@tisue.net>2015-11-07 17:30:26 -0500
commit167f79ca1ee300860a4dfc570a03590496764f88 (patch)
tree421fd763161580b9a41267d975e47e01e02b706d
parenta24ca7fa617cabada82c43d2d6ac354db698d181 (diff)
downloadscala-167f79ca1ee300860a4dfc570a03590496764f88.tar.gz
scala-167f79ca1ee300860a4dfc570a03590496764f88.tar.bz2
scala-167f79ca1ee300860a4dfc570a03590496764f88.zip
less confusing wording for a dependent method type error
note to reviewers: the error messages in this file are over the place about whether they're called "parameter sections", or "argument lists", or what, so there's no point in being picky about that here for context see SI-823
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala2
-rw-r--r--test/files/neg/depmet_1.check4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
index b0bd9977a8..727f09290a 100644
--- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
@@ -1190,7 +1190,7 @@ trait ContextErrors {
def IllegalDependentMethTpeError(sym: Symbol)(context: Context) = {
val errorAddendum =
- ": parameter appears in the type of another parameter in the same section or an earlier one"
+ ": parameter may only be referenced in a subsequent parameter section"
issueSymbolTypeError(sym, "illegal dependent method type" + errorAddendum)(context)
}
diff --git a/test/files/neg/depmet_1.check b/test/files/neg/depmet_1.check
index 7a4f845fd5..15498568c5 100644
--- a/test/files/neg/depmet_1.check
+++ b/test/files/neg/depmet_1.check
@@ -1,7 +1,7 @@
-depmet_1.scala:2: error: illegal dependent method type: parameter appears in the type of another parameter in the same section or an earlier one
+depmet_1.scala:2: error: illegal dependent method type: parameter may only be referenced in a subsequent parameter section
def precise0(y: x.type)(x: String): Unit = {}
^
-depmet_1.scala:3: error: illegal dependent method type: parameter appears in the type of another parameter in the same section or an earlier one
+depmet_1.scala:3: error: illegal dependent method type: parameter may only be referenced in a subsequent parameter section
def precise1(x: String, y: x.type): Unit = {}
^
depmet_1.scala:4: error: not found: value y