Skip to content
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

annotations accept dummy type arguments #6860

Closed
scabug opened this issue Dec 22, 2012 · 4 comments
Closed

annotations accept dummy type arguments #6860

scabug opened this issue Dec 22, 2012 · 4 comments
Assignees
Labels
Milestone

Comments

@scabug
Copy link

scabug commented Dec 22, 2012

I fixed this and am sending PR, opening ticket to record issue.

The compiler accepts this code and in the cases of f1 and f3 uses the type parameter as the type argument.

class Bippy[T](val value: T) extends annotation.StaticAnnotation

class A {
  def f1: Int @Bippy("hi") = 1
  def f2: Int @Bippy[String]("hi") = 2

  @throws("what do I throw?") def f3 = throw new RuntimeException
  @throws[RuntimeException]("that's good to know!") def f4 = throw new RuntimeException
}
@scabug
Copy link
Author

scabug commented Dec 22, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6860?orig=1
Reporter: @paulp
Affected Versions: 2.10.0
Duplicates #2577

@scabug
Copy link
Author

scabug commented Dec 22, 2012

@paulp said:
I knew this must have come up before. Closing #2577 as duplicate of this (I will close this one too soon enough.)

@scabug
Copy link
Author

scabug commented Dec 24, 2012

@paulp said:
scala/scala#1804

@scabug
Copy link
Author

scabug commented Feb 4, 2013

@xeno-by said:
scala/scala#1901

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants