Commit Graph

3 Commits

Author SHA1 Message Date
Johnni Winther 4948c31b7a [test_runner] Support detection of CFE warnings
+ some test expectation fixes

Change-Id: Ibf0259914960ea25978f2b8e29aa89336e209f2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162321
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-15 07:57:31 +00:00
Konstantin Shcheglov 6d9a4f16dd Issue 42757. Implement null spread element typing with null-safety.
Bug: https://github.com/dart-lang/sdk/issues/42757
Change-Id: I6c0080402d8eb13aef8097ecf70025736002c3d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-23 22:36:48 +00:00
Erik Ernst bf814cfe61 Add test for null spread element typing with null-safety
A spread element in a collection literal, e.g., `[...e]` or `{...?e}`,
can have an `e` of type `Null` or a subtype thereof. This CL adds a test
where this situation is created for different types (`Null`, `Never`,
`X extends Null`) with different collection literals, and with and
without elements of other types. In general, the spread does not
contribute any elements, and hence the element/key/value type is `Never`
such that it has no effect on the element/key/value type of the
collection.

Cf. https://github.com/dart-lang/language/pull/1079.

Change-Id: Ib760bcba18045b1afaa50f65c0e7d0a7fe9a8ab6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154693
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-07-20 08:06:44 +00:00