diff options
author | Martin Odersky <odersky@gmail.com> | 2007-05-15 12:13:41 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-05-15 12:13:41 +0000 |
commit | aa5655211c441b329fc96b4282aeb713defffedd (patch) | |
tree | cb7c703bbe2931c4d78eeebdb020afdb51134fd1 /src/compiler | |
parent | 8b952a85bb34619fefd49f57f40bbfbbb380cf3d (diff) | |
download | scala-aa5655211c441b329fc96b4282aeb713defffedd.tar.gz scala-aa5655211c441b329fc96b4282aeb713defffedd.tar.bz2 scala-aa5655211c441b329fc96b4282aeb713defffedd.zip |
fixed bug1107
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Types.scala | 3 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Erasure.scala | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index 4877e89e24..26134d0087 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -1159,7 +1159,8 @@ trait Types { override val isTrivial: boolean = pre.isTrivial && !sym.isTypeParameter && args.forall(.isTrivial) - override def isNotNull = sym.isModuleClass || sym == AllClass + override def isNotNull = + sym.isModuleClass || sym == AllClass || isValueClass(sym) || super.isNotNull // @M: propagate actual type params (args) to `tp', by replacing formal type parameters with actual ones def transform(tp: Type): Type = diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala index 69d5b4ae9b..1acaee1fa8 100644 --- a/src/compiler/scala/tools/nsc/transform/Erasure.scala +++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala @@ -90,8 +90,10 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer { else if (clazz == ArrayClass) List(erasedTypeRef(ObjectClass)) else removeDoubleObject(parents map this), decls, clazz) + case NotNullType(tp) => + apply(tp) case _ => - mapOver(tp)/*.normalize MARTIN: I don't think this is needed?*/ + mapOver(tp) } } } |