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

Import Statements don't allow the use of super

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: Scala 2.11.7
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Intellij IDE on Ubuntu x86-64 using sbt (this is a compile time error)

      Description

      Given the following code:

      abstract class ScalaTreeTransformer[T, C <: whitebox.Context](val c: C)

      { import c.universe._ ... }

      class LuaTransformer[C <: whitebox.Context](c: C) extends ScalaTreeTransformer[LuaNode,C](c)

      { import super.c.universe._ // <-- this line produces a compile error ... }

      The use of a super clause to select the 'c' identifier is a 'Stable Identifier' as defined in the grammar and in an import statement this should be allowable. I don't see why this should be an error. The message given:
      Error(x,x) "Identifier given but 'super' found."

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              codyohl Cody Ohlsen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: