-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameters are not substituted in lambdas in type annotation #19846
Labels
Comments
Maybe related: #18064. |
Also fails to pickle, similarly to #20035: class qualified[T](predicate: T => Boolean) extends annotation.StaticAnnotation
class EqualPair(val x: Int, val y: Int @qualified[Int](it => it == x))
@main def main =
val p = EqualPair(42, 42)
val y = p.y
println(42)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
Scala 3.4.2-RC1-bin-20240229-9fe0111-NIGHTLY-git-9fe0111 (17.0.8, Java OpenJDK 64-Bit Server VM)
Minimized code
Let
dependentAnnotation.scala
contain:Output
outputs
Expectation
x
should be substituted toy
.This is the case if the annotation takes an
Int
parameter instead of() => Int
.Example without a lambda
The text was updated successfully, but these errors were encountered: