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

Constant propagation optimization in 2.11 generates incorrect code in exception handler #9806

Closed
scabug opened this issue Jun 7, 2016 · 3 comments

Comments

@scabug
Copy link

scabug commented Jun 7, 2016

object Ex extends Exception
object Test {
	def main(args: Array[String]) {
    try foo catch { case Ex => }
  }

  def isTrue(b: Boolean) = b
  def foo = {
    var streamErrors1 = true
    try {
      streamErrors1 = false
      throw Ex
    } catch {
      case ex if streamErrors1 =>
        assert(isTrue(streamErrors1))
    }
  }
}
@scabug
Copy link
Author

scabug commented Jun 7, 2016

Imported From: https://issues.scala-lang.org/browse/SI-9806?orig=1
Reporter: @retronym
Affected Versions: 2.11.8

@scabug
Copy link
Author

scabug commented Jun 7, 2016

@retronym said:
Thanks [~alex_ndc] for reporting this problem, as seen in Monix.

@scabug
Copy link
Author

scabug commented Jun 7, 2016

@retronym said:
scala/scala#5218

@scabug scabug closed this as completed Oct 18, 2016
@scabug scabug added this to the 2.11.9 milestone Apr 7, 2017
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

2 participants