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

liftcode's free locals traverser crashes on reference to mutable var of type Unit

    Details

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

      Description

      scala> def bar = { var x = () ; def foo() = x}
      java.util.NoSuchElementException: key not found: class Unit
      	at scala.collection.MapLike$class.default(MapLike.scala:222)
      	at scala.collection.AbstractMap.default(Map.scala:57)
      	at scala.collection.MapLike$class.apply(MapLike.scala:135)
      	at scala.collection.AbstractMap.apply(Map.scala:57)
      	at scala.tools.nsc.transform.LiftCode$Codifier$$anon$1$$anonfun$traverse$5.refType$1(LiftCode.scala:174)
      

        Activity

        Hide
        Commit Message Bot added a comment -

        (burmako in r26087) Added the check against UnitClass in freeLocalsTraverser.
        Closes SI-5245. Review by odersky.

        Show
        Commit Message Bot added a comment - (burmako in r26087 ) Added the check against UnitClass in freeLocalsTraverser. Closes SI-5245 . Review by odersky.

          People

          • Assignee:
            Eugene Burmako
            Reporter:
            Adriaan Moors
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development