Skip to content

Bug in DDC switch+loop+continue #59593

@lrhn

Description

@lrhn

There are new test failures on Remove unnecessary leftover @dart=2.19 from tests..

The test

language/switch/case_fallthrough__test

is failing on configuration

ddc-linux-chrome-try

See: https://ci.chromium.org/ui/p/dart/builders/try/ddc-linux-chrome-try/11688/overview

The test contains a do { switch (x) { ... case 3: ... continue; } } while (false); where appears the continue makes DDC continue the do loop from the start, not from the condition. That makes it go into an infinite loop when x == 3.
A continue inside a loop, targeting the loop, should be equivalent to breaking the body of the loop, going to the test (or increment+test for for loops). Since the test here is false, it shouldn't loop.

Metadata

Metadata

Assignees

Labels

area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)web-dev-compiler

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions