Paul Berry

Results 149 comments of Paul Berry

We discussed this in today's language team meeting and decided to go with option 3: Change the behavior of irrefutable patterns so that they can promote the scrutinee or its...

At first glance, this sounds like a really cool idea. I'm curious to play around with it more and try to understand its uses and limitations. > To get the...

> [@stereotype441](https://github.com/stereotype441), [@johnniwinther](https://github.com/johnniwinther), what do you think about the analysis of dead code? Should we try to come up with a well-specified treatment, or should we just stop writing tests...

> [@stereotype441](https://github.com/stereotype441), is it fair to say that this issue can now be considered to be a request for adjustments to the [feature specification](https://github.com/dart-lang/language/blob/main/resources/type-system/flow-analysis.md), as mentioned [here](https://github.com/dart-lang/language/issues/4413)? > > If...

I would be open to the possibility of fixing the implementations to match the spec, provided that (a) we do the fix in a language-versioned way, so that users have...

@leafpetersen > If I understand this correctly, I think this would introduce a new situation in which we can promote a variable to a type which is not a subtype...

@leafpetersen > > So in your example above, even if we say that `o is int` makes `int?` a type of interest, that will have no effect on this particular...

@lrhn > Whether we filter types of interest at the type-check point or the assignment point, we should never actually use a type of interest which is not a subtype...

@leafpetersen > [@stereotype441](https://github.com/stereotype441) thanks, that helps. > > Stepping up a level, I don't really have strong feelings here, but I admit to having a hard time formulating a crisp...

> @stereotype441 Thoughts on this? I think one possible way to enable this would be to add "intermediate" types to the promotion stack when promoting. That is, when promoting from...