Lasse R.H. Nielsen

Results 1278 comments of Lasse R.H. Nielsen
trafficstars

`SynchronousFuture.then` _is_ an invalid implementation of to the `Future` API, so there is no guarantee that anything works with it, including `await`. I'd say that the behavior of `await` of...

> I believe the crux of the issue is that the results of executing await and then on a SynchronousFuture are different The Crux is that `SynchronousFuture`'s behavior is not...

This is a request for static nested classes. Effectively it only uses the outer class as a namespace, and it has the static members of the outer class in scope....

@Levi-Lesches > haven't tested this but I think that should work. Narrator voice: "It didn't." You can't do `export ... as`. The import namespaces you get from `import ... as`...

@lukehutch What you describe here is *non-static* inner classes, often just called "inner classes". Every *instance* of such an inner class has a reference to an *instance* of the outer...

Static inner classes essentially nested namespaces. The usual "zero, one or an infinite amount of any feature" applies. Dart currently allow one nesting of namespaces (which is why you can...

The `Outer`/`Inner` example doesn't work as a constructor unless `Inner` implements `Outer`. In neither case can you nest the actual _type_. Consider an example like ```dart abstract interface class Map...

The solution today is to do: ```dart try { // code. } on Error { rethrow; } catch (e) { // Not error } ``` Making it invalid to throw...

> For example, if `X` is a type variable whose value is `Map`, `foo()` would be the same as `foo()`. (where `X` has a bound that ensures it implements `Map`...

Seems likely from the description. Let's see if it's something we want to land, and won't break too many fragile tests. For now it seems to *work* at least. (Edit:...