diff options
author | Seth Tisue <seth@tisue.net> | 2015-11-14 09:18:57 -0500 |
---|---|---|
committer | Seth Tisue <seth@tisue.net> | 2015-11-14 09:18:57 -0500 |
commit | c7040b6ac445e2fc33118fce5cea910b4bdcc731 (patch) | |
tree | 8b0e59334aac0e15ab32b0b075765a1faa39d246 | |
parent | 7a75c0ff03f7d8fa36f886b4de61696c20828672 (diff) | |
parent | 167f79ca1ee300860a4dfc570a03590496764f88 (diff) | |
download | scala-c7040b6ac445e2fc33118fce5cea910b4bdcc731.tar.gz scala-c7040b6ac445e2fc33118fce5cea910b4bdcc731.tar.bz2 scala-c7040b6ac445e2fc33118fce5cea910b4bdcc731.zip |
Merge pull request #4839 from SethTisue/reword-dependent-type-error
less confusing wording for a dependent method type error
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala | 2 | ||||
-rw-r--r-- | test/files/neg/depmet_1.check | 4 |
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 |