[#370] | project: compiler | priority: high | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Stephane | Martin | fixed | 2004-10-13 11:09:23.0 | |
subject | ArrayIndexOutOfBoundsException in UnCurry phase | |||
code |
class Foo { val cl: ClassLoader = null; // cl.loadClass("Bar"); // this is OK ! cl.loadClass("", "Bar"); } |
|||
what happened | Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 at scala.tools.scalac.transformer.UnCurry$class. scala$tools$scalac$transformer$UnCurry$transformArgs(UnCurry.scala:226) at scala.tools.scalac.transformer.UnCurry$class. transform(UnCurry.scala:160) at scalac.transformer.OwnerTransformer. transform(OwnerTransformer.java:41) at scala.tools.scalac.transformer.UnCurry$class. transform(UnCurry.scala:389) [..] |
|||
what expected | Silently compile! | |||
[back to overview] |
Stephane edited on 2004-10-13 16:41:05.0 |
Burak edited on 2004-10-21 17:07:05.0 |
ClassLoader::loadClass should have type
(String, boolean)Class AND (String):Class (it is overloaded) and then be resolved to (String,boolean)Class
But some debug output in transformArgs reveals:
uncurry, args.length = 2, params.length = 1, methtype:(java.lang.String)java.lang.Class
This means the typechecker has picked the wrong alternative for some reason.
|
Stephane edited on 2004-10-26 15:34:07.0 |
Fixed in CVS revision 1.98 |
Stephane edited on 2004-10-26 15:34:24.0 |