Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes SI-6952: add correct error positions for Dynamic feature check.
- Loading branch information
Showing
4 changed files
with
23 additions
and
4 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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,7 +1,9 @@ | |||
error: extension of type scala.Dynamic needs to be enabled | t6040.scala:1: error: extension of type scala.Dynamic needs to be enabled | ||
by making the implicit value language.dynamics visible. | by making the implicit value language.dynamics visible. | ||
This can be achieved by adding the import clause 'import scala.language.dynamics' | This can be achieved by adding the import clause 'import scala.language.dynamics' | ||
or by setting the compiler option -language:dynamics. | or by setting the compiler option -language:dynamics. | ||
See the Scala docs for value scala.language.dynamics for a discussion | See the Scala docs for value scala.language.dynamics for a discussion | ||
why the feature needs to be explicitly enabled. | why the feature needs to be explicitly enabled. | ||
class X extends Dynamic | |||
^ | |||
one error found | one error found |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
t6952.scala:2: error: extension of type scala.Dynamic needs to be enabled | |||
by making the implicit value language.dynamics visible. | |||
This can be achieved by adding the import clause 'import scala.language.dynamics' | |||
or by setting the compiler option -language:dynamics. | |||
See the Scala docs for value scala.language.dynamics for a discussion | |||
why the feature needs to be explicitly enabled. | |||
trait B extends Dynamic | |||
^ | |||
t6952.scala:3: error: extension of type scala.Dynamic needs to be enabled | |||
by making the implicit value language.dynamics visible. | |||
trait C extends A with Dynamic | |||
^ | |||
two errors found |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
trait A | |||
trait B extends Dynamic | |||
trait C extends A with Dynamic | |||
trait D extends B |