-
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.
Add message parameter to
@experimental
annotation
- Loading branch information
1 parent
43ed9fd
commit 4972375
Showing
7 changed files
with
42 additions
and
16 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
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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Error: tests/neg/experimental-message.scala:8:10 -------------------------------------------------------------------- | ||
8 |def g() = f() // error | ||
| ^ | ||
| method f is marked @experimental: not yet stable | ||
| | ||
| Experimental definition may only be used under experimental mode: | ||
| 1. in a definition marked as @experimental, or | ||
| 2. compiling with the -experimental compiler flag, or | ||
| 3. with a nightly or snapshot version of the compiler. |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//> using options -Yno-experimental | ||
|
||
import scala.annotation.experimental | ||
|
||
@experimental("not yet stable") | ||
def f() = ??? | ||
|
||
def g() = f() // 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,10 +1,9 @@ | ||
-- Error: tests/neg/use-experimental-def.scala:7:15 -------------------------------------------------------------------- | ||
7 |def bar: Int = foo // error | ||
| ^^^ | ||
| method foo is marked @experimental | ||
| | ||
| Experimental definition may only be used under experimental mode: | ||
| 1. in a definition marked as @experimental, or | ||
| 2. compiling with the -experimental compiler flag, or | ||
| 3. with a nightly or snapshot version of the compiler. | ||
| | ||
| method foo is marked @experimental | ||
| |