forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not lift annotation arguments (scala#22035)
- Loading branch information
Showing
5 changed files
with
39 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
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,25 @@ | ||
[[syntax trees at end of typer]] // tests/printing/dependent-annot-default-args.scala | ||
package <empty> { | ||
class annot(x: Any, y: Any) extends annotation.Annotation() { | ||
private[this] val x: Any | ||
private[this] val y: Any | ||
} | ||
final lazy module val annot: annot = new annot() | ||
final module class annot() extends AnyRef() { this: annot.type => | ||
def $lessinit$greater$default$2: Any @uncheckedVariance = 42 | ||
} | ||
final lazy module val dependent-annot-default-args$package: | ||
dependent-annot-default-args$package = | ||
new dependent-annot-default-args$package() | ||
final module class dependent-annot-default-args$package() extends Object() { | ||
this: dependent-annot-default-args$package.type => | ||
def f(x: Int): Int @annot(x) = x | ||
def test: Unit = | ||
{ | ||
val y: Int = ??? | ||
val z: Int @annot(y) = f(y) | ||
() | ||
} | ||
} | ||
} | ||
|
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,5 @@ | ||
class annot(x: Any, y: Any = 42) extends annotation.Annotation | ||
def f(x: Int): Int @annot(x) = x | ||
def test = | ||
val y: Int = ??? | ||
val z = f(y) |