diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-03 11:09:13 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-03 13:35:23 +0200 |
commit | 7a5aaa9e23a98d60343cc0c4411b3fc395faa3ab (patch) | |
tree | 130f26f5dac9af4498d5f4604745c9209415db02 /src/compiler/scala/tools/nsc/typechecker/Namers.scala | |
parent | 6300c3033e7b852c6cbef332af6085aac6150a70 (diff) | |
download | scala-7a5aaa9e23a98d60343cc0c4411b3fc395faa3ab.tar.gz scala-7a5aaa9e23a98d60343cc0c4411b3fc395faa3ab.tar.bz2 scala-7a5aaa9e23a98d60343cc0c4411b3fc395faa3ab.zip |
SI-5703: normalize refined types more
to improve Array[T] java-interop with T[],
normalize Object with Object{} to Object
fix #SI-5688 by flattening refined types in parents
updated check files to reflect flattening of refined types and updated position for refined types
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 45f7d7e618..4e7dac890b 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -1347,6 +1347,11 @@ trait Namers extends MethodSynthesis { /** Convert Java generic array type T[] to (T with Object)[] * (this is necessary because such arrays have a representation which is incompatible * with arrays of primitive types.) + * + * @note the comparison to Object only works for abstract types bounded by classes that are strict subclasses of Object + * if the bound is exactly Object, it will have been converted to Any, and the comparison will fail + * + * see also sigToType */ private object RestrictJavaArraysMap extends TypeMap { def apply(tp: Type): Type = tp match { |