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

Compiler Crash - trait method with Symbol parameter and default value

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.0
    • Fix Version/s: None
    • Component/s: Compiler (Misc)
    • Environment:

      java 1.6.0_24 on Mac OS 10.6.7. sbt 0.7.7 and 0.10.1

      Description

      The following source

      trait Test1 {
       def m1(sym: Symbol = 'TestSym)
      }
      

      crashes the compiler:

      uncaught exception during compilation: java.util.NoSuchElementException
      error: java.util.NoSuchElementException
      	at scala.collection.LinearSeqOptimized$class.last(LinearSeqOptimized.scala:135)
      	at scala.collection.immutable.List.last(List.scala:77)
      	at scala.tools.nsc.backend.icode.Members$IMethod.lastBlock(Members.scala:159)
      	at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.addStaticInit(GenJVM.scala:995)
      	at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$genClass$1.apply(GenJVM.scala:445)
      	at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$genClass$1.apply(GenJVM.scala:445)
      [...]
      

        Attachments

          Activity

            People

            • Assignee:
              rytz Lukas Rytz
              Reporter:
              scimonkey John Bruce
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: