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

Visibility problem with locally defined class + companion.

    Details

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

      Description

      A companion object defined locally cannot see private constructors in its companion class.

      scala> val a = { class A private; object A { new A } }
      <console>:25: error: constructor A in class A cannot be accessed in object A
             val a = { class A private; object A { new A } }
      

        Issue Links

          Activity

          Hide
          Jason Zaugg added a comment -

          Similar to SI-3772

          Show
          Jason Zaugg added a comment - Similar to SI-3772
          Show
          Jason Zaugg added a comment - WIP: https://github.com/retronym/scala/compare/ticket/8002
          Show
          Jason Zaugg added a comment - https://github.com/scala/scala/pull/3189

            People

            • Assignee:
              Jason Zaugg
              Reporter:
              Rob Norris
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development