Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-8871

call to specialized method fails second time under fsc or REPL

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.4, Scala 2.11.2
    • Fix Version/s: Scala 2.11.5
    • Component/s: Specialization
    • Labels:
      None

      Description

      % tail sandbox/{tag,usetag}.scala
      ==> sandbox/tag.scala <==
      object Tag {
        @inline def apply[@specialized A, T](a: A): A = a
      }
       
      ==> sandbox/usetag.scala <==
      trait Foo
       
      object Test {
        val y = Tag[Double, Foo](3.3)
      }
       
      % qscalac -version && qscalac sandbox/tag.scala && qscalac -Xresident
      Scala compiler version 2.11.3-20140930-174528-a52db7f163 -- Copyright 2002-2013, LAMP/EPFL
       
      nsc> sandbox/usetag.scala
       
      nsc> sandbox/usetag.scala
      sandbox/usetag.scala:4: error: wrong number of type parameters for method apply$mDc$sp: [T](a: Double)Double
        val y = Tag[Double, Foo](3.3)
                   ^
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                retronym Jason Zaugg
                Reporter:
                retronym Jason Zaugg
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: