diff options
author | Paul Phillips <paulp@improving.org> | 2012-04-14 06:16:32 +0100 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-04-16 04:14:54 +0100 |
commit | 4a6f54b5f16b3179b23a44f2f1d83f080e218f72 (patch) | |
tree | 9d68580b78f9da34f4b90a90f1eb10182c4cd6c7 /src/compiler/scala/tools/nsc/interpreter/RichClass.scala | |
parent | 364dd41c3e0e33afe6c3ec6e0c04f1d345c4b6ca (diff) | |
download | scala-4a6f54b5f16b3179b23a44f2f1d83f080e218f72.tar.gz scala-4a6f54b5f16b3179b23a44f2f1d83f080e218f72.tar.bz2 scala-4a6f54b5f16b3179b23a44f2f1d83f080e218f72.zip |
New facility: TypeDestructurers.
Would prefer to bake a little longer, but, scala days.
More elaboration to come.
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/RichClass.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/RichClass.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/RichClass.scala b/src/compiler/scala/tools/nsc/interpreter/RichClass.scala index 59a7b9b5d2..b1bee6ce93 100644 --- a/src/compiler/scala/tools/nsc/interpreter/RichClass.scala +++ b/src/compiler/scala/tools/nsc/interpreter/RichClass.scala @@ -13,7 +13,10 @@ class RichClass[T](val clazz: Class[T]) { // Sadly isAnonymousClass does not return true for scala anonymous // classes because our naming scheme is not doing well against the // jvm's many assumptions. - def isScalaAnonymous = clazz.isAnonymousClass || (clazz.getName contains "$anon$") + def isScalaAnonymous = ( + try clazz.isAnonymousClass || (clazz.getName contains "$anon$") + catch { case _: java.lang.InternalError => false } // good ol' "Malformed class name" + ) /** It's not easy... to be... me... */ def supermans: List[Manifest[_]] = supers map (_.toManifest) |