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

Try statement: Non-normative text in spec does not match the actual VM behaviour #1382

Closed
DartBot opened this issue Jan 30, 2012 · 2 comments
Labels
closed-duplicate Closed in favor of an existing report

Comments

@DartBot
Copy link

DartBot commented Jan 30, 2012

This issue was originally filed by rodion...@unipro.ru


Not sure whether this is a bug or the spec is incorrect

The very end of ch. 11.9:
If an exception is raised during execution of a catch clause, this will transfer control to the handler for the fi nally clause, causing the fi nally clause to execute in this case as well.

yet the following test fails at the isTrue check:

void main() {
  bool flag = false;
  
  var exStr = "foo", exInt = 2;
  try {
    try {
      throw exStr;
    } catch(String s) {
      throw exInt;
    } catch(int i) {
      Expect.fail("This code shouldn't be executed");
    } catch(var v) {
      Expect.fail("This code shouldn't be executed");
    } finally {
      flag = true;
    }
  } catch (var ok) {
    Expect.equals(exInt, ok);
  }

  Expect.isTrue(flag);
}

@DartBot
Copy link
Author

DartBot commented Jan 30, 2012

This comment was originally written by rodion...@unipro.ru


looks like a duplicate of issue #430
my bad!

@dgrove
Copy link
Contributor

dgrove commented Feb 1, 2012

Added Duplicate label.
Marked as being merged into #430.

@DartBot DartBot added Type-Defect closed-duplicate Closed in favor of an existing report labels Feb 1, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

2 participants