Skip to content

Commit c7040b6

Browse files
committed
Merge pull request scala#4839 from SethTisue/reword-dependent-type-error
less confusing wording for a dependent method type error
2 parents 7a75c0f + 167f79c commit c7040b6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ trait ContextErrors {
11901190

11911191
def IllegalDependentMethTpeError(sym: Symbol)(context: Context) = {
11921192
val errorAddendum =
1193-
": parameter appears in the type of another parameter in the same section or an earlier one"
1193+
": parameter may only be referenced in a subsequent parameter section"
11941194
issueSymbolTypeError(sym, "illegal dependent method type" + errorAddendum)(context)
11951195
}
11961196

test/files/neg/depmet_1.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
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
1+
depmet_1.scala:2: error: illegal dependent method type: parameter may only be referenced in a subsequent parameter section
22
def precise0(y: x.type)(x: String): Unit = {}
33
^
4-
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
4+
depmet_1.scala:3: error: illegal dependent method type: parameter may only be referenced in a subsequent parameter section
55
def precise1(x: String, y: x.type): Unit = {}
66
^
77
depmet_1.scala:4: error: not found: value y

0 commit comments

Comments
 (0)