Permalink
Browse files

A little sketchiness in recent commit.

Retro-reviewing.
  • Loading branch information...
paulp committed May 8, 2012
1 parent 8e88e5b commit aa555debf77eeec3a72a1d700f06347d2e489299
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/compiler/scala/reflect/internal/Definitions.scala
@@ -435,7 +435,7 @@ trait Definitions extends reflect.api.StandardDefinitions {
case _ => false
}
def isReferenceArray(tp: Type) = tp match {
- case TypeRef(_, ArrayClass, arg :: Nil) => arg.typeSymbol.info <:< AnyRefClass.tpe
+ case TypeRef(_, ArrayClass, arg :: Nil) => arg <:< AnyRefClass.tpe
case _ => false
}
def isArrayOfSymbol(tp: Type, elem: Symbol) = tp match {

2 comments on commit aa555de

@odersky

This comment has been minimized.

Show comment
Hide comment
@odersky

odersky May 8, 2012

Contributor

I think it's more robust to say:

case TypeRef(_, ArrayClass, List(arg)) => arg.normalize.typeSymbol isSubClass ObjectClass

Contributor

odersky replied May 8, 2012

I think it's more robust to say:

case TypeRef(_, ArrayClass, List(arg)) => arg.normalize.typeSymbol isSubClass ObjectClass

@paulp

This comment has been minimized.

Show comment
Hide comment
@paulp

paulp May 8, 2012

Contributor

I would really like to know under what circumstances they could give different results. (I'm not saying they don't; I am saying I would really like to know.)

Contributor

paulp replied May 8, 2012

I would really like to know under what circumstances they could give different results. (I'm not saying they don't; I am saying I would really like to know.)

Please sign in to comment.