Skip to content

v0.1.43

Choose a tag to compare

@gmpassos gmpassos released this 27 Jun 06:44
· 282 commits to master since this release
a8b9a1c

Wasm backend: close several Dart → WebAssembly gaps

  • Unqualified sibling class-method calls now resolve: a method can call a
    sibling static method by bare name (dbl(x) instead of Foo.dbl(x)),
    including with named arguments and omitted default parameters.
  • String + <number> concatenation (from Java/Kotlin/C#/JS/TS, e.g.
    "n=" + n) compiles, coercing the numeric operand to a String.
  • switch on a String scrutinee (content equality) and switch on an
    enum
    scrutinee (compared by ordinal). switch on int already worked.
    Also fixes a general function-end edge case: a control construct
    (switch/if/while) that returns on all paths as the last statement (e.g.
    after a var declaration) compiled to a function that fell off its end
    without a return value.
  • Rich-enum methods that take an enum-typed parameter (double ratio(Planet p)) compile; C#/TypeScript explicit-value enums expose .value.
  • Typed catch-all clauses (on Exception catch (e) / catch (Exception e)) compile instead of failing on the declared exception type.
  • Known remaining gaps (documented, with skipped reproduction tests): Map/
    List → String coercion, generic (Box<T>) primitive fields, lambdas, and
    switch on a boxed dynamic/Object scrutinee.