Scala Programming Language
  1. Scala Programming Language
  2. SI-4740

SpecializableCompanion cannot be private[scala]

    Details

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

      Description

      ...because @specialized is a public class and those are the types you have to give it. It's an annotation so your hands are pretty well tied.

      You should be able to do something like

      object Foo

      { final val MySpecializeTypes = Seq(Byte, Short, Long) }

      But you cannot, because the inferred type of MySpecializeTypes is not List[SpecializableCompanion], and you can't even cast it because you can't reference the type.

        Activity

        Hide
        Paul Phillips added a comment -

        bb23d766bc

        Show
        Paul Phillips added a comment - bb23d766bc

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development