Lasse R.H. Nielsen
Lasse R.H. Nielsen
This is a known issue. The upper bound of `bool` and `dynamic` is `dynamic`, which is assignable to `int`. The easiest fix to the language would be ["Always coerce before...
The only contract between a caller and the called function is the function type. Hanging more information onto boolean results (or null/non-null results), so that the caller knows something more...
- Option 3: Give `C` a `noSuchMethod`-thrower for every inaccessible member of its interface that it doesn't have a valid implementation of. That's what we do if there is no...
> (My 'Option 1' includes giving C a noSuchMethod-thrower.) Well, doh. Then "Option 1" it is!
> "OK, but then we just rename `A` into `_A`, and then no accessible class has an unimplemented interface member." `typedef A = _A;` :stuck_out_tongue: Defining whether a class is...
Dart getters are "functions" in the sense that they can do and return anything. Non-local variable declarations introduce getters which just return the content of the field. The compiler might...
See also #3059. If `(e1 case p when e2)` was an expression, with its variables available in the same scope as its promotions, then a lot of things would become...
The pattern would contain a declaration that introduces a name in the scope, and it would be closer than a declaration further out, so it wins if it is in...
Not sure this is something I'd want to solve at the language level. You have something which is not *just* a string, it's a password. As @jakemac53 suggests, wrapping it...
A virtual method is late-bound, the actual implementation chosen based on the runtime type of the receiver it's called on. An interface method is basically the same in Dart. (Java...