This page is no longer maintained — Please continue to the home page at www.scala-lang.org

IllegalArgumentException while opening Array.class

No replies
Grzegorz Kossakowski
Joined: 2009-01-28,
User offline. Last seen 42 years 45 weeks ago.

Hello,

I discovered problem in latest snapshot of Eclipse plug-in. To reproduce it, create hello world Scala application then
try to use hyperlinking feature to jump to definition of Array:
def main(args : Array[String]) : Unit = {
println("HelloWorld")
}

When you hold crtl and try to click on Array you will get:
java.lang.IllegalArgumentException
at org.eclipse.jdt.internal.core.util.Util.scanTypeSignature(Util.java:2702)
at org.eclipse.jdt.internal.core.util.Util.scanArrayTypeSignature(Util.java:2768)
at org.eclipse.jdt.internal.core.util.Util.scanTypeSignature(Util.java:2679)
at org.eclipse.jdt.internal.core.util.Util.scanTypeArgumentSignature(Util.java:3031)
at org.eclipse.jdt.internal.core.util.Util.scanTypeArgumentSignatures(Util.java:2995)
at org.eclipse.jdt.internal.core.util.Util.scanClassTypeSignature(Util.java:2894)
at org.eclipse.jdt.internal.core.util.Util.scanTypeSignature(Util.java:2682)
at org.eclipse.jdt.core.Signature.getReturnType(Signature.java:1644)
at org.eclipse.jdt.core.Signature.getReturnType(Signature.java:1657)
at org.eclipse.jdt.internal.core.BinaryMethod.getReturnType(BinaryMethod.java:423)
at org.eclipse.jdt.internal.core.BinaryMethod.getReturnType(BinaryMethod.java:415)
at org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabelComposer.appendMethodLabel(JavaElementLabelComposer.java:461)
at org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabelComposer.appendElementLabel(JavaElementLabelComposer.java:236)
at org.eclipse.jdt.ui.JavaElementLabels.getElementLabel(JavaElementLabels.java:521)
at org.eclipse.jdt.ui.JavaElementLabels.getStyledElementLabel(JavaElementLabels.java:496)
at org.eclipse.jdt.ui.JavaElementLabels.getStyledTextLabel(JavaElementLabels.java:424)
[...]

I've tried to debug this problem and it turned out to be a problem in compiler and not in Eclipse plug-in itself. For
details about this problem have a look here:
https://lampsvn.epfl.ch/trac/scala/ticket/2334

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland