summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Namers.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-05-03 11:09:13 +0200
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-05-03 13:35:23 +0200
commit7a5aaa9e23a98d60343cc0c4411b3fc395faa3ab (patch)
tree130f26f5dac9af4498d5f4604745c9209415db02 /src/compiler/scala/tools/nsc/typechecker/Namers.scala
parent6300c3033e7b852c6cbef332af6085aac6150a70 (diff)
downloadscala-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.scala5
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 {