Skip to content

Commit 167f79c

Browse files
committed
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
1 parent a24ca7f commit 167f79c

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)