Added the check against UnitClass in freeLocalsTraverser.
Closes SI-5245. Review by odersky. git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26087 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
ed167e7120
commit
64aab2b68a
|
|
@ -226,7 +226,7 @@ abstract class LiftCode extends Transform with TypingTransformers {
|
|||
val symClass = symTpe.typeSymbol
|
||||
atPhase(phase.next) {
|
||||
def refType(valueRef: Map[Symbol, Symbol], objectRefClass: Symbol) =
|
||||
if (isValueClass(symClass)) valueRef(symClass).tpe
|
||||
if (isValueClass(symClass) && symClass != UnitClass) valueRef(symClass).tpe
|
||||
else appliedType(objectRefClass.typeConstructor, List(symTpe))
|
||||
|
||||
sym updateInfo (
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
object Foo {
|
||||
def bar = { var x = (); def foo() = x }
|
||||
}
|
||||
Loading…
Reference in New Issue