-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid pure expression warning with Scala2 library TASTy
The extra information on trait initialization causes an extra warning. The warning/errors in the check files should be the same. The test now do not desugar the erroneous code into a statement anymore to avoid this warning.
- Loading branch information
1 parent
f61026d
commit 30ca28d
Showing
4 changed files
with
10 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
-- [E042] Type Error: tests/neg/i16601.scala:1:27 ---------------------------------------------------------------------- | ||
1 |@main def Test: Unit = new concurrent.ExecutionContext // error | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ExecutionContext is a trait; it cannot be instantiated | ||
-- [E042] Type Error: tests/neg/i16601.scala:1:26 ---------------------------------------------------------------------- | ||
1 |@main def Test: Any = new concurrent.ExecutionContext // error | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ExecutionContext is a trait; it cannot be instantiated | ||
| | ||
| longer explanation available when compiling with `-explain` |
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 +1 @@ | ||
@main def Test: Unit = new concurrent.ExecutionContext // error | ||
@main def Test: Any = new concurrent.ExecutionContext // 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
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,3 +1,3 @@ | ||
//> using options -explain | ||
|
||
@main def Test: Unit = new concurrent.ExecutionContext // error | ||
@main def Test: Any = new concurrent.ExecutionContext // error |