Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.11.0-M2
    • Component/s: None

      Description

      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
      }
      

        Issue Links

          Activity

          Hide
          Paul Phillips added a comment -

          I knew this must have come up before. Closing SI-2577 as duplicate of this (I will close this one too soon enough.)

          Show
          Paul Phillips added a comment - I knew this must have come up before. Closing SI-2577 as duplicate of this (I will close this one too soon enough.)
          Show
          Paul Phillips added a comment - https://github.com/scala/scala/pull/1804
          Show
          Eugene Burmako added a comment - https://github.com/scala/scala/pull/1901

            People

            • Assignee:
              Paul Phillips
              Reporter:
              Paul Phillips
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development