[dart2wasm] Support IntersectionType in translateStorageType

Fixes breakage of barista3 introduced in
https://dart-review.googlesource.com/c/sdk/+/253665

Change-Id: Ia4a6bf4da51d450de4184c7daff50aa9f3848df5
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255996
Reviewed-by: Joshua Litt <joshualitt@google.com>
This commit is contained in:
Aske Simon Christensen 2022-08-23 10:20:00 +00:00 committed by Commit Bot
parent 2559aba219
commit 7aebb788bf

View file

@ -585,6 +585,9 @@ class Translator {
? type.bound.withDeclaredNullability(type.nullability)
: type.bound);
}
if (type is IntersectionType) {
return translateStorageType(type.left);
}
if (type is FutureOrType) {
return topInfo.typeWithNullability(type.isPotentiallyNullable);
}