-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Labels
bad-testReport tests in need of updates. When closed, the tests should be considered goodReport tests in need of updates. When closed, the tests should be considered good
Description
This test doesn't account for running without sound null safety (in weak mode):
co19/LanguageFeatures/Patterns/object_A01_t05.dart
Lines 31 to 32 in 780034a
| Expect.throws(() { | |
| var Square(areaAsNull: d1 as double) = Square(2); |
From the spec:
If the runtime type of v is not a subtype of the cast type of p then throw a runtime error.
Without sound null safety Null is a bottom type (subtype of all types), so cast pattern should not throw.
Metadata
Metadata
Assignees
Labels
bad-testReport tests in need of updates. When closed, the tests should be considered goodReport tests in need of updates. When closed, the tests should be considered good