Lasse R.H. Nielsen

Results 1134 comments of Lasse R.H. Nielsen

Or, as you pointed out, `if (foo case FooImpl()) { ... }` will promote `foo` to `FooImpl`. We could, safely and soundly, allow `if (foo is FooImpl)` to promote `foo`...

This is effectively asking for less than #649, that the URI `package:foo` is accepted and treated as equivalent to (or normalized to) `package:foo/foo.dart`. It's not impossible. It requires adding a...

It's not allowed because it's impossible to represent the extension-type erased representation type in the current Dart type system. Dart would have to add recursive types to the type system...

Are there other paces where the expression has a requirement that doesn't match its context type? The RHS of `==` seems to be `dynamic`/`_`, not parameter type of LHS's `operator==`...

One reason that Dart only allows promotion to a subtype is that it makes assignability understandable. If we could "promote" a variable to an arbitrary type, unrelated to the declared...

ACK. The compiler is being a little obtuse about raw types in some (most) cases. It also affects code like `List l = [];` where the compiler could infer `List`....

Putting the constructor documentation into the class documentation worked for Kotlin because they have doc-tags like `@param` and `@return` to say that the next paragraph applies to a specific part...

> To me it's counter intuitive that we don't allow: > ```dart > class Foo { > Foo({ > // Allow the IDE to still show docs > /// Documentation...

As I read it, you're asking for libraries to have a global namespace, where each library has a unique name. And there is no suggestion for how to map from...

A problem is that the `operatingSystem` value cannot be `const` if code can be compiled in a way that can run on different platforms. Then the value isn't available until...