New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android and scala 2.10.0-M1: Could not find method scala.collection.immutable.StringLike.toString, referenced from method scala.collection.immutable.StringLike$class.apply #5397
Comments
Imported From: https://issues.scala-lang.org/browse/SI-5397?orig=1
|
@jrudolph said: trait Parent {
override def toString = "blubber"
}
trait Simple extends Parent {
def test = toString
} Scalac generates this bytecode: public static java.lang.String test(Simple);
Code:
Stack=1, Locals=1, Args_size=1
0: aload_0
1: invokeinterface #12, 1; //InterfaceMethod Simple.toString:()Ljava/lang/String;
6: areturn where javac would normally generate an It seems that the last fix for this issue didn't solve the problem if the method was overridden in a super-interface. |
DaveScala (davescala) said: add this
to the proguard options But in milestone 5, I cannot reproduce this error. |
DaveScala (davescala) said:
It is still there. The workaround works. |
DaveScala (davescala) said:
|
loool (faez.lo) said: |
Martin Kneissl (mkneissl) said: |
Christian Braun (hcb) said: |
Sung-Ho Lee (pocorall) said: |
Sung-Ho Lee (pocorall) said: |
Antoine Dutot (Antoine) said: I found this bug trying to use Spray.http where the problem occurs in spray.http.Rendering.scala, with two traits exactly similar to the example of Johannes are used. |
Perry Nguyen (pfn) said (edited on Feb 3, 2016 12:44:08 AM UTC): |
In the android application line 88
01-21 00:31:36.339: E/AndroidRuntime(625): at
com.android.demo.notepad1.Notepadv1.fillData(Activity.scala:88)
is a runtime initialization error raised "Could not find method scala.collection.immutable.StringLike.toString, referenced from method scala.collection.immutable.StringLike$class.apply"
in
see for full logcat stacktrace(also attached):
http://groups.google.com/group/scala-internals/browse_thread/thread/9b8f2d51da6cadcc?hl=nl
attached is the zipped android app project notepadv1.zip
used:
android-sbt git cloned publish-local 0.6.1-SNAPSHOT
sbt 0.11.2
One guess to point in a direction is that this is a regression bug:
Johannes Rudolph 2:
"That seems to be the same problem which Paul already tried to fix
where an
invokeinterface
bytecode is used to calltoString()
From StringLike$class.split:
1: invokeinterface #12, 1; //InterfaceMethod
scala/collection/immutable/StringLike.toString:()Ljava/lang/String;
Strange that it has reappeared."
The text was updated successfully, but these errors were encountered: