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

Symbols can't be used in traits with a particular self type

    Details

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

      Description

      === What steps will reproduce the problem (please be specific and use wikiformatting)? ===

      class A
      
      trait B {
        self: A =>
      
        def test {
          println('blubber)
        }
      }
      
      object Test extends A with B {
        def main(args: Array[String]) {
          test
        }
      }
      

      === What is the expected behavior? ===

      No runtime verifier crash.

      === What do you see instead? ===

      java.lang.NoSuchFieldError: symbol$$1
      	at B$$class.test(Test.scala:13)
      	at Test$$.test(Test.scala:17)
      	at Test$$.main(Test.scala:19)
      	at Test.main(Test.scala)
      

      === Additional information ===
      This seems to be the same bug as SI-4560 and I'm filing this for reference since it seems to be fixed with the fix for SI-4560. The same rules to invoke this bug in 2.9.0 apply here: one self-type which is a trait works in 2.9.0, a self-type which is a class or multiple self-types is still broken.

      === What versions of the following are you using? ===

      • Scala: 2.9.0

        Activity

        Hide
        Commit Message Bot added a comment -

        (extempore in r25120) Test case closes #4601, no review.

        Show
        Commit Message Bot added a comment - (extempore in r25120 ) Test case closes #4601, no review.
        Hide
        Johannes Rudolph added a comment -

        If you happen to trip over this one: the wider issue is still not fixed if a self-type like in SI-4560 is used.

        Show
        Johannes Rudolph added a comment - If you happen to trip over this one: the wider issue is still not fixed if a self-type like in SI-4560 is used.

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Johannes Rudolph
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development