-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9654 from joroKr21/forward-ref
More details to forward reference error messages
- Loading branch information
Showing
10 changed files
with
40 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
forward.scala:6: error: forward reference extends over definition of value x | ||
forward.scala:8: error: forward reference to value x defined on line 9 extends over definition of value x | ||
def f: Int = x; | ||
^ | ||
forward.scala:10: error: forward reference extends over definition of value x | ||
forward.scala:12: error: forward reference to method g defined on line 14 extends over definition of value x | ||
def f: Int = g; | ||
^ | ||
forward.scala:15: error: forward reference extends over definition of variable x | ||
forward.scala:17: error: forward reference to method g defined on line 19 extends over definition of variable x | ||
def f: Int = g; | ||
^ | ||
3 errors | ||
forward.scala:29: error: forward reference to value ec defined on line 32 extends over definition of value z | ||
a <- fInt | ||
^ | ||
4 errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
t2910.scala:3: error: forward reference extends over definition of value ret | ||
t2910.scala:3: error: forward reference to value MyMatch defined on line 4 extends over definition of value ret | ||
val ret = l.collect({ case MyMatch(id) => id }) | ||
^ | ||
t2910.scala:9: error: forward reference extends over definition of value z | ||
t2910.scala:9: error: forward reference to lazy value s defined on line 11 extends over definition of value z | ||
println(s.length) | ||
^ | ||
t2910.scala:16: error: forward reference extends over definition of value z | ||
t2910.scala:16: error: forward reference to lazy value x defined on line 18 extends over definition of value z | ||
x | ||
^ | ||
t2910.scala:30: error: forward reference extends over definition of value x | ||
t2910.scala:30: error: forward reference to value x defined on line 31 extends over definition of value x | ||
lazy val f: Int = x | ||
^ | ||
t2910.scala:35: error: forward reference extends over definition of variable x | ||
t2910.scala:35: error: forward reference to lazy value g defined on line 37 extends over definition of variable x | ||
lazy val f: Int = g | ||
^ | ||
5 errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
t4098.scala:3: error: forward reference not allowed from self constructor invocation | ||
t4098.scala:3: error: forward reference to method b defined on line 4 not allowed from self constructor invocation | ||
this(b) | ||
^ | ||
t4098.scala:8: error: forward reference not allowed from self constructor invocation | ||
t4098.scala:8: error: forward reference to lazy value b defined on line 9 not allowed from self constructor invocation | ||
this(b) | ||
^ | ||
t4098.scala:13: error: forward reference not allowed from self constructor invocation | ||
t4098.scala:13: error: forward reference to value b defined on line 14 not allowed from self constructor invocation | ||
this(b) | ||
^ | ||
t4098.scala:18: error: forward reference not allowed from self constructor invocation | ||
t4098.scala:18: error: forward reference to method b defined on line 20 not allowed from self constructor invocation | ||
this(b) | ||
^ | ||
4 errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
t4419.scala:2: error: forward reference extends over definition of value b | ||
t4419.scala:2: error: forward reference to value a defined on line 2 extends over definition of value b | ||
{ val b = a; val a = 1 ; println(a) } | ||
^ | ||
1 error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
t5390.scala:7: error: forward reference extends over definition of value b | ||
t5390.scala:7: error: forward reference to value a defined on line 8 extends over definition of value b | ||
val b = a.B("") | ||
^ | ||
1 error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
t5390b.scala:7: error: forward reference extends over definition of value b | ||
t5390b.scala:7: error: forward reference to value a defined on line 8 extends over definition of value b | ||
val b = a.B("") | ||
^ | ||
1 error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
t5390c.scala:7: error: forward reference extends over definition of value b | ||
t5390c.scala:7: error: forward reference to value a defined on line 8 extends over definition of value b | ||
val b = new a.B("") | ||
^ | ||
1 error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
t5390d.scala:7: error: forward reference extends over definition of value b | ||
t5390d.scala:7: error: forward reference to value a defined on line 8 extends over definition of value b | ||
val b = a.B.toString | ||
^ | ||
1 error |