mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 14:32:24 +00:00
Extension type. Explicit unit test for isAlwaysExhaustive().
Change-Id: Ia589e9c81ab1d73fe0c31d8ec526405b854cf352 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351161 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
4fb4bdd24a
commit
ee2754bac2
1 changed files with 20 additions and 0 deletions
|
@ -51,6 +51,26 @@ class IsAlwaysExhaustiveTest extends AbstractTypeSystemTest {
|
|||
isAlwaysExhaustive(interfaceTypeQuestion(E));
|
||||
}
|
||||
|
||||
test_extensionType() {
|
||||
isAlwaysExhaustive(
|
||||
interfaceTypeNone(
|
||||
extensionType('A', representationType: boolNone),
|
||||
),
|
||||
);
|
||||
|
||||
isAlwaysExhaustive(
|
||||
interfaceTypeNone(
|
||||
extensionType('A', representationType: boolQuestion),
|
||||
),
|
||||
);
|
||||
|
||||
isNotAlwaysExhaustive(
|
||||
interfaceTypeNone(
|
||||
extensionType('A', representationType: intNone),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
test_futureOr() {
|
||||
isAlwaysExhaustive(futureOrNone(boolNone));
|
||||
isAlwaysExhaustive(futureOrQuestion(boolNone));
|
||||
|
|
Loading…
Reference in a new issue