dart-lang / code_builder

A fluent API for generating valid Dart source code
https://pub.dev/packages/code_builder
BSD 3-Clause "New" or "Revised" License
427 stars 66 forks source link

Failing test for assigning to nullable typed var #401

Closed natebosch closed 1 year ago

natebosch commented 1 year ago

Towards #315

Add a skipped test which demonstrates that the nullability of a type reference is ignored when emitting a variable assignment.

natebosch commented 1 year ago

Too bad we can't pass a failing: true argument. But this works.

Yeah, it's been discussed a few times. Most recently at https://github.com/dart-lang/test/issues/1832

adding a skipped test doesn't do...a lot.

It avoids the small amount of work already done to confirm that the bug exists in the new APIs.