diff options
author | schinz <schinz@epfl.ch> | 2005-04-03 07:51:38 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2005-04-03 07:51:38 +0000 |
commit | f0663f5fd7b5c3ffb5b3066228ca3a97cd674b0a (patch) | |
tree | 1e61d196ce9efee1720f0d00928ae1bd30bcdd5c /sources | |
parent | 0d0172cb8223dbf9a184fd3cb4e1162551f59cef (diff) | |
download | scala-f0663f5fd7b5c3ffb5b3066228ca3a97cd674b0a.tar.gz scala-f0663f5fd7b5c3ffb5b3066228ca3a97cd674b0a.tar.bz2 scala-f0663f5fd7b5c3ffb5b3066228ca3a97cd674b0a.zip |
- use asInstanceOf$erased when possible (i.e.
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/List.scala | 2 | ||||
-rw-r--r-- | sources/scala/runtime/ScalaRunTime.scala | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sources/scala/List.scala b/sources/scala/List.scala index e4a109852d..0de3ba50b2 100644 --- a/sources/scala/List.scala +++ b/sources/scala/List.scala @@ -22,7 +22,7 @@ object List { * @param xs the elements to put in the list * @return the list containing elements xs. */ - def apply[A](xs: A*): List[A] = xs.asInstanceOf[List[A]]; + def apply[A](xs: A*): List[A] = xs.asInstanceOf$erased[List[A]]; /** Create a sorted list of all integers in a range. * diff --git a/sources/scala/runtime/ScalaRunTime.scala b/sources/scala/runtime/ScalaRunTime.scala index b2920999e6..a9fc226ea3 100644 --- a/sources/scala/runtime/ScalaRunTime.scala +++ b/sources/scala/runtime/ScalaRunTime.scala @@ -25,7 +25,7 @@ object ScalaRunTime { def Catch[b >: a](handler: PartialFunction[Throwable, b]): b = if (exception == null) - result.asInstanceOf[b] + result.asInstanceOf$erased[b] // !!! else if (exception is LocalReturn) // !!! // ... else if (handler isDefinedAt exception) @@ -35,7 +35,7 @@ object ScalaRunTime { def Finally(handler: Unit): a = if (exception == null) - result.asInstanceOf[a] + result.asInstanceOf$erased[a] else throw exception; } |