Illegal cast in switch statement for dynamic values on WASM #59782
Labels
area-dart2wasm
Issues for the dart2wasm compiler.
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
A switch statement on a
dynamic
value tries to cast the value to a type, when all (non-default) cases are matching that type.Reproducable Code:
This code works on web with JS, but fails when running with
--wasm
.Expected behaviour:
prints out
default
.Actual behaviour:
When adding a case of any other type than
String
it works.I thought this would be fixed by #56321, but this is still happening.
dart --version
output:The text was updated successfully, but these errors were encountered: