Skip to content
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

Incorrect bytecode with aggresive inliner #6248

Closed
scabug opened this issue Aug 16, 2012 · 2 comments
Closed

Incorrect bytecode with aggresive inliner #6248

scabug opened this issue Aug 16, 2012 · 2 comments

Comments

@scabug
Copy link

scabug commented Aug 16, 2012

Filed against my branch VladUreche/scala/issue/4767-redo:

$ cat test.scala

package scala {
  trait Function1[@specialized(scala.Long) -T1, @specialized(scala.Unit) +R] extends AnyRef { self =>
    def apply(v1: T1): R
  }
}

package Test {
  abstract class SL[A] extends Function1[Int, A] { self =>
    def apply(idx: Int): A
    def view = new Function1[Int, A] {
      def apply(idx: Int) = self.apply(idx)
    }
  }
}

$ rm -rf classes/* && build/quick/bin/scalac test.scala -d classes -Yclosure-elim -Yinline

$ java -cp classes Test.SL\$\$anon\$1
Exception in thread "main" java.lang.VerifyError: (class: Test/SL$$anon$1, method: apply$mcVJ$sp signature: (J)V) Expecting to find integer on stack
Could not find the main class: Test.SL$$anon$1.  Program will exit.
@scabug
Copy link
Author

scabug commented Aug 16, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6248?orig=1
Reporter: @VladUreche
Assignee: @magarciaEPFL
See #6547

@scabug
Copy link
Author

scabug commented Oct 29, 2012

@magarciaEPFL said:
Apparently duplicates.
If so , this fix applies to both tickets:
scala/scala#1533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant