diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2008-05-19 15:26:57 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2008-05-19 15:26:57 +0000 |
commit | 617eafd6e8aa2bec753f9cf1663bedfb4c200733 (patch) | |
tree | 6901c1e96eac57d983beb254477d6e8afbb295dc /src/compiler | |
parent | da769bad0357a0e927e14cc143bbb11cfc076b9f (diff) | |
download | scala-617eafd6e8aa2bec753f9cf1663bedfb4c200733.tar.gz scala-617eafd6e8aa2bec753f9cf1663bedfb4c200733.tar.bz2 scala-617eafd6e8aa2bec753f9cf1663bedfb4c200733.zip |
Fixed #673.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 1 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index 1293d9290b..8bccaf092b 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -758,6 +758,7 @@ abstract class ClassfileParser { if ((jflags & JAVA_ACC_STATIC) != 0) { val innerVal = staticModule.newValue(NoPosition, pool.getName(nameIndex).toTermName) .setInfo(pool.getClassSymbol(innerIndex).linkedModuleOfClass.moduleClass.thisType) + .setFlag(JAVA | MODULE) staticDefs.enter(innerVal) } } diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 027aa4ff7e..341131e48c 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -496,7 +496,7 @@ trait Typers { self: Analyzer => if (tree.tpe.isError) tree else if ((mode & (PATTERNmode | FUNmode)) == PATTERNmode && tree.isTerm) { // (1) checkStable(tree) - } else if ((mode & (EXPRmode | QUALmode)) == EXPRmode && !sym.isValue) { // (2) + } else if ((mode & (EXPRmode | QUALmode)) == EXPRmode && !sym.isValue && !phase.erasedTypes) { // (2) errorTree(tree, sym+" is not a value") } else { if (sym.isStable && pre.isStable && tree.tpe.typeSymbol != ByNameParamClass && |