Version 2.19.0-274.0.dev
Merge 5b2e23eab0e48d88c2e08dcf7c2fd05566fde696 into dev
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4d831d3..99bf2e5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -159,6 +159,20 @@
- Remove remaining support for `.packages` files. The flag
`--legacy-packages-file` is no longer supported.
- Support a new field `funding` in pubspec.yaml.
+- Validate the CRC32c checksum of downloaded archives and retry on failure.
+- `dart pub add foo:<constraint>` with an existing dependency will now update
+ the constraint rather than fail.
+- Update `dart pub publish` to allow `dependency_overrides` in pubspec.yaml.
+ They will still cause a publication warning.
+ Note that only `dependency_overrides` from the root package effect resolution.
+- Update `dart pub publish` to require a working resolution.
+ If publishing a breaking release of mutually dependent packages use `dependency_overrides`
+ to obtain a resolution.
+- `dart pub get` now fails gracefully when run from inside the pub-cache.
+- `dart pub publish` now shows the file sizes of large files in your package to
+ prevent accidental publication of large unrelated files.
+- Fix a bug in `dart pub upgrade --major-versions` where packages not requiring
+ major updates would be held back unless needed.
#### dart2js
diff --git a/DEPS b/DEPS
index db88222..d86fdec 100644
--- a/DEPS
+++ b/DEPS
@@ -139,7 +139,7 @@
"ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
"pool_rev": "fa84ddd0e39f45bf3f09dcc5d6b9fbdda7820fef",
"protobuf_rev": "1d175bef6043bc4bdef5970f6dbd6d3001124373",
- "pub_rev": "ec35d46261b610e558dfd0d8525ca3fc8387b4b7", # manually rev'd
+ "pub_rev": "28a2503d7f4806e6854e3ed0d783f065abfd1b5f", # manually rev'd
"pub_semver_rev": "9fd28757ba45961ac5449e0f2b0020670e921475",
"root_certificates_rev": "692f6d6488af68e0121317a9c2c9eb393eb0ee50",
"shelf_rev": "39d820d4e32fc99c65f562786097487d597dcee1",
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/class_member_parser.dart b/pkg/_fe_analyzer_shared/lib/src/parser/class_member_parser.dart
index 773275a..26af5f2 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/class_member_parser.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/class_member_parser.dart
@@ -15,7 +15,8 @@
class ClassMemberParser extends Parser {
Parser? skipParser;
- ClassMemberParser(super.listener, {super.useImplicitCreationExpression});
+ ClassMemberParser(super.listener,
+ {super.useImplicitCreationExpression, super.allowPatterns});
@override
Token parseExpression(Token token) {
@@ -34,7 +35,8 @@
// When the parser supports not doing token stream rewriting, use that
// feature together with a no-op listener instead.
this.skipParser ??= new Parser(new ErrorDelegationListener(listener),
- useImplicitCreationExpression: useImplicitCreationExpression);
+ useImplicitCreationExpression: useImplicitCreationExpression,
+ allowPatterns: allowPatterns);
Parser skipParser = this.skipParser!;
skipParser.mayParseFunctionExpressions = mayParseFunctionExpressions;
skipParser.asyncState = asyncState;
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart b/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart
index a7cd257..65dbb99 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart
@@ -58,6 +58,7 @@
Labels,
Metadata,
MixinApplicationBuilder,
+ MatcherList,
Modifiers,
Name,
OperatorList,
diff --git a/pkg/_fe_analyzer_shared/test/inheritance/data/object_opt_in/core.dart b/pkg/_fe_analyzer_shared/test/inheritance/data/object_opt_in/core.dart
index ceda8df..57971f7 100644
--- a/pkg/_fe_analyzer_shared/test/inheritance/data/object_opt_in/core.dart
+++ b/pkg/_fe_analyzer_shared/test/inheritance/data/object_opt_in/core.dart
@@ -78,3 +78,7 @@
/*class: Invocation:Invocation,Object*/
class Invocation {}
+
+/*cfe|cfe:builder.class: Record:Object,Record*/
+/*analyzer.class: Record:Record,Object*/
+class Record {}
diff --git a/pkg/_fe_analyzer_shared/test/inheritance/data/object_opt_out/core.dart b/pkg/_fe_analyzer_shared/test/inheritance/data/object_opt_out/core.dart
index f3d77df..051358b 100644
--- a/pkg/_fe_analyzer_shared/test/inheritance/data/object_opt_out/core.dart
+++ b/pkg/_fe_analyzer_shared/test/inheritance/data/object_opt_out/core.dart
@@ -83,3 +83,7 @@
/*class: Invocation:Invocation,Object*/
class Invocation {}
+
+/*analyzer.class Record:Record,Object*/
+/*cfe|cfe:builder.class: Record:Object,Record*/
+class Record {}
diff --git a/pkg/dart2wasm/lib/code_generator.dart b/pkg/dart2wasm/lib/code_generator.dart
index f369957..b7e46db 100644
--- a/pkg/dart2wasm/lib/code_generator.dart
+++ b/pkg/dart2wasm/lib/code_generator.dart
@@ -53,9 +53,17 @@
w.Local? preciseThisLocal;
w.Local? returnValueLocal;
final Map<TypeParameter, w.Local> typeLocals = {};
- final List<TryBlockFinalizer> finalizers = [];
+
+ /// Finalizers to run on `return`.
+ final List<TryBlockFinalizer> returnFinalizers = [];
+
+ /// Finalizers to run on a `break`. `breakFinalizers[L].last` (which should
+ /// always be present) is the `br` target for the label `L` that will run the
+ /// finalizers, or break out of the loop.
+ final Map<LabeledStatement, List<w.Label>> breakFinalizers = {};
+
final List<w.Label> tryLabels = [];
- final Map<LabeledStatement, w.Label> labels = {};
+
final Map<SwitchCase, w.Label> switchLabels = {};
/// Maps a switch statement to the information used when doing a backward
@@ -726,15 +734,15 @@
@override
void visitLabeledStatement(LabeledStatement node) {
w.Label label = b.block();
- labels[node] = label;
+ breakFinalizers[node] = <w.Label>[label];
visitStatement(node.body);
- labels.remove(node);
+ breakFinalizers.remove(node);
b.end();
}
@override
void visitBreakStatement(BreakStatement node) {
- b.br(labels[node.target]!);
+ b.br(breakFinalizers[node.target]!.last);
}
@override
@@ -867,30 +875,64 @@
@override
void visitTryFinally(TryFinally node) {
- // We lower a [TryFinally] to three nested blocks, and we emit the finalizer
- // up to three times. Once in a catch, to handle the case where the try
+ // We lower a [TryFinally] to a number of nested blocks, depending on how
+ // many different code paths we have that run the finally block.
+ //
+ // We emit the finalizer once in a catch, to handle the case where the try
// throws. Once outside of the catch, to handle the case where the try does
- // not throw. Finally, if there is a return within the try block, then we
- // emit the finalizer one more time along with logic to continue walking up
- // the stack.
+ // not throw. If there is a return within the try block, then we emit the
+ // finalizer one more time along with logic to continue walking up the
+ // stack.
+ //
+ // A `break L` can run more than one finalizer, and each of those
+ // finalizers will need to be run in a different `try` block. So for each
+ // wrapping label we generate a block to run the finalizer on `break` and
+ // then branch to the right Wasm block to either run the next finalizer or
+ // break.
+
+ // The block for the try-finally statement. Used as `br` target in normal
+ // execution after the finalizer (no throws, returns, or breaks).
w.Label tryFinallyBlock = b.block();
- w.Label finalizerBlock = b.block();
- finalizers.add(TryBlockFinalizer(finalizerBlock));
+
+ // Create one block for each wrapping label
+ for (final labelBlocks in breakFinalizers.values) {
+ labelBlocks.add(b.block());
+ }
+
+ // Continuation of this block runs the finalizer and returns (or jumps to
+ // the next finalizer block). Used as `br` target on `return`.
+ w.Label returnFinalizerBlock = b.block();
+ returnFinalizers.add(TryBlockFinalizer(returnFinalizerBlock));
+
w.Label tryBlock = b.try_();
visitStatement(node.body);
- bool mustHandleReturn = finalizers.removeLast().mustHandleReturn;
- b.br(tryBlock);
+ final bool mustHandleReturn =
+ returnFinalizers.removeLast().mustHandleReturn;
b.catch_(translator.exceptionTag);
+
+ // `break` statements in the current finalizer and the rest will not run
+ // the current finalizer, update the `break` targets
+ final removedBreakTargets = <LabeledStatement, w.Label>{};
+ for (final breakFinalizerEntry in breakFinalizers.entries) {
+ removedBreakTargets[breakFinalizerEntry.key] =
+ breakFinalizerEntry.value.removeLast();
+ }
+
+ // Run finalizer on exception
visitStatement(node.finalizer);
b.rethrow_(tryBlock);
b.end(); // end tryBlock.
+
+ // Run finalizer on normal execution (no breaks, throws, or returns)
visitStatement(node.finalizer);
b.br(tryFinallyBlock);
- b.end(); // end finalizerBlock.
+ b.end(); // end returnFinalizerBlock.
+
+ // Run finalizer on `return`
if (mustHandleReturn) {
visitStatement(node.finalizer);
- if (finalizers.isNotEmpty) {
- b.br(finalizers.last.label);
+ if (returnFinalizers.isNotEmpty) {
+ b.br(returnFinalizers.last.label);
} else {
if (returnValueLocal != null) {
b.local_get(returnValueLocal!);
@@ -899,7 +941,16 @@
_returnFromFunction();
}
}
- b.end(); // end tryFinallyBlock.
+
+ // Generate finalizers for `break`s in the `try` block
+ for (final removedBreakTargetEntry in removedBreakTargets.entries) {
+ b.end();
+ visitStatement(node.finalizer);
+ b.br(breakFinalizers[removedBreakTargetEntry.key]!.last);
+ }
+
+ // Terminate `tryFinallyBlock`
+ b.end();
}
@override
@@ -1077,8 +1128,8 @@
// as the stack unwinds. When we get to the top of the finalizer stack, we
// will handle the return using [returnValueLocal] if this function returns
// a value.
- if (finalizers.isNotEmpty) {
- for (TryBlockFinalizer finalizer in finalizers) {
+ if (returnFinalizers.isNotEmpty) {
+ for (TryBlockFinalizer finalizer in returnFinalizers) {
finalizer.mustHandleReturn = true;
}
if (returnType != voidMarker) {
@@ -1088,7 +1139,7 @@
returnValueLocal ??= addLocal(returnType.withNullability(true));
b.local_set(returnValueLocal!);
}
- b.br(finalizers.last.label);
+ b.br(returnFinalizers.last.label);
} else {
_returnFromFunction();
}
@@ -2411,7 +2462,12 @@
}
class TryBlockFinalizer {
+ /// `br` target to run the finalizer
final w.Label label;
+
+ /// Whether the last finalizer in the chain should return. When this is
+ /// `false` the block won't be used, as the block is for running finalizers
+ /// when returning.
bool mustHandleReturn = false;
TryBlockFinalizer(this.label);
diff --git a/pkg/dartdev/test/commands/pub_test.dart b/pkg/dartdev/test/commands/pub_test.dart
index b984f92..b7bcb117 100644
--- a/pkg/dartdev/test/commands/pub_test.dart
+++ b/pkg/dartdev/test/commands/pub_test.dart
@@ -63,8 +63,7 @@
expect(result.exitCode, 0);
- expect(result.stdout,
- contains('Publish the current package to pub.dartlang.org.'));
+ expect(result.stdout, contains('Publish the current package to pub.dev.'));
expect(result.stdout, result2.stdout);
expect(result.stderr, isEmpty);
diff --git a/pkg/front_end/lib/src/fasta/builder/class_builder.dart b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
index e69bb42..f304785 100644
--- a/pkg/front_end/lib/src/fasta/builder/class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
@@ -11,6 +11,7 @@
DynamicType,
FutureOrType,
InterfaceType,
+ InvalidType,
Member,
Name,
NullType,
@@ -346,6 +347,15 @@
int charOffset,
ClassHierarchyBase? hierarchy,
{required bool hasExplicitTypeArguments}) {
+ if (name == "Record" &&
+ libraryBuilder.importUri.scheme == "dart" &&
+ libraryBuilder.importUri.path == "core" &&
+ library is SourceLibraryBuilder &&
+ !library.libraryFeatures.records.isEnabled) {
+ library.reportFeatureNotEnabled(
+ library.libraryFeatures.records, fileUri, charOffset, name.length);
+ return const InvalidType();
+ }
return buildAliasedTypeWithBuiltArguments(
library,
nullabilityBuilder.build(library),
diff --git a/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart b/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart
index c5f6728..d514b41 100644
--- a/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart
@@ -55,8 +55,7 @@
PrefixBuilder prefix = declaration;
declaration = prefix.lookup(middle, name.charOffset, fileUri);
} else if (declaration is ClassBuilder) {
- ClassBuilder cls = declaration;
- declaration = cls.findConstructorOrFactory(
+ declaration = declaration.findConstructorOrFactory(
middle, name.charOffset, fileUri, accessingLibrary);
if (suffix == null) {
target = declaration;
diff --git a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
index ea951af..7a469b9 100644
--- a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
@@ -4,6 +4,7 @@
library fasta.named_type_builder;
+import 'package:front_end/src/fasta/util/helpers.dart';
import 'package:kernel/ast.dart';
import 'package:kernel/class_hierarchy.dart';
import 'package:kernel/src/legacy_erasure.dart';
@@ -408,7 +409,16 @@
DartType buildAliased(
LibraryBuilder library, TypeUse typeUse, ClassHierarchyBase? hierarchy) {
assert(hierarchy != null || isExplicit, "Cannot build $this.");
- return _buildAliasedInternal(library, typeUse, hierarchy);
+
+ DartType builtType = _buildAliasedInternal(library, typeUse, hierarchy);
+
+ if (library is SourceLibraryBuilder &&
+ !checkRecordOrItsAliasAccessAllowed(builtType, library)) {
+ library.reportFeatureNotEnabled(library.libraryFeatures.records,
+ fileUri ?? library.fileUri, charOffset!, nameText.length);
+ }
+
+ return builtType;
}
DartType _buildAliasedInternal(
@@ -695,7 +705,15 @@
@override
DartType build(LibraryBuilder library, TypeUse typeUse,
{ClassHierarchyBase? hierarchy}) {
- return _type ??= _buildInternal(library, typeUse, hierarchy);
+ DartType builtType = _buildInternal(library, typeUse, hierarchy);
+
+ if (library is SourceLibraryBuilder &&
+ !checkRecordOrItsAliasAccessAllowed(builtType, library)) {
+ library.reportFeatureNotEnabled(library.libraryFeatures.records,
+ fileUri ?? library.fileUri, charOffset!, nameText.length);
+ }
+
+ return _type ??= builtType;
}
}
diff --git a/pkg/front_end/lib/src/fasta/builder/prefix_builder.dart b/pkg/front_end/lib/src/fasta/builder/prefix_builder.dart
index 3f8d28b..ec83114 100644
--- a/pkg/front_end/lib/src/fasta/builder/prefix_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/prefix_builder.dart
@@ -47,6 +47,7 @@
@override
Uri get fileUri => parent.fileUri;
+ /// Lookup a member with [name] in the export scope.
Builder? lookup(String name, int charOffset, Uri fileUri) {
return exportScope.lookup(name, charOffset, fileUri);
}
diff --git a/pkg/front_end/lib/src/fasta/denylisted_classes.dart b/pkg/front_end/lib/src/fasta/denylisted_classes.dart
index 345ec12..0522f92 100644
--- a/pkg/front_end/lib/src/fasta/denylisted_classes.dart
+++ b/pkg/front_end/lib/src/fasta/denylisted_classes.dart
@@ -9,7 +9,8 @@
"num",
"double",
"String",
- "Null"
+ "Null",
+ "Record",
];
// List of special classes in dart:typed_data that can't be subclassed.
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 39a047b..15e61cb 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -106,7 +106,7 @@
import '../type_inference/type_inferrer.dart'
show TypeInferrer, InferredFunctionBody;
import '../type_inference/type_schema.dart' show UnknownType;
-import '../util/helpers.dart' show DelayedActionPerformer;
+import '../util/helpers.dart';
import 'collections.dart';
import 'constness.dart' show Constness;
import 'constructor_tearoff_lowering.dart';
@@ -129,10 +129,6 @@
// TODO(ahe): Remove this and ensure all nodes have a location.
const int noLocation = TreeNode.noOffset;
-// TODO(danrubel): Remove this once control flow and spread collection support
-// has been enabled by default.
-const Object invalidCollectionElement = const Object();
-
enum JumpTargetKind {
Break,
Continue,
@@ -611,9 +607,6 @@
DartType get implicitTypeArgument => const ImplicitTypeArgument();
- @override
- LibraryFeatures get libraryFeatures => libraryBuilder.libraryFeatures;
-
void _enterLocalState({bool inLateLocalInitializer = false}) {
_localInitializerState =
_localInitializerState.prepend(inLateLocalInitializer);
@@ -675,6 +668,28 @@
return toValue(node);
}
+ Matcher toMatcher(Object? node) {
+ if (node is Matcher) {
+ return node;
+ } else if (node is Binder) {
+ return new BinderMatcher(node);
+ } else if (node is Generator) {
+ // TODO(johnniwinther): Generate matcher from Generator.
+ return new DummyMatcher();
+ } else if (node is Expression) {
+ // TODO(johnniwinther): Generate matcher from Expression.
+ return new DummyMatcher();
+ } else if (node is ProblemBuilder) {
+ // ignore: unused_local_variable
+ Expression expression =
+ buildProblem(node.message, node.charOffset, noLength);
+ // TODO(johnniwinther): Generate matcher from Expression.
+ return new DummyMatcher();
+ } else {
+ return unhandled("${node.runtimeType}", "toMatcher", -1, uri);
+ }
+ }
+
List<Expression> popListForValue(int n) {
List<Expression> list =
new List<Expression>.filled(n, dummyExpression, growable: true);
@@ -1785,9 +1800,11 @@
parameters.positionalParameters.length, (int i) {
VariableDeclaration formal = parameters.positionalParameters[i];
return new FormalParameterBuilder(
- /* metadata = */ null,
+ /* metadata = */
+ null,
FormalParameterKind.requiredPositional,
- /* modifiers = */ 0,
+ /* modifiers = */
+ 0,
const ImplicitTypeBuilder(),
formal.name!,
libraryBuilder,
@@ -1842,7 +1859,8 @@
List<Initializer>? parseInitializers(Token token,
{bool doFinishConstructor = true}) {
Parser parser = new Parser(this,
- useImplicitCreationExpression: useImplicitCreationExpressionInCfe);
+ useImplicitCreationExpression: useImplicitCreationExpressionInCfe,
+ allowPatterns: globalFeatures.patterns.isEnabled);
if (!token.isEof) {
token = parser.parseInitializers(token);
checkEmpty(token.charOffset);
@@ -1863,7 +1881,8 @@
Expression parseFieldInitializer(Token token) {
Parser parser = new Parser(this,
- useImplicitCreationExpression: useImplicitCreationExpressionInCfe);
+ useImplicitCreationExpression: useImplicitCreationExpressionInCfe,
+ allowPatterns: globalFeatures.patterns.isEnabled);
Token endToken =
parser.parseExpression(parser.syntheticPreviousToken(token));
assert(checkState(token, [
@@ -1880,7 +1899,8 @@
Expression parseAnnotation(Token token) {
Parser parser = new Parser(this,
- useImplicitCreationExpression: useImplicitCreationExpressionInCfe);
+ useImplicitCreationExpression: useImplicitCreationExpressionInCfe,
+ allowPatterns: globalFeatures.patterns.isEnabled);
Token endToken = parser.parseMetadata(parser.syntheticPreviousToken(token));
assert(checkState(token, [ValueKinds.Expression]));
Expression annotation = pop() as Expression;
@@ -1890,7 +1910,8 @@
ArgumentsImpl parseArguments(Token token) {
Parser parser = new Parser(this,
- useImplicitCreationExpression: useImplicitCreationExpressionInCfe);
+ useImplicitCreationExpression: useImplicitCreationExpressionInCfe,
+ allowPatterns: globalFeatures.patterns.isEnabled);
token = parser.parseArgumentsRest(token);
ArgumentsImpl arguments = pop() as ArgumentsImpl;
checkEmpty(token.charOffset);
@@ -2260,7 +2281,23 @@
@override
void handleParenthesizedCondition(Token token, Token? case_) {
if (case_ != null) {
- throw new UnimplementedError('TODO(paulberry)');
+ assert(checkState(token, [
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ]),
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ]),
+ ]));
+ reportIfNotEnabled(
+ libraryFeatures.patterns, case_.charOffset, case_.charCount);
+ // ignore: unused_local_variable
+ Matcher matcher = toMatcher(pop());
+ // TODO(johnniwinther): Create an if-case statement.
}
assert(checkState(token, [
unionOfKinds([
@@ -2307,6 +2344,30 @@
}
@override
+ void handleParenthesizedPattern(Token token) {
+ debugEvent("ParenthesizedPattern");
+ assert(checkState(token, [
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ])
+ ]));
+ // TODO(johnniwinther): Do we need a ParenthesizedMatcher ?
+ reportIfNotEnabled(
+ libraryFeatures.patterns, token.charOffset, token.charCount);
+
+ Object? value = pop();
+ if (value is Matcher || value is Binder) {
+ push(value);
+ } else {
+ push(toValue(value));
+ }
+ }
+
+ @override
void handleSend(Token beginToken, Token endToken) {
assert(checkState(beginToken, [
unionOfKinds([
@@ -2452,14 +2513,27 @@
ValueKinds.Expression,
ValueKinds.Generator,
ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
]),
ValueKinds.ConstantContext,
]));
debugEvent("endCaseExpression");
- Expression expression = popForValue();
- constantContext = pop() as ConstantContext;
- super.push(expression);
- assert(checkState(colon, [ValueKinds.Expression]));
+ Object? value = pop();
+ if (value is Matcher || value is Binder) {
+ constantContext = pop() as ConstantContext;
+ super.push(toMatcher(value));
+ } else {
+ Expression expression = toValue(value);
+ constantContext = pop() as ConstantContext;
+ super.push(expression);
+ }
+ assert(checkState(colon, [
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Matcher,
+ ])
+ ]));
}
@override
@@ -2523,6 +2597,35 @@
]));
}
+ @override
+ void endBinaryPattern(Token token) {
+ debugEvent("BinaryPattern");
+ assert(checkState(token, [
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ]),
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ])
+ ]));
+ reportIfNotEnabled(
+ libraryFeatures.patterns, token.charOffset, token.charCount);
+ // ignore: unused_local_variable
+ Matcher left = toMatcher(pop());
+ // ignore: unused_local_variable
+ Matcher right = toMatcher(pop());
+ // TODO(johnniwinther): Create a binary matcher.
+ push(new DummyMatcher());
+ }
+
void doBinaryExpression(Token token) {
assert(checkState(token, <ValueKind>[
unionOfKinds([
@@ -3753,12 +3856,11 @@
exitLocalScope();
typeInferrer.assignedVariables.discardNode();
- handleRecoverableError(
+ push(buildProblem(
fasta.templateCantUseControlFlowOrSpreadAsConstant
.withArguments(forToken),
- forToken,
- forToken);
- push(invalidCollectionElement);
+ forToken.charOffset,
+ forToken.charCount));
return;
}
@@ -3917,24 +4019,23 @@
void handleLiteralList(
int count, Token leftBracket, Token? constKeyword, Token rightBracket) {
debugEvent("LiteralList");
+ assert(checkState(leftBracket, [
+ ...repeatedKinds(
+ unionOfKinds([
+ ValueKinds.Generator,
+ ValueKinds.Expression,
+ ValueKinds.ProblemBuilder,
+ ]),
+ count),
+ ValueKinds.TypeArgumentsOrNull,
+ ]));
if (constantContext == ConstantContext.required && constKeyword == null) {
addProblem(fasta.messageMissingExplicitConst, offsetForToken(leftBracket),
noLength);
}
- // TODO(danrubel): Replace this with popListForValue
- // when control flow and spread collections have been enabled by default
- List<Expression> expressions =
- new List<Expression>.filled(count, dummyExpression, growable: true);
- for (int i = count - 1; i >= 0; i--) {
- Object? elem = pop();
- if (elem != invalidCollectionElement) {
- expressions[i] = toValue(elem);
- } else {
- expressions.removeAt(i);
- }
- }
+ List<Expression> expressions = popListForValue(count);
List<TypeBuilder>? typeArguments = pop() as List<TypeBuilder>?;
@@ -3969,6 +4070,35 @@
}
@override
+ void handleListPattern(int count, Token leftBracket, Token rightBracket) {
+ debugEvent("ListPattern");
+ assert(checkState(leftBracket, [
+ ...repeatedKinds(
+ unionOfKinds([
+ ValueKinds.Generator,
+ ValueKinds.Expression,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ]),
+ count),
+ ValueKinds.TypeArgumentsOrNull,
+ ]));
+
+ reportIfNotEnabled(libraryFeatures.patterns, leftBracket.charOffset,
+ leftBracket.charCount);
+
+ for (int i = 0; i < count; i++) {
+ // ignore: unused_local_variable
+ Matcher element = toMatcher(pop());
+ }
+ // ignore: unused_local_variable
+ List<TypeBuilder>? typeArguments = pop() as List<TypeBuilder>?;
+ // TODO(johnniwinther): Create list matcher.
+ push(new DummyMatcher());
+ }
+
+ @override
void endRecordLiteral(Token token, int count, Token? constKeyword) {
debugEvent("RecordLiteral");
assert(checkState(
@@ -3982,13 +4112,8 @@
]),
count)));
- if (!libraryFeatures.records.isEnabled) {
- addProblem(
- templateExperimentNotEnabledOffByDefault
- .withArguments(ExperimentalFlag.records.name),
- token.offset,
- noLength);
- }
+ reportIfNotEnabled(
+ libraryFeatures.records, token.charOffset, token.charCount);
// Pop all elements. This will put them in evaluation order.
List<Object?>? elements =
@@ -4035,6 +4160,36 @@
offset: token.offset));
}
+ @override
+ void handleRecordPattern(Token token, int count) {
+ debugEvent("RecordPattern");
+ debugEvent("RecordLiteral");
+ assert(checkState(
+ token,
+ repeatedKinds(
+ unionOfKinds([
+ ValueKinds.Generator,
+ ValueKinds.Expression,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.NamedExpression,
+ ValueKinds.Matcher,
+ // TODO(johnniwinther): Support named matchers.
+ // ValueKinds.NamedMatcher,
+ ValueKinds.Binder,
+ ]),
+ count)));
+
+ reportIfNotEnabled(
+ libraryFeatures.patterns, token.charOffset, token.charCount);
+
+ // Pop all elements.
+ // ignore: unused_local_variable
+ List<Object?>? elements =
+ const FixedNullableList<Object>().pop(stack, count);
+ // TODO(johnniwinther): Create a record matcher.
+ push(new DummyMatcher());
+ }
+
void buildLiteralSet(List<TypeBuilder>? typeArguments, Token? constKeyword,
Token leftBrace, List<dynamic>? setOrMapEntries) {
DartType typeArgument;
@@ -4085,6 +4240,17 @@
bool hasSetEntry,
) {
debugEvent("LiteralSetOrMap");
+ assert(checkState(leftBrace, [
+ ...repeatedKinds(
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.MapLiteralEntry,
+ ]),
+ count),
+ ValueKinds.TypeArgumentsOrNull
+ ]));
if (constantContext == ConstantContext.required && constKeyword == null) {
addProblem(fasta.messageMissingExplicitConst, offsetForToken(leftBrace),
@@ -4095,10 +4261,7 @@
new List<dynamic>.filled(count, null, growable: true);
for (int i = count - 1; i >= 0; i--) {
Object? elem = pop();
- // TODO(danrubel): Revise this to handle control flow and spread
- if (elem == invalidCollectionElement) {
- setOrMapEntries.removeAt(i);
- } else if (elem is MapLiteralEntry) {
+ if (elem is MapLiteralEntry) {
setOrMapEntries[i] = elem;
} else {
setOrMapEntries[i] = toValue(elem);
@@ -4151,6 +4314,62 @@
}
@override
+ void handleMapPatternEntry(Token colon, Token endToken) {
+ debugEvent('MapPatternEntry');
+ assert(checkState(colon, [
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ]),
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ])
+ ]));
+ // ignore: unused_local_variable
+ Matcher key = toMatcher(pop());
+ // ignore: unused_local_variable
+ Matcher value = toMatcher(pop());
+ // TODO(johnniwinther): Create map entry.
+ push(new DummyMatcher());
+ }
+
+ @override
+ void handleMapPattern(int count, Token leftBrace, Token rightBrace) {
+ debugEvent('MapPattern');
+ assert(checkState(leftBrace, [
+ ...repeatedKinds(
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.MapLiteralEntry,
+ // TODO(johnniwinther): Support map-pattern entry
+ ValueKinds.Binder,
+ ]),
+ count),
+ ValueKinds.TypeArgumentsOrNull,
+ ]));
+
+ reportIfNotEnabled(
+ libraryFeatures.patterns, leftBrace.charOffset, leftBrace.charCount);
+ for (int i = 0; i < count; i++) {
+ // TODO(johnniwinther): Create map literal entry matcher.
+ pop();
+ }
+ // ignore: unused_local_variable
+ List<TypeBuilder>? typeArguments = pop() as List<TypeBuilder>?;
+ push(new DummyMatcher());
+ }
+
+ @override
void handleLiteralBool(Token token) {
debugEvent("LiteralBool");
bool value = optional("true", token);
@@ -4512,6 +4731,14 @@
@override
void handleAsOperator(Token operator) {
debugEvent("AsOperator");
+ assert(checkState(operator, [
+ ValueKinds.TypeBuilder,
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ]),
+ ]));
DartType type = buildDartType(pop() as TypeBuilder, TypeUse.asType,
allowPotentiallyConstantType: libraryBuilder.isNonNullableByDefault);
Expression expression = popForValue();
@@ -4522,6 +4749,30 @@
}
@override
+ void handleCastPattern(Token operator) {
+ debugEvent('CastPattern');
+ assert(checkState(operator, [
+ ValueKinds.TypeBuilder,
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ]),
+ ]));
+ reportIfNotEnabled(
+ libraryFeatures.patterns, operator.charOffset, operator.charCount);
+ // ignore: unused_local_variable
+ DartType type = buildDartType(pop() as TypeBuilder, TypeUse.asType,
+ allowPotentiallyConstantType: libraryBuilder.isNonNullableByDefault);
+ // ignore: unused_local_variable
+ Matcher operand = toMatcher(pop());
+ // TODO(johnniwinther): Create a cast matcher.
+ push(new DummyMatcher());
+ }
+
+ @override
void beginIsOperatorType(Token operator) {
_isOrAsOperatorTypeState = _isOrAsOperatorTypeState.prepend(true);
}
@@ -6413,12 +6664,11 @@
exitLocalScope();
typeInferrer.assignedVariables.discardNode();
- handleRecoverableError(
+ push(buildProblem(
fasta.templateCantUseControlFlowOrSpreadAsConstant
.withArguments(forToken),
- forToken,
- forToken);
- push(invalidCollectionElement);
+ forToken.charOffset,
+ forToken.charCount));
return;
}
@@ -6808,8 +7058,9 @@
void beginSwitchCase(int labelCount, int expressionCount, Token firstToken) {
debugEvent("beginSwitchCase");
int count = labelCount + expressionCount;
- List<Object>? labelsAndExpressions = const FixedNullableList<Object>()
- .popNonNullable(stack, count, dummyLabel);
+ List<Object>? labelsExpressionsAndMatchers =
+ const FixedNullableList<Object>()
+ .popNonNullable(stack, count, dummyLabel);
List<Label>? labels =
labelCount == 0 ? null : new List<Label>.filled(labelCount, dummyLabel);
List<Expression> expressions = new List<Expression>.filled(
@@ -6817,12 +7068,15 @@
growable: true);
int labelIndex = 0;
int expressionIndex = 0;
- if (labelsAndExpressions != null) {
- for (Object labelOrExpression in labelsAndExpressions) {
- if (labelOrExpression is Label) {
- labels![labelIndex++] = labelOrExpression;
+ if (labelsExpressionsAndMatchers != null) {
+ for (Object labelExpressionOrMatcher in labelsExpressionsAndMatchers) {
+ if (labelExpressionOrMatcher is Label) {
+ labels![labelIndex++] = labelExpressionOrMatcher;
+ } else if (labelExpressionOrMatcher is Matcher) {
+ // TODO(johnniwinther): Handle matchers.
} else {
- expressions[expressionIndex++] = labelOrExpression as Expression;
+ expressions[expressionIndex++] =
+ labelExpressionOrMatcher as Expression;
}
}
}
@@ -7764,6 +8018,174 @@
reportIfNotEnabled(
libraryFeatures.constructorTearoffs, token.charOffset, token.length);
}
+
+ @override
+ void handleConstantPattern(Token? constKeyword) {
+ debugEvent("ConstantPattern");
+ assert(checkState(constKeyword, [
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ]),
+ ]));
+ Expression expression = toValue(pop());
+ push(expression);
+ }
+
+ @override
+ void handleExtractorPatternFields(
+ int count, Token beginToken, Token endToken) {
+ debugEvent("ExtractorPattern");
+ assert(checkState(
+ beginToken,
+ repeatedKinds(
+ unionOfKinds([
+ ValueKinds.Expression, ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ // TODO(johnniwinther): Support named matcher.
+ ValueKinds.Binder,
+ ]),
+ count)));
+ reportIfNotEnabled(
+ libraryFeatures.patterns, beginToken.charOffset, beginToken.charCount);
+ for (int i = 0; i < count; i++) {
+ pop();
+ }
+ // TODO(johnniwinther): Push (named) matchers.
+ push(count != 0 ? <Matcher>[] : NullValue.MatcherList);
+ }
+
+ @override
+ void handleExtractorPattern(
+ Token firstIdentifier, Token? dot, Token? secondIdentifier) {
+ debugEvent("ExtractorPattern");
+ assert(checkState(firstIdentifier, [
+ ValueKinds.MatcherListOrNull,
+ ValueKinds.TypeArgumentsOrNull,
+ ]));
+
+ reportIfNotEnabled(libraryFeatures.patterns, firstIdentifier.charOffset,
+ firstIdentifier.charCount);
+
+ // ignore: unused_local_variable
+ List<Matcher>? fields = pop() as List<Matcher>?;
+ // ignore: unused_local_variable
+ List<TypeBuilder>? typeArguments = pop() as List<TypeBuilder>?;
+
+ // TODO(johnniwinther): Create extractor pattern.
+ push(new DummyMatcher());
+ }
+
+ @override
+ void handleRelationalPattern(Token token) {
+ debugEvent("RelationalPattern");
+ assert(checkState(token, [
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ]),
+ ]));
+ reportIfNotEnabled(
+ libraryFeatures.patterns, token.charOffset, token.charCount);
+ // ignore: unused_local_variable
+ Matcher operand = toMatcher(pop());
+ // TODO(johnniwinther): Create a relational matcher.
+ push(new DummyMatcher());
+ }
+
+ @override
+ void handleNullAssertPattern(Token bang) {
+ debugEvent("NullAssertPattern");
+ assert(checkState(bang, [
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ]),
+ ]));
+ reportIfNotEnabled(
+ libraryFeatures.patterns, bang.charOffset, bang.charCount);
+ // ignore: unused_local_variable
+ Matcher operand = toMatcher(pop());
+ // TODO(johnniwinther): Create a relational matcher.
+ push(new DummyMatcher());
+ }
+
+ @override
+ void handleNullCheckPattern(Token question) {
+ debugEvent('NullCheckPattern');
+ assert(checkState(question, [
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ]),
+ ]));
+ reportIfNotEnabled(
+ libraryFeatures.patterns, question.charOffset, question.charCount);
+ // ignore: unused_local_variable
+ Matcher operand = toMatcher(pop());
+ // TODO(johnniwinther): Create a relational matcher.
+ push(new DummyMatcher());
+ }
+
+ @override
+ void handleVariablePattern(Token? keyword, Token variable) {
+ debugEvent('VariablePattern');
+ assert(checkState(keyword ?? variable, [
+ ValueKinds.TypeBuilderOrNull,
+ ]));
+
+ reportIfNotEnabled(
+ libraryFeatures.patterns, variable.charOffset, variable.charCount);
+ // ignore: unused_local_variable
+ TypeBuilder? type = pop(NullValue.TypeBuilder) as TypeBuilder?;
+ // TODO(johnniwinther): Create a variable binder
+ push(new DummyBinder());
+ }
+
+ @override
+ void handlePatternField(Token? colon) {
+ debugEvent("PatternField");
+ assert(checkState(colon, [
+ unionOfKinds([
+ ValueKinds.Expression,
+ ValueKinds.Generator,
+ ValueKinds.ProblemBuilder,
+ ValueKinds.Matcher,
+ ValueKinds.Binder,
+ ]),
+ if (colon != null) ValueKinds.IdentifierOrNull,
+ ]));
+
+ Object? value = pop();
+ if (value is Binder) {
+ // TODO(johnniwinther): Create (named) binder.
+ } else {
+ // TODO(johnniwinther): Create (named) matcher.
+ // ignore: unused_local_variable
+ Matcher matcher = toMatcher(value);
+ }
+ // ignore: unused_local_variable
+ Identifier? name;
+ if (colon != null) {
+ name = pop() as Identifier?;
+ // TODO(johnniwinther): Push named binder/matcher.
+ push(new DummyMatcher());
+ } else {
+ // TODO(johnniwinther): Push binder/matcher.
+ push(new DummyMatcher());
+ }
+ }
}
abstract class EnsureLoaded {
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
index bdfd91d..bd42ad7 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
@@ -316,11 +316,8 @@
class VariableUseGenerator extends Generator {
final VariableDeclaration variable;
- final DartType? promotedType;
-
VariableUseGenerator(
- ExpressionGeneratorHelper helper, Token token, this.variable,
- [this.promotedType])
+ ExpressionGeneratorHelper helper, Token token, this.variable)
: assert(variable.isAssignable, 'Variable $variable is not assignable'),
super(helper, token);
@@ -410,8 +407,6 @@
NameSystem syntheticNames = new NameSystem();
sink.write(", variable: ");
printNodeOn(variable, sink, syntheticNames: syntheticNames);
- sink.write(", promotedType: ");
- printNodeOn(promotedType, sink, syntheticNames: syntheticNames);
}
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart b/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
index 5b1dbd6..13727c7 100644
--- a/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
@@ -5010,22 +5010,9 @@
}
}
-abstract class Binder extends TreeNode {}
-
-class ListBinder extends Binder {
- final DartType typeBinderArgument;
- final List<Binder> binders;
-
- ListBinder(this.typeBinderArgument, this.binders, {required int offset}) {
- fileOffset = offset;
- }
-
+abstract class Matcher extends TreeNode {
@override
R accept<R>(TreeVisitor<R> visitor) {
- if (visitor is Printer || visitor is Precedence || visitor is Transformer) {
- // Allow visitors needed for toString and replaceWith.
- return visitor.defaultTreeNode(this);
- }
return unsupported(
"${runtimeType}.accept on ${visitor.runtimeType}", -1, null);
}
@@ -5037,18 +5024,6 @@
}
@override
- void toTextInternal(AstPrinter printer) {
- printer.write('[');
- String comma = '';
- for (Binder binder in binders) {
- printer.write(comma);
- binder.toTextInternal(printer);
- comma = ', ';
- }
- printer.write(']');
- }
-
- @override
void transformChildren(Transformer v) {
unsupported(
"${runtimeType}.transformChildren on ${v.runtimeType}", -1, null);
@@ -5064,6 +5039,98 @@
void visitChildren(Visitor v) {
unsupported("${runtimeType}.visitChildren on ${v.runtimeType}", -1, null);
}
+}
+
+class DummyMatcher extends Matcher {
+ @override
+ void toTextInternal(AstPrinter printer) {}
+
+ @override
+ String toString() {
+ return "DummyMatcher(${toStringInternal()})";
+ }
+}
+
+class BinderMatcher extends Matcher {
+ final Binder binder;
+
+ BinderMatcher(this.binder);
+
+ @override
+ void toTextInternal(AstPrinter printer) {
+ binder.toTextInternal(printer);
+ }
+
+ @override
+ String toString() {
+ return "BinderMatcher(${toStringInternal()})";
+ }
+}
+
+abstract class Binder extends TreeNode {
+ @override
+ R accept<R>(TreeVisitor<R> visitor) {
+ if (visitor is Printer || visitor is Precedence || visitor is Transformer) {
+ // Allow visitors needed for toString and replaceWith.
+ return visitor.defaultTreeNode(this);
+ }
+ return unsupported(
+ "${runtimeType}.accept on ${visitor.runtimeType}", -1, null);
+ }
+
+ @override
+ R accept1<R, A>(TreeVisitor1<R, A> visitor, A arg) {
+ return unsupported(
+ "${runtimeType}.accept1 on ${visitor.runtimeType}", -1, null);
+ }
+
+ @override
+ void transformChildren(Transformer v) {
+ unsupported(
+ "${runtimeType}.transformChildren on ${v.runtimeType}", -1, null);
+ }
+
+ @override
+ void transformOrRemoveChildren(RemovingTransformer v) {
+ unsupported("${runtimeType}.transformOrRemoveChildren on ${v.runtimeType}",
+ -1, null);
+ }
+
+ @override
+ void visitChildren(Visitor v) {
+ unsupported("${runtimeType}.visitChildren on ${v.runtimeType}", -1, null);
+ }
+}
+
+class DummyBinder extends Binder {
+ @override
+ void toTextInternal(AstPrinter printer) {}
+
+ @override
+ String toString() {
+ return "DummyBinder(${toStringInternal()})";
+ }
+}
+
+class ListBinder extends Binder {
+ final DartType typeBinderArgument;
+ final List<Binder> binders;
+
+ ListBinder(this.typeBinderArgument, this.binders, {required int offset}) {
+ fileOffset = offset;
+ }
+
+ @override
+ void toTextInternal(AstPrinter printer) {
+ printer.write('[');
+ String comma = '';
+ for (Binder binder in binders) {
+ printer.write(comma);
+ binder.toTextInternal(printer);
+ comma = ', ';
+ }
+ printer.write(']');
+ }
@override
String toString() {
diff --git a/pkg/front_end/lib/src/fasta/scope.dart b/pkg/front_end/lib/src/fasta/scope.dart
index 3c0292e..813a227 100644
--- a/pkg/front_end/lib/src/fasta/scope.dart
+++ b/pkg/front_end/lib/src/fasta/scope.dart
@@ -419,6 +419,7 @@
}
}
+ /// Lookup a member with [name] in the scope.
Builder? lookup(String name, int charOffset, Uri fileUri,
{bool isInstanceScope = true}) {
recordUse(name, charOffset);
@@ -1281,8 +1282,8 @@
void _addBuilderToMergedScope(T parentBuilder, String name,
Builder newBuilder, Builder? existingBuilder,
{required bool setter}) {
- if (parentBuilder.isAugmentation) {
- if (existingBuilder != null) {
+ if (existingBuilder != null) {
+ if (parentBuilder.isAugmentation) {
if (newBuilder.isAugmentation) {
existingBuilder.applyPatch(newBuilder);
} else {
@@ -1321,24 +1322,33 @@
]);
}
} else {
- if (newBuilder.isAugmentation) {
- Message message;
- if (newBuilder is SourceMemberBuilder) {
- if (_origin is SourceLibraryBuilder) {
- message = templateUnmatchedAugmentationLibraryMember
- .withArguments(name);
- } else {
- message =
- templateUnmatchedAugmentationClassMember.withArguments(name);
- }
- } else if (newBuilder is SourceClassBuilder) {
- message = templateUnmatchedAugmentationClass.withArguments(name);
+ // Patch libraries implicitly assume matching members are patch
+ // members.
+ existingBuilder.applyPatch(newBuilder);
+ }
+ } else {
+ if (newBuilder.isAugmentation) {
+ Message message;
+ if (newBuilder is SourceMemberBuilder) {
+ if (_origin is SourceLibraryBuilder) {
+ message =
+ templateUnmatchedAugmentationLibraryMember.withArguments(name);
} else {
message =
- templateUnmatchedAugmentationDeclaration.withArguments(name);
+ templateUnmatchedAugmentationClassMember.withArguments(name);
}
- originLibrary.addProblem(
- message, newBuilder.charOffset, name.length, newBuilder.fileUri);
+ } else if (newBuilder is SourceClassBuilder) {
+ message = templateUnmatchedAugmentationClass.withArguments(name);
+ } else {
+ message =
+ templateUnmatchedAugmentationDeclaration.withArguments(name);
+ }
+ originLibrary.addProblem(
+ message, newBuilder.charOffset, name.length, newBuilder.fileUri);
+ } else {
+ if (!parentBuilder.isAugmentation && !name.startsWith('_')) {
+ // We special-case public members injected in patch libraries.
+ _addInjectedPatchMember(name, newBuilder);
} else {
_originScope.addLocalMember(name, newBuilder, setter: setter);
for (Scope augmentationScope in _augmentationScopes.values) {
@@ -1347,14 +1357,6 @@
}
}
}
- } else {
- if (existingBuilder != null) {
- // Patch libraries implicitly assume matching members are patch
- // members.
- existingBuilder.applyPatch(newBuilder);
- } else {
- _addInjectedPatchMember(name, newBuilder);
- }
}
}
@@ -1418,29 +1420,8 @@
@override
void _addInjectedPatchMember(String name, Builder newBuilder) {
- if (name.startsWith('_')) {
- injectMemberFromPatch(name, newBuilder);
- } else {
- exportMemberFromPatch(name, newBuilder);
- }
- }
-
- void injectMemberFromPatch(String name, Builder member) {
- if (member.isSetter) {
- assert(
- _originScope.lookupLocalMember(name, setter: true) == null,
- "Setter $name already bound to "
- "${_originScope.lookupLocalMember(name, setter: true)}, "
- "trying to add $member.");
- _originScope.addLocalMember(name, member as MemberBuilder, setter: true);
- } else {
- assert(
- _originScope.lookupLocalMember(name, setter: false) == null,
- "Member $name already bound to "
- "${_originScope.lookupLocalMember(name, setter: false)}, "
- "trying to add $member.");
- _originScope.addLocalMember(name, member, setter: false);
- }
+ assert(!name.startsWith('_'), "Unexpected private member $newBuilder");
+ exportMemberFromPatch(name, newBuilder);
}
void exportMemberFromPatch(String name, Builder member) {
diff --git a/pkg/front_end/lib/src/fasta/source/diet_listener.dart b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
index 38813c1..170a5ad 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -831,7 +831,8 @@
final BodyBuilder listener = createFunctionListener(builder);
try {
Parser parser = new Parser(listener,
- useImplicitCreationExpression: useImplicitCreationExpressionInCfe);
+ useImplicitCreationExpression: useImplicitCreationExpressionInCfe,
+ allowPatterns: globalFeatures.patterns.isEnabled);
if (metadata != null) {
parser.parseMetadataStar(parser.syntheticPreviousToken(metadata));
listener.pop(); // Pops metadata constants.
@@ -1078,7 +1079,8 @@
Token token = startToken;
try {
Parser parser = new Parser(bodyBuilder,
- useImplicitCreationExpression: useImplicitCreationExpressionInCfe);
+ useImplicitCreationExpression: useImplicitCreationExpressionInCfe,
+ allowPatterns: globalFeatures.patterns.isEnabled);
if (metadata != null) {
parser.parseMetadataStar(parser.syntheticPreviousToken(metadata));
bodyBuilder.pop(); // Annotations.
@@ -1113,7 +1115,8 @@
bool isTopLevel) {
Token token = startToken;
Parser parser = new Parser(bodyBuilder,
- useImplicitCreationExpression: useImplicitCreationExpressionInCfe);
+ useImplicitCreationExpression: useImplicitCreationExpressionInCfe,
+ allowPatterns: globalFeatures.patterns.isEnabled);
if (isTopLevel) {
token = parser.parseTopLevelMember(metadata ?? token);
} else {
@@ -1236,7 +1239,8 @@
StackListenerImpl listener = createListener(builder, memberScope,
isDeclarationInstanceMember: false);
Parser parser = new Parser(listener,
- useImplicitCreationExpression: useImplicitCreationExpressionInCfe);
+ useImplicitCreationExpression: useImplicitCreationExpressionInCfe,
+ allowPatterns: globalFeatures.patterns.isEnabled);
parser.parseMetadataStar(parser.syntheticPreviousToken(metadata));
return listener.finishMetadata(parent);
}
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index 1f65d33..0d2bcaf 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -1172,7 +1172,8 @@
{
target.benchmarker?.beginSubdivide(
BenchmarkSubdivides.body_buildBody_benchmark_specific_parser);
- Parser parser = new Parser(new ForwardingListener());
+ Parser parser = new Parser(new ForwardingListener(),
+ allowPatterns: target.globalFeatures.patterns.isEnabled);
parser.parseUnit(tokens);
target.benchmarker?.endSubdivide();
}
@@ -1259,7 +1260,8 @@
return listener.parseSingleExpression(
new Parser(listener,
- useImplicitCreationExpression: useImplicitCreationExpressionInCfe),
+ useImplicitCreationExpression: useImplicitCreationExpressionInCfe,
+ allowPatterns: target.globalFeatures.patterns.isEnabled),
token,
parameters);
}
@@ -2760,6 +2762,8 @@
class num {}
class Function {}
+
+class Record {}
""";
/// A minimal implementation of dart:async that is sufficient to create an
diff --git a/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart b/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
index 3a4d833..d5b5fa8 100644
--- a/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
+++ b/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
@@ -25,6 +25,9 @@
LibraryFeatures get libraryFeatures => libraryBuilder.libraryFeatures;
+ GlobalFeatures get globalFeatures =>
+ libraryBuilder.loader.target.globalFeatures;
+
@override
Uri get importUri => libraryBuilder.origin.importUri;
diff --git a/pkg/front_end/lib/src/fasta/source/value_kinds.dart b/pkg/front_end/lib/src/fasta/source/value_kinds.dart
index 1cab98e..aa72ee1 100644
--- a/pkg/front_end/lib/src/fasta/source/value_kinds.dart
+++ b/pkg/front_end/lib/src/fasta/source/value_kinds.dart
@@ -25,6 +25,7 @@
import '../kernel/body_builder.dart' as type show FormalParameters;
import '../kernel/expression_generator.dart' as type;
+import '../kernel/internal_ast.dart' as type;
import '../modifier.dart' as type;
@@ -48,6 +49,7 @@
const SingleValueKind<type.AsyncMarker>();
static const ValueKind AsyncModifier =
const SingleValueKind<type.AsyncMarker>();
+ static const ValueKind Binder = const SingleValueKind<type.Binder>();
static const ValueKind Bool = const SingleValueKind<bool>();
static const ValueKind ConstantContext =
const SingleValueKind<type.ConstantContext>();
@@ -70,6 +72,11 @@
static const ValueKind Initializer =
const SingleValueKind<type.Initializer>();
static const ValueKind Integer = const SingleValueKind<int>();
+ static const ValueKind MapLiteralEntry =
+ const SingleValueKind<type.MapLiteralEntry>();
+ static const ValueKind Matcher = const SingleValueKind<type.Matcher>();
+ static const ValueKind MatcherListOrNull =
+ const SingleValueKind<List<type.Matcher>>(NullValue.MatcherList);
static const ValueKind MethodBody = const SingleValueKind<type.MethodBody>();
static const ValueKind MixinApplicationBuilder =
const SingleValueKind<type.MixinApplicationBuilder>();
diff --git a/pkg/front_end/lib/src/fasta/type_inference/inference_results.dart b/pkg/front_end/lib/src/fasta/type_inference/inference_results.dart
index 5c66635..4584be7 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/inference_results.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/inference_results.dart
@@ -303,7 +303,21 @@
/// The inferred expression.
final Expression expression;
- ExpressionInferenceResult(this.inferredType, this.expression)
+ /// More precise type of the expression after coercion.
+ ///
+ /// Consider the following code:
+ ///
+ /// dynamic foo = 3;
+ /// int bar = foo;
+ ///
+ /// In the example above `foo` is coerced to `foo as int`, but
+ /// [inferredType]` of `foo` stays `dynamic`. In some situations, like
+ /// coercing elements of record literals, we want to know the more precise
+ /// type of the expression after coercion, `int` in the example above.
+ final DartType? postCoercionType;
+
+ ExpressionInferenceResult(this.inferredType, this.expression,
+ {this.postCoercionType = null})
// ignore: unnecessary_null_comparison
: assert(expression != null);
@@ -417,6 +431,9 @@
}
@override
+ DartType? get postCoercionType => null;
+
+ @override
ExpressionInferenceResult stopShorting() {
Expression expression = nullAwareAction;
Link<NullAwareGuard> nullAwareGuard = nullAwareGuards;
diff --git a/pkg/front_end/lib/src/fasta/type_inference/inference_visitor.dart b/pkg/front_end/lib/src/fasta/type_inference/inference_visitor.dart
index b6ab581..2256b88 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/inference_visitor.dart
@@ -7362,7 +7362,8 @@
ExpressionInferenceResult visitInternalRecordLiteral(
InternalRecordLiteral node, DartType typeContext) {
List<Expression> positional = node.positional;
- List<NamedExpression> named = node.named;
+ List<NamedExpression> namedUnsorted = node.named;
+ List<NamedExpression> named = namedUnsorted;
Map<String, NamedExpression>? namedElements = node.namedElements;
List<Object> originalElementOrder = node.originalElementOrder;
List<VariableDeclaration>? hoistedExpressions;
@@ -7371,19 +7372,23 @@
Map<String, DartType>? namedTypeContexts;
if (typeContext is RecordType &&
typeContext.positional.length == positional.length &&
- typeContext.named.length == named.length) {
+ typeContext.named.length == namedUnsorted.length) {
+ namedTypeContexts = <String, DartType>{};
+ for (NamedType namedType in typeContext.named) {
+ namedTypeContexts[namedType.name] = namedType.type;
+ }
+
bool sameNames = true;
- for (int i = 0; sameNames && i < named.length; i++) {
- if (typeContext.named[i].name != named[i].name) {
+ for (int i = 0; sameNames && i < namedUnsorted.length; i++) {
+ if (!namedTypeContexts.containsKey(namedUnsorted[i].name)) {
sameNames = false;
}
}
+
if (sameNames) {
positionalTypeContexts = typeContext.positional;
- namedTypeContexts = <String, DartType>{};
- for (NamedType namedType in typeContext.named) {
- namedTypeContexts[namedType.name] = namedType.type;
- }
+ } else {
+ namedTypeContexts = null;
}
}
@@ -7396,9 +7401,18 @@
namedTypes = [];
for (int index = 0; index < positional.length; index++) {
Expression expression = positional[index];
- ExpressionInferenceResult expressionResult = inferExpression(expression,
- positionalTypeContexts?[index] ?? const UnknownType(), true);
- positionalTypes.add(expressionResult.inferredType);
+
+ DartType contextType =
+ positionalTypeContexts?[index] ?? const UnknownType();
+ ExpressionInferenceResult expressionResult =
+ inferExpression(expression, contextType, true);
+ if (contextType is! UnknownType) {
+ expressionResult =
+ ensureAssignableResult(contextType, expressionResult);
+ }
+
+ positionalTypes.add(
+ expressionResult.postCoercionType ?? expressionResult.inferredType);
positional[index] = expressionResult.expression;
}
} else {
@@ -7436,12 +7450,17 @@
for (int index = originalElementOrder.length - 1; index >= 0; index--) {
Object element = originalElementOrder[index];
if (element is NamedExpression) {
- ExpressionInferenceResult expressionResult = inferExpression(
- element.value,
- namedTypeContexts?[element.name] ?? const UnknownType(),
- true);
+ DartType contextType =
+ namedTypeContexts?[element.name] ?? const UnknownType();
+ ExpressionInferenceResult expressionResult =
+ inferExpression(element.value, contextType, true);
+ if (contextType is! UnknownType) {
+ expressionResult =
+ ensureAssignableResult(contextType, expressionResult);
+ }
Expression expression = expressionResult.expression;
- DartType type = expressionResult.inferredType;
+ DartType type = expressionResult.postCoercionType ??
+ expressionResult.inferredType;
// TODO(johnniwinther): Should we use [isPureExpression] as is, make
// it include (simple) literals, or add a new predicate?
if (needsHoisting && !isPureExpression(expression)) {
@@ -7462,12 +7481,17 @@
}
nameIndex--;
} else {
- ExpressionInferenceResult expressionResult = inferExpression(
- element as Expression,
- positionalTypeContexts?[positionalIndex] ?? const UnknownType(),
- true);
+ DartType contextType =
+ positionalTypeContexts?[positionalIndex] ?? const UnknownType();
+ ExpressionInferenceResult expressionResult =
+ inferExpression(element as Expression, contextType, true);
+ if (contextType is! UnknownType) {
+ expressionResult =
+ ensureAssignableResult(contextType, expressionResult);
+ }
Expression expression = expressionResult.expression;
- DartType type = expressionResult.inferredType;
+ DartType type = expressionResult.postCoercionType ??
+ expressionResult.inferredType;
// TODO(johnniwinther): Should we use [isPureExpression] as is, make
// it include (simple) literals, or add a new predicate?
if (needsHoisting && !isPureExpression(expression)) {
diff --git a/pkg/front_end/lib/src/fasta/type_inference/inference_visitor_base.dart b/pkg/front_end/lib/src/fasta/type_inference/inference_visitor_base.dart
index 8da6afa..eab3dd4 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/inference_visitor_base.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/inference_visitor_base.dart
@@ -529,6 +529,7 @@
DartType expressionType = inferenceResult.inferredType;
Expression expression = inferenceResult.expression;
Expression result;
+ DartType? postCoercionType;
switch (assignabilityResult.kind) {
case AssignabilityKind.assignable:
result = expression;
@@ -540,6 +541,7 @@
..isForNonNullableByDefault = isNonNullableByDefault
..isForDynamic = expressionType is DynamicType
..fileOffset = fileOffset;
+ postCoercionType = initialContextType;
break;
case AssignabilityKind.unassignable:
// Error: not assignable. Perform error recovery.
@@ -624,7 +626,8 @@
if (!identical(result, expression)) {
flowAnalysis.forwardExpression(result, expression);
- return new ExpressionInferenceResult(expressionType, result);
+ return new ExpressionInferenceResult(expressionType, result,
+ postCoercionType: postCoercionType);
} else {
return inferenceResult;
}
diff --git a/pkg/front_end/lib/src/fasta/util/helpers.dart b/pkg/front_end/lib/src/fasta/util/helpers.dart
index bf6fbce..5cf5fed 100644
--- a/pkg/front_end/lib/src/fasta/util/helpers.dart
+++ b/pkg/front_end/lib/src/fasta/util/helpers.dart
@@ -2,7 +2,31 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+import 'package:kernel/ast.dart';
+
+import '../source/source_library_builder.dart';
+
abstract class DelayedActionPerformer {
bool get hasDelayedActions;
void performDelayedActions({required bool allowFurtherDelays});
}
+
+bool checkRecordOrItsAliasAccessAllowed(
+ DartType type, SourceLibraryBuilder accessorLibrary) {
+ Class? targetClass;
+ if (type is InterfaceType) {
+ targetClass = type.classNode;
+ } else if (type is TypedefType) {
+ DartType unaliasedType = type.unalias;
+ if (unaliasedType is InterfaceType) {
+ targetClass = unaliasedType.classNode;
+ }
+ }
+ return accessorLibrary.libraryFeatures.records.isEnabled ||
+ accessorLibrary.libraryFeatures.records.flag.isEnabledByDefault ||
+ !(targetClass != null &&
+ targetClass.parent != null &&
+ targetClass.name == "Record" &&
+ targetClass.enclosingLibrary.importUri.scheme == "dart" &&
+ targetClass.enclosingLibrary.importUri.path == "core");
+}
diff --git a/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart b/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart
index ce8eb78..fd3b2e6 100644
--- a/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart
+++ b/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart
@@ -3,19 +3,3 @@
true ? : 2;
} catch (e) {}
}
-''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse('''
-class C {
- int? f;
-}
-test(dynamic x) {
- switch (x) {
- case C(f: 1) as Object:
- break;
- }
-}
diff --git a/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.expect b/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.expect
index d63aa8e..9f48078 100644
--- a/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.expect
@@ -4,16 +4,6 @@
true ? : 2;
^
-parser/patterns/error_recovery_after_question_suffix_in_expression:6:1: Expected a declaration, but got '''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''''.
-''', errors: [
-^^^^^^^^^^^^^^^...
-
beginCompilationUnit(f)
beginMetadataStar(f)
endMetadataStar(0)
@@ -57,136 +47,5 @@
endTryStatement(1, try, null)
endBlockFunctionBody(1, {, })
endTopLevelMethod(f, null, })
- endTopLevelDeclaration(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''')
- beginMetadataStar(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''')
- endMetadataStar(0)
- beginTopLevelMember(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''')
- handleRecoverableError(Message[ExpectedDeclaration, Expected a declaration, but got '''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''''., null, {lexeme: ''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse('''}], ''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''', ''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''')
- handleInvalidTopLevelDeclaration(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''')
- endTopLevelDeclaration(class)
- beginMetadataStar(class)
- endMetadataStar(0)
- beginClassOrMixinOrNamedMixinApplicationPrelude(class)
- handleIdentifier(C, classOrMixinDeclaration)
- handleNoTypeVariables({)
- beginClassDeclaration(class, null, null, null, C)
- handleNoType(C)
- handleClassExtends(null, 1)
- handleClassNoWithClause()
- handleImplements(null, 0)
- handleClassHeader(class, class, null)
- beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
- beginMetadataStar(int)
- endMetadataStar(0)
- beginMember()
- beginFields(DeclarationKind.Class, null, null, null, null, null, null, null, {)
- handleIdentifier(int, typeReference)
- handleNoTypeArguments(?)
- handleType(int, ?)
- handleIdentifier(f, fieldDeclaration)
- handleNoFieldInitializer(;)
- endClassFields(null, null, null, null, null, null, null, 1, int, ;)
- endMember()
- endClassOrMixinOrExtensionBody(DeclarationKind.Class, 1, {, })
- endClassDeclaration(class, })
- endTopLevelDeclaration(test)
- beginMetadataStar(test)
- endMetadataStar(0)
- beginTopLevelMember(test)
- beginTopLevelMethod(}, null, null)
- handleNoType(})
- handleIdentifier(test, topLevelFunctionDeclaration)
- handleNoTypeVariables(()
- beginFormalParameters((, MemberKind.TopLevelMethod)
- beginMetadataStar(dynamic)
- endMetadataStar(0)
- beginFormalParameter(dynamic, MemberKind.TopLevelMethod, null, null, null)
- handleIdentifier(dynamic, typeReference)
- handleNoTypeArguments(x)
- handleType(dynamic, null)
- handleIdentifier(x, formalParameterDeclaration)
- handleFormalParameterWithoutValue())
- endFormalParameter(null, null, null, x, null, null, FormalParameterKind.requiredPositional, MemberKind.TopLevelMethod)
- endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
- handleAsyncModifier(null, null)
- beginBlockFunctionBody({)
- beginSwitchStatement(switch)
- handleIdentifier(x, expression)
- handleNoTypeArguments())
- handleNoArguments())
- handleSend(x, ))
- handleParenthesizedCondition((, null)
- beginSwitchBlock({)
- beginCaseExpression(case)
- handleNoTypeArguments(()
- handleIdentifier(f, namedArgumentReference)
- handleLiteralInt(1)
- handleConstantPattern(null)
- handlePatternField(:)
- handleExtractorPatternFields(1, (, ))
- handleExtractorPattern(C, null, null)
- beginAsOperatorType(as)
- handleIdentifier(Object, typeReference)
- handleNoTypeArguments(:)
- handleType(Object, null)
- endAsOperatorType(as)
- handleCastPattern(as)
- endCaseExpression(:)
- handleCaseMatch(case, :)
- beginSwitchCase(0, 1, case)
- handleBreakStatement(false, break, ;)
- endSwitchCase(0, 1, null, null, 1, case, })
- endSwitchBlock(1, {, })
- endSwitchStatement(switch, })
- endBlockFunctionBody(1, {, })
- endTopLevelMethod(test, null, })
endTopLevelDeclaration()
-endCompilationUnit(4, )
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.intertwined.expect
index 7bb08dd..664168f 100644
--- a/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.intertwined.expect
@@ -103,241 +103,6 @@
notEofOrValue(}, })
listener: endBlockFunctionBody(1, {, })
listener: endTopLevelMethod(f, null, })
- listener: endTopLevelDeclaration(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''')
- parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
- parseMetadataStar(})
- listener: beginMetadataStar(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''')
- listener: endMetadataStar(0)
- listener: beginTopLevelMember(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''')
- parseInvalidTopLevelDeclaration(})
- reportRecoverableErrorWithToken(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''', Instance of 'Template<(Token) => Message>')
- listener: handleRecoverableError(Message[ExpectedDeclaration, Expected a declaration, but got '''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''''., null, {lexeme: ''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse('''}], ''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''', ''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''')
- listener: handleInvalidTopLevelDeclaration(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''')
- listener: endTopLevelDeclaration(class)
- parseTopLevelDeclarationImpl(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''', Instance of 'DirectiveContext')
- parseMetadataStar(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''')
- listener: beginMetadataStar(class)
- listener: endMetadataStar(0)
- parseTopLevelKeywordDeclaration(''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse(''', class, null, Instance of 'DirectiveContext')
- parseClassOrNamedMixinApplication(null, null, null, class)
- listener: beginClassOrMixinOrNamedMixinApplicationPrelude(class)
- ensureIdentifier(class, classOrMixinDeclaration)
- listener: handleIdentifier(C, classOrMixinDeclaration)
- listener: handleNoTypeVariables({)
- listener: beginClassDeclaration(class, null, null, null, C)
- parseClass(C, class, class, C)
- parseClassHeaderOpt(C, class, class)
- parseClassExtendsOpt(C)
- listener: handleNoType(C)
- listener: handleClassExtends(null, 1)
- parseClassWithClauseOpt(C)
- listener: handleClassNoWithClause()
- parseClassOrMixinOrEnumImplementsOpt(C)
- listener: handleImplements(null, 0)
- listener: handleClassHeader(class, class, null)
- parseClassOrMixinOrExtensionBody(C, DeclarationKind.Class, C)
- listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
- notEofOrValue(}, int)
- parseClassOrMixinOrExtensionOrEnumMemberImpl({, DeclarationKind.Class, C)
- parseMetadataStar({)
- listener: beginMetadataStar(int)
- listener: endMetadataStar(0)
- listener: beginMember()
- parseFields({, null, null, null, null, null, null, null, {, Instance of 'SimpleNullableType', f, DeclarationKind.Class, C, false)
- listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, null, {)
- listener: handleIdentifier(int, typeReference)
- listener: handleNoTypeArguments(?)
- listener: handleType(int, ?)
- ensureIdentifierPotentiallyRecovered(?, fieldDeclaration, false)
- listener: handleIdentifier(f, fieldDeclaration)
- parseFieldInitializerOpt(f, f, null, null, null, null, null, DeclarationKind.Class, C)
- listener: handleNoFieldInitializer(;)
- listener: endClassFields(null, null, null, null, null, null, null, 1, int, ;)
- listener: endMember()
- notEofOrValue(}, })
- listener: endClassOrMixinOrExtensionBody(DeclarationKind.Class, 1, {, })
- listener: endClassDeclaration(class, })
- listener: endTopLevelDeclaration(test)
- parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
- parseMetadataStar(})
- listener: beginMetadataStar(test)
- listener: endMetadataStar(0)
- parseTopLevelMemberImpl(})
- listener: beginTopLevelMember(test)
- isReservedKeyword(()
- parseTopLevelMethod(}, null, null, }, Instance of 'NoType', null, test, false)
- listener: beginTopLevelMethod(}, null, null)
- listener: handleNoType(})
- ensureIdentifierPotentiallyRecovered(}, topLevelFunctionDeclaration, false)
- listener: handleIdentifier(test, topLevelFunctionDeclaration)
- parseMethodTypeVar(test)
- listener: handleNoTypeVariables(()
- parseGetterOrFormalParameters(test, test, false, MemberKind.TopLevelMethod)
- parseFormalParameters(test, MemberKind.TopLevelMethod)
- parseFormalParametersRest((, MemberKind.TopLevelMethod)
- listener: beginFormalParameters((, MemberKind.TopLevelMethod)
- parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.TopLevelMethod)
- parseMetadataStar(()
- listener: beginMetadataStar(dynamic)
- listener: endMetadataStar(0)
- listener: beginFormalParameter(dynamic, MemberKind.TopLevelMethod, null, null, null)
- listener: handleIdentifier(dynamic, typeReference)
- listener: handleNoTypeArguments(x)
- listener: handleType(dynamic, null)
- ensureIdentifier(dynamic, formalParameterDeclaration)
- listener: handleIdentifier(x, formalParameterDeclaration)
- listener: handleFormalParameterWithoutValue())
- listener: endFormalParameter(null, null, null, x, null, null, FormalParameterKind.requiredPositional, MemberKind.TopLevelMethod)
- listener: endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
- parseAsyncModifierOpt())
- listener: handleAsyncModifier(null, null)
- inPlainSync()
- parseFunctionBody(), false, false)
- listener: beginBlockFunctionBody({)
- notEofOrValue(}, switch)
- parseStatement({)
- parseStatementX({)
- parseSwitchStatement({)
- listener: beginSwitchStatement(switch)
- ensureParenthesizedCondition(switch, allowCase: false)
- parseExpressionInParenthesisRest((, allowCase: false)
- parseExpression(()
- parsePrecedenceExpression((, 1, true)
- parseUnaryExpression((, true)
- parsePrimary((, expression)
- parseSendOrFunctionLiteral((, expression)
- parseSend((, expression)
- isNextIdentifier(()
- ensureIdentifier((, expression)
- listener: handleIdentifier(x, expression)
- listener: handleNoTypeArguments())
- parseArgumentsOpt(x)
- listener: handleNoArguments())
- listener: handleSend(x, ))
- ensureCloseParen(x, ()
- listener: handleParenthesizedCondition((, null)
- parseSwitchBlock())
- ensureBlock(), null, switch statement)
- listener: beginSwitchBlock({)
- notEofOrValue(}, case)
- peekPastLabels(case)
- listener: beginCaseExpression(case)
- parsePattern(case, precedence: 1)
- parsePrimaryPattern(case)
- listener: handleNoTypeArguments(()
- parseExtractorPatternRest(C)
- ensureIdentifier((, namedArgumentReference)
- listener: handleIdentifier(f, namedArgumentReference)
- parsePattern(:, precedence: 1)
- parsePrimaryPattern(:)
- parsePrecedenceExpression(:, 18, false)
- parseUnaryExpression(:, false)
- parsePrimary(:, expression)
- parseLiteralInt(:)
- listener: handleLiteralInt(1)
- listener: handleConstantPattern(null)
- listener: handlePatternField(:)
- listener: handleExtractorPatternFields(1, (, ))
- listener: handleExtractorPattern(C, null, null)
- listener: beginAsOperatorType(as)
- computeTypeAfterIsOrAs(as)
- listener: handleIdentifier(Object, typeReference)
- listener: handleNoTypeArguments(:)
- listener: handleType(Object, null)
- listener: endAsOperatorType(as)
- listener: handleCastPattern(as)
- ensureColon(Object)
- listener: endCaseExpression(:)
- listener: handleCaseMatch(case, :)
- peekPastLabels(break)
- parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
- listener: beginSwitchCase(0, 1, case)
- parseStatement(:)
- parseStatementX(:)
- parseBreakStatement(:)
- isBreakAllowed()
- ensureSemicolon(break)
- listener: handleBreakStatement(false, break, ;)
- peekPastLabels(})
- listener: endSwitchCase(0, 1, null, null, 1, case, })
- notEofOrValue(}, })
- listener: endSwitchBlock(1, {, })
- listener: endSwitchStatement(switch, })
- notEofOrValue(}, })
- listener: endBlockFunctionBody(1, {, })
- listener: endTopLevelMethod(test, null, })
listener: endTopLevelDeclaration()
reportAllErrorTokens(f)
- listener: endCompilationUnit(4, )
+ listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.parser.expect b/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.parser.expect
index dd1ca3d..670442da 100644
--- a/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.parser.expect
+++ b/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.parser.expect
@@ -5,28 +5,6 @@
true ? *synthetic*: 2;
} catch (e) {}
}
-''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse('''
-
-
-
-
-
-
-class C {
-int? f;
-}
-test(dynamic x) {
-switch (x) {
-case C(f: 1) as Object:
-break;
-}
-}
f[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
@@ -34,26 +12,4 @@
true[KeywordToken] ?[SimpleToken] [SyntheticStringToken]:[SimpleToken] 2[StringToken];[SimpleToken]
}[SimpleToken] catch[KeywordToken] ([BeginToken]e[StringToken])[SimpleToken] {[BeginToken]}[SimpleToken]
}[SimpleToken]
-''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse('''[StringToken]
-
-
-
-
-
-
-class[KeywordToken] C[StringToken] {[BeginToken]
-int[StringToken]?[SimpleToken] f[StringToken];[SimpleToken]
-}[SimpleToken]
-test[StringToken]([BeginToken]dynamic[KeywordToken] x[StringToken])[SimpleToken] {[BeginToken]
-switch[KeywordToken] ([BeginToken]x[StringToken])[SimpleToken] {[BeginToken]
-case[KeywordToken] C[StringToken]([BeginToken]f[StringToken]:[SimpleToken] 1[StringToken])[SimpleToken] as[KeywordToken] Object[StringToken]:[SimpleToken]
-break[KeywordToken];[SimpleToken]
-}[SimpleToken]
-}[SimpleToken]
[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.scanner.expect b/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.scanner.expect
index a8fad5e..e2351c5 100644
--- a/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.scanner.expect
+++ b/pkg/front_end/parser_testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.scanner.expect
@@ -3,28 +3,6 @@
true ? : 2;
} catch (e) {}
}
-''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse('''
-
-
-
-
-
-
-class C {
-int? f;
-}
-test(dynamic x) {
-switch (x) {
-case C(f: 1) as Object:
-break;
-}
-}
f[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
@@ -32,26 +10,4 @@
true[KeywordToken] ?[SimpleToken] :[SimpleToken] 2[StringToken];[SimpleToken]
}[SimpleToken] catch[KeywordToken] ([BeginToken]e[StringToken])[SimpleToken] {[BeginToken]}[SimpleToken]
}[SimpleToken]
-''', errors: [
- error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
- ]);
- }
-
- test_extractor_pattern_inside_cast() {
- _parse('''[StringToken]
-
-
-
-
-
-
-class[KeywordToken] C[StringToken] {[BeginToken]
-int[StringToken]?[SimpleToken] f[StringToken];[SimpleToken]
-}[SimpleToken]
-test[StringToken]([BeginToken]dynamic[KeywordToken] x[StringToken])[SimpleToken] {[BeginToken]
-switch[KeywordToken] ([BeginToken]x[StringToken])[SimpleToken] {[BeginToken]
-case[KeywordToken] C[StringToken]([BeginToken]f[StringToken]:[SimpleToken] 1[StringToken])[SimpleToken] as[KeywordToken] Object[StringToken]:[SimpleToken]
-break[KeywordToken];[SimpleToken]
-}[SimpleToken]
-}[SimpleToken]
[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart b/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart
new file mode 100644
index 0000000..e9c0965
--- /dev/null
+++ b/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart
@@ -0,0 +1,10 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {
+ switch (x) {
+ case C(f: 1) as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.expect b/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.expect
new file mode 100644
index 0000000..ceb380d
--- /dev/null
+++ b/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.expect
@@ -0,0 +1,79 @@
+beginCompilationUnit(class)
+ beginMetadataStar(class)
+ endMetadataStar(0)
+ beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+ handleIdentifier(C, classOrMixinDeclaration)
+ handleNoTypeVariables({)
+ beginClassDeclaration(class, null, null, null, C)
+ handleNoType(C)
+ handleClassExtends(null, 1)
+ handleClassNoWithClause()
+ handleImplements(null, 0)
+ handleClassHeader(class, class, null)
+ beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+ beginMetadataStar(int)
+ endMetadataStar(0)
+ beginMember()
+ beginFields(DeclarationKind.Class, null, null, null, null, null, null, null, {)
+ handleIdentifier(int, typeReference)
+ handleNoTypeArguments(?)
+ handleType(int, ?)
+ handleIdentifier(f, fieldDeclaration)
+ handleNoFieldInitializer(;)
+ endClassFields(null, null, null, null, null, null, null, 1, int, ;)
+ endMember()
+ endClassOrMixinOrExtensionBody(DeclarationKind.Class, 1, {, })
+ endClassDeclaration(class, })
+ endTopLevelDeclaration(test)
+ beginMetadataStar(test)
+ endMetadataStar(0)
+ beginTopLevelMember(test)
+ beginTopLevelMethod(}, null, null)
+ handleNoType(})
+ handleIdentifier(test, topLevelFunctionDeclaration)
+ handleNoTypeVariables(()
+ beginFormalParameters((, MemberKind.TopLevelMethod)
+ beginMetadataStar(dynamic)
+ endMetadataStar(0)
+ beginFormalParameter(dynamic, MemberKind.TopLevelMethod, null, null, null)
+ handleIdentifier(dynamic, typeReference)
+ handleNoTypeArguments(x)
+ handleType(dynamic, null)
+ handleIdentifier(x, formalParameterDeclaration)
+ handleFormalParameterWithoutValue())
+ endFormalParameter(null, null, null, x, null, null, FormalParameterKind.requiredPositional, MemberKind.TopLevelMethod)
+ endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+ handleAsyncModifier(null, null)
+ beginBlockFunctionBody({)
+ beginSwitchStatement(switch)
+ handleIdentifier(x, expression)
+ handleNoTypeArguments())
+ handleNoArguments())
+ handleSend(x, ))
+ handleParenthesizedCondition((, null)
+ beginSwitchBlock({)
+ beginCaseExpression(case)
+ handleNoTypeArguments(()
+ handleIdentifier(f, namedArgumentReference)
+ handleLiteralInt(1)
+ handleConstantPattern(null)
+ handlePatternField(:)
+ handleExtractorPatternFields(1, (, ))
+ handleExtractorPattern(C, null, null)
+ beginAsOperatorType(as)
+ handleIdentifier(Object, typeReference)
+ handleNoTypeArguments(:)
+ handleType(Object, null)
+ endAsOperatorType(as)
+ handleCastPattern(as)
+ endCaseExpression(:)
+ handleCaseMatch(case, :)
+ beginSwitchCase(0, 1, case)
+ handleBreakStatement(false, break, ;)
+ endSwitchCase(0, 1, null, null, 1, case, })
+ endSwitchBlock(1, {, })
+ endSwitchStatement(switch, })
+ endBlockFunctionBody(1, {, })
+ endTopLevelMethod(test, null, })
+ endTopLevelDeclaration()
+endCompilationUnit(2, )
diff --git a/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.intertwined.expect
new file mode 100644
index 0000000..20a5d2e
--- /dev/null
+++ b/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.intertwined.expect
@@ -0,0 +1,159 @@
+parseUnit(class)
+ skipErrorTokens(class)
+ listener: beginCompilationUnit(class)
+ syntheticPreviousToken(class)
+ parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+ parseMetadataStar()
+ listener: beginMetadataStar(class)
+ listener: endMetadataStar(0)
+ parseTopLevelKeywordDeclaration(, class, null, Instance of 'DirectiveContext')
+ parseClassOrNamedMixinApplication(null, null, null, class)
+ listener: beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+ ensureIdentifier(class, classOrMixinDeclaration)
+ listener: handleIdentifier(C, classOrMixinDeclaration)
+ listener: handleNoTypeVariables({)
+ listener: beginClassDeclaration(class, null, null, null, C)
+ parseClass(C, class, class, C)
+ parseClassHeaderOpt(C, class, class)
+ parseClassExtendsOpt(C)
+ listener: handleNoType(C)
+ listener: handleClassExtends(null, 1)
+ parseClassWithClauseOpt(C)
+ listener: handleClassNoWithClause()
+ parseClassOrMixinOrEnumImplementsOpt(C)
+ listener: handleImplements(null, 0)
+ listener: handleClassHeader(class, class, null)
+ parseClassOrMixinOrExtensionBody(C, DeclarationKind.Class, C)
+ listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+ notEofOrValue(}, int)
+ parseClassOrMixinOrExtensionOrEnumMemberImpl({, DeclarationKind.Class, C)
+ parseMetadataStar({)
+ listener: beginMetadataStar(int)
+ listener: endMetadataStar(0)
+ listener: beginMember()
+ parseFields({, null, null, null, null, null, null, null, {, Instance of 'SimpleNullableType', f, DeclarationKind.Class, C, false)
+ listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, null, {)
+ listener: handleIdentifier(int, typeReference)
+ listener: handleNoTypeArguments(?)
+ listener: handleType(int, ?)
+ ensureIdentifierPotentiallyRecovered(?, fieldDeclaration, false)
+ listener: handleIdentifier(f, fieldDeclaration)
+ parseFieldInitializerOpt(f, f, null, null, null, null, null, DeclarationKind.Class, C)
+ listener: handleNoFieldInitializer(;)
+ listener: endClassFields(null, null, null, null, null, null, null, 1, int, ;)
+ listener: endMember()
+ notEofOrValue(}, })
+ listener: endClassOrMixinOrExtensionBody(DeclarationKind.Class, 1, {, })
+ listener: endClassDeclaration(class, })
+ listener: endTopLevelDeclaration(test)
+ parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+ parseMetadataStar(})
+ listener: beginMetadataStar(test)
+ listener: endMetadataStar(0)
+ parseTopLevelMemberImpl(})
+ listener: beginTopLevelMember(test)
+ isReservedKeyword(()
+ parseTopLevelMethod(}, null, null, }, Instance of 'NoType', null, test, false)
+ listener: beginTopLevelMethod(}, null, null)
+ listener: handleNoType(})
+ ensureIdentifierPotentiallyRecovered(}, topLevelFunctionDeclaration, false)
+ listener: handleIdentifier(test, topLevelFunctionDeclaration)
+ parseMethodTypeVar(test)
+ listener: handleNoTypeVariables(()
+ parseGetterOrFormalParameters(test, test, false, MemberKind.TopLevelMethod)
+ parseFormalParameters(test, MemberKind.TopLevelMethod)
+ parseFormalParametersRest((, MemberKind.TopLevelMethod)
+ listener: beginFormalParameters((, MemberKind.TopLevelMethod)
+ parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.TopLevelMethod)
+ parseMetadataStar(()
+ listener: beginMetadataStar(dynamic)
+ listener: endMetadataStar(0)
+ listener: beginFormalParameter(dynamic, MemberKind.TopLevelMethod, null, null, null)
+ listener: handleIdentifier(dynamic, typeReference)
+ listener: handleNoTypeArguments(x)
+ listener: handleType(dynamic, null)
+ ensureIdentifier(dynamic, formalParameterDeclaration)
+ listener: handleIdentifier(x, formalParameterDeclaration)
+ listener: handleFormalParameterWithoutValue())
+ listener: endFormalParameter(null, null, null, x, null, null, FormalParameterKind.requiredPositional, MemberKind.TopLevelMethod)
+ listener: endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+ parseAsyncModifierOpt())
+ listener: handleAsyncModifier(null, null)
+ inPlainSync()
+ parseFunctionBody(), false, false)
+ listener: beginBlockFunctionBody({)
+ notEofOrValue(}, switch)
+ parseStatement({)
+ parseStatementX({)
+ parseSwitchStatement({)
+ listener: beginSwitchStatement(switch)
+ ensureParenthesizedCondition(switch, allowCase: false)
+ parseExpressionInParenthesisRest((, allowCase: false)
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseSendOrFunctionLiteral((, expression)
+ parseSend((, expression)
+ isNextIdentifier(()
+ ensureIdentifier((, expression)
+ listener: handleIdentifier(x, expression)
+ listener: handleNoTypeArguments())
+ parseArgumentsOpt(x)
+ listener: handleNoArguments())
+ listener: handleSend(x, ))
+ ensureCloseParen(x, ()
+ listener: handleParenthesizedCondition((, null)
+ parseSwitchBlock())
+ ensureBlock(), null, switch statement)
+ listener: beginSwitchBlock({)
+ notEofOrValue(}, case)
+ peekPastLabels(case)
+ listener: beginCaseExpression(case)
+ parsePattern(case, precedence: 1)
+ parsePrimaryPattern(case)
+ listener: handleNoTypeArguments(()
+ parseExtractorPatternRest(C)
+ ensureIdentifier((, namedArgumentReference)
+ listener: handleIdentifier(f, namedArgumentReference)
+ parsePattern(:, precedence: 1)
+ parsePrimaryPattern(:)
+ parsePrecedenceExpression(:, 18, false)
+ parseUnaryExpression(:, false)
+ parsePrimary(:, expression)
+ parseLiteralInt(:)
+ listener: handleLiteralInt(1)
+ listener: handleConstantPattern(null)
+ listener: handlePatternField(:)
+ listener: handleExtractorPatternFields(1, (, ))
+ listener: handleExtractorPattern(C, null, null)
+ listener: beginAsOperatorType(as)
+ computeTypeAfterIsOrAs(as)
+ listener: handleIdentifier(Object, typeReference)
+ listener: handleNoTypeArguments(:)
+ listener: handleType(Object, null)
+ listener: endAsOperatorType(as)
+ listener: handleCastPattern(as)
+ ensureColon(Object)
+ listener: endCaseExpression(:)
+ listener: handleCaseMatch(case, :)
+ peekPastLabels(break)
+ parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
+ listener: beginSwitchCase(0, 1, case)
+ parseStatement(:)
+ parseStatementX(:)
+ parseBreakStatement(:)
+ isBreakAllowed()
+ ensureSemicolon(break)
+ listener: handleBreakStatement(false, break, ;)
+ peekPastLabels(})
+ listener: endSwitchCase(0, 1, null, null, 1, case, })
+ notEofOrValue(}, })
+ listener: endSwitchBlock(1, {, })
+ listener: endSwitchStatement(switch, })
+ notEofOrValue(}, })
+ listener: endBlockFunctionBody(1, {, })
+ listener: endTopLevelMethod(test, null, })
+ listener: endTopLevelDeclaration()
+ reportAllErrorTokens(class)
+ listener: endCompilationUnit(2, )
diff --git a/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.parser.expect b/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.parser.expect
new file mode 100644
index 0000000..6304308
--- /dev/null
+++ b/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.parser.expect
@@ -0,0 +1,23 @@
+class C {
+int? f;
+}
+
+test(dynamic x) {
+switch (x) {
+case C(f: 1) as Object:
+break;
+}
+}
+
+
+class[KeywordToken] C[StringToken] {[BeginToken]
+int[StringToken]?[SimpleToken] f[StringToken];[SimpleToken]
+}[SimpleToken]
+
+test[StringToken]([BeginToken]dynamic[KeywordToken] x[StringToken])[SimpleToken] {[BeginToken]
+switch[KeywordToken] ([BeginToken]x[StringToken])[SimpleToken] {[BeginToken]
+case[KeywordToken] C[StringToken]([BeginToken]f[StringToken]:[SimpleToken] 1[StringToken])[SimpleToken] as[KeywordToken] Object[StringToken]:[SimpleToken]
+break[KeywordToken];[SimpleToken]
+}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.scanner.expect b/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.scanner.expect
new file mode 100644
index 0000000..6304308
--- /dev/null
+++ b/pkg/front_end/parser_testcases/patterns/extractor_pattern_inside_cast.dart.scanner.expect
@@ -0,0 +1,23 @@
+class C {
+int? f;
+}
+
+test(dynamic x) {
+switch (x) {
+case C(f: 1) as Object:
+break;
+}
+}
+
+
+class[KeywordToken] C[StringToken] {[BeginToken]
+int[StringToken]?[SimpleToken] f[StringToken];[SimpleToken]
+}[SimpleToken]
+
+test[StringToken]([BeginToken]dynamic[KeywordToken] x[StringToken])[SimpleToken] {[BeginToken]
+switch[KeywordToken] ([BeginToken]x[StringToken])[SimpleToken] {[BeginToken]
+case[KeywordToken] C[StringToken]([BeginToken]f[StringToken]:[SimpleToken] 1[StringToken])[SimpleToken] as[KeywordToken] Object[StringToken]:[SimpleToken]
+break[KeywordToken];[SimpleToken]
+}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/test/fasta/generator_to_string_test.dart b/pkg/front_end/test/fasta/generator_to_string_test.dart
index 2d4703b..9ee4a20 100644
--- a/pkg/front_end/test/fasta/generator_to_string_test.dart
+++ b/pkg/front_end/test/fasta/generator_to_string_test.dart
@@ -18,7 +18,6 @@
Arguments,
Class,
Component,
- DartType,
Expression,
FunctionNode,
Library,
@@ -29,7 +28,6 @@
TypeParameter,
VariableDeclaration,
VariableGet,
- VoidType,
defaultLanguageVersion,
dummyLibraryDependency;
import 'package:kernel/class_hierarchy.dart';
@@ -78,7 +76,6 @@
ClassHierarchy hierarchy = new ClassHierarchy(component, coreTypes);
Arguments arguments = new Arguments(<Expression>[new StringLiteral("arg")]);
- DartType type = const VoidType();
Expression expression =
new VariableGet(new VariableDeclaration("expression"));
Expression index = new VariableGet(new VariableDeclaration("index"));
@@ -153,10 +150,8 @@
helper, token, generator, expression, assignmentOperator));
check("DelayedPostfixIncrement(offset: 4, binaryOperator: +)",
new DelayedPostfixIncrement(helper, token, generator, binaryOperator));
- check(
- "VariableUseGenerator(offset: 4, variable: dynamic #t1;\n,"
- " promotedType: void)",
- new VariableUseGenerator(helper, token, variable, type));
+ check("VariableUseGenerator(offset: 4, variable: dynamic #t1;\n)",
+ new VariableUseGenerator(helper, token, variable));
check(
"PropertyAccessGenerator(offset: 4,"
" receiver: expression, name: bar)",
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index b8910ed..db122b1 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -47,6 +47,7 @@
import 'package:front_end/src/fasta/builder/library_builder.dart'
show LibraryBuilder;
import 'package:front_end/src/fasta/compiler_context.dart' show CompilerContext;
+import 'package:front_end/src/fasta/crash.dart';
import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget;
import 'package:front_end/src/fasta/incremental_compiler.dart'
show IncrementalCompiler;
@@ -2335,58 +2336,62 @@
});
}
- return await CompilerContext.runWithOptions(compilationSetup.options,
- (_) async {
- Component? alsoAppend = compilationSetup.testOptions.component;
- if (description.uri.pathSegments.last.endsWith(".no_link.dart")) {
- alsoAppend = null;
- }
+ try {
+ return await CompilerContext.runWithOptions(compilationSetup.options,
+ (_) async {
+ Component? alsoAppend = compilationSetup.testOptions.component;
+ if (description.uri.pathSegments.last.endsWith(".no_link.dart")) {
+ alsoAppend = null;
+ }
- Set<Library>? excludedLibraries;
- if (compileMode == CompileMode.modular) {
- excludedLibraries = alsoAppend?.libraries.toSet();
- }
- excludedLibraries ??= const {};
+ Set<Library>? excludedLibraries;
+ if (compileMode == CompileMode.modular) {
+ excludedLibraries = alsoAppend?.libraries.toSet();
+ }
+ excludedLibraries ??= const {};
- KernelTarget sourceTarget = await outlineInitialization(context,
- description, compilationSetup.options, <Uri>[description.uri],
- alsoAppend: alsoAppend);
- ValidatingInstrumentation instrumentation =
- new ValidatingInstrumentation();
- await instrumentation.loadExpectations(description.uri);
- sourceTarget.loader.instrumentation = instrumentation;
- BuildResult buildResult = await sourceTarget.buildOutlines();
- Component p = buildResult.component!;
- Set<Uri> userLibraries = createUserLibrariesImportUriSet(
- p, sourceTarget.uriTranslator,
- excludedLibraries: excludedLibraries);
- if (compileMode != CompileMode.outline) {
- buildResult = await sourceTarget.buildComponent(
- macroApplications: buildResult.macroApplications,
- verify: compilationSetup.folderOptions.noVerify
- ? false
- : context.verify);
- p = buildResult.component!;
- instrumentation.finish();
- if (instrumentation.hasProblems) {
- if (updateComments) {
- await instrumentation.fixSource(description.uri, false);
- } else {
- buildResult.macroApplications?.close();
- return new Result<ComponentResult>(
- new ComponentResult(description, p, userLibraries,
- compilationSetup, sourceTarget),
- context.expectationSet["InstrumentationMismatch"],
- instrumentation.problemsAsString,
- autoFixCommand: '${UPDATE_COMMENTS}=true',
- canBeFixWithUpdateExpectations: true);
+ KernelTarget sourceTarget = await outlineInitialization(context,
+ description, compilationSetup.options, <Uri>[description.uri],
+ alsoAppend: alsoAppend);
+ ValidatingInstrumentation instrumentation =
+ new ValidatingInstrumentation();
+ await instrumentation.loadExpectations(description.uri);
+ sourceTarget.loader.instrumentation = instrumentation;
+ BuildResult buildResult = await sourceTarget.buildOutlines();
+ Component p = buildResult.component!;
+ Set<Uri> userLibraries = createUserLibrariesImportUriSet(
+ p, sourceTarget.uriTranslator,
+ excludedLibraries: excludedLibraries);
+ if (compileMode != CompileMode.outline) {
+ buildResult = await sourceTarget.buildComponent(
+ macroApplications: buildResult.macroApplications,
+ verify: compilationSetup.folderOptions.noVerify
+ ? false
+ : context.verify);
+ p = buildResult.component!;
+ instrumentation.finish();
+ if (instrumentation.hasProblems) {
+ if (updateComments) {
+ await instrumentation.fixSource(description.uri, false);
+ } else {
+ buildResult.macroApplications?.close();
+ return new Result<ComponentResult>(
+ new ComponentResult(description, p, userLibraries,
+ compilationSetup, sourceTarget),
+ context.expectationSet["InstrumentationMismatch"],
+ instrumentation.problemsAsString,
+ autoFixCommand: '${UPDATE_COMMENTS}=true',
+ canBeFixWithUpdateExpectations: true);
+ }
}
}
- }
- buildResult.macroApplications?.close();
- return pass(new ComponentResult(
- description, p, userLibraries, compilationSetup, sourceTarget));
- });
+ buildResult.macroApplications?.close();
+ return pass(new ComponentResult(
+ description, p, userLibraries, compilationSetup, sourceTarget));
+ });
+ } catch (e, s) {
+ return reportCrash(e, s);
+ }
}
Future<KernelTarget> outlineInitialization(
diff --git a/pkg/front_end/test/patching/data/const_constructors/origin.dart b/pkg/front_end/test/patching/data/const_constructors/origin.dart
index 6d306cb..62c999d 100644
--- a/pkg/front_end/test/patching/data/const_constructors/origin.dart
+++ b/pkg/front_end/test/patching/data/const_constructors/origin.dart
@@ -7,9 +7,9 @@
/*class: PatchedClass:
kernel-members=[
- PatchedClass.,
- _field
- ]
+ PatchedClass.,
+ _field],
+ scope=[_field]
*/
class PatchedClass {
external const PatchedClass({int field});
diff --git a/pkg/front_end/test/patching/data/initializing_formals/origin.dart b/pkg/front_end/test/patching/data/initializing_formals/origin.dart
index 4c4cbff..af3b344 100644
--- a/pkg/front_end/test/patching/data/initializing_formals/origin.dart
+++ b/pkg/front_end/test/patching/data/initializing_formals/origin.dart
@@ -10,7 +10,9 @@
PatchedClass.,
_privateField,
publicField],
- scope=[publicField]
+ scope=[
+ _privateField,
+ publicField]
*/
class PatchedClass {
int publicField;
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index 21a0942..00f40fb 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -831,6 +831,7 @@
masking
masks
master
+matchers
materialize
matters
mature
diff --git a/pkg/front_end/test/spell_checking_list_common.txt b/pkg/front_end/test/spell_checking_list_common.txt
index fb577ba..c235d03 100644
--- a/pkg/front_end/test/spell_checking_list_common.txt
+++ b/pkg/front_end/test/spell_checking_list_common.txt
@@ -491,6 +491,9 @@
clue
code
coerce
+coerced
+coercing
+coercion
coincides
coinductively
collapses
@@ -1257,6 +1260,7 @@
follows
food
for
+forbid
forbidden
force
forced
@@ -1388,6 +1392,7 @@
header
headers
heading
+heavier
help
helper
helpers
diff --git a/pkg/front_end/test/spell_checking_list_tests.txt b/pkg/front_end/test/spell_checking_list_tests.txt
index 30a620d..4f2db8a 100644
--- a/pkg/front_end/test/spell_checking_list_tests.txt
+++ b/pkg/front_end/test/spell_checking_list_tests.txt
@@ -564,6 +564,7 @@
rk
row
rows
+rr
ruin
runtimes
rv
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.expect b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.expect
index 2a15575..7cc8544 100644
--- a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.expect
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.expect
@@ -137,6 +137,7 @@
core::Object,
core::Pattern,
core::Match,
+ core::Record,
core::RegExp,
core::RegExpMatch,
core::Set,
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.outline.expect b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.outline.expect
index 1f957bf..3d807d3 100644
--- a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.outline.expect
@@ -72,6 +72,7 @@
core::Object,
core::Pattern,
core::Match,
+ core::Record,
core::RegExp,
core::RegExpMatch,
core::Set,
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.transformed.expect b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.transformed.expect
index 88fc5d2..fc9a9ba 100644
--- a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.transformed.expect
@@ -133,6 +133,7 @@
core::Object,
core::Pattern,
core::Match,
+ core::Record,
core::RegExp,
core::RegExpMatch,
core::Set,
diff --git a/pkg/front_end/testcases/general/inject_private_patch/libraries.json b/pkg/front_end/testcases/general/inject_private_patch/libraries.json
new file mode 100644
index 0000000..8621f1d
--- /dev/null
+++ b/pkg/front_end/testcases/general/inject_private_patch/libraries.json
@@ -0,0 +1,13 @@
+{
+ "none": {
+ "libraries": {
+ "test": {
+ "patches": [
+ "patch_lib1.dart",
+ "patch_lib2.dart"
+ ],
+ "uri": "origin_lib.dart"
+ }
+ }
+ }
+}
diff --git a/pkg/front_end/testcases/general/inject_private_patch/main.dart b/pkg/front_end/testcases/general/inject_private_patch/main.dart
new file mode 100644
index 0000000..2b5aa66
--- /dev/null
+++ b/pkg/front_end/testcases/general/inject_private_patch/main.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:test';
+
+main() {}
diff --git a/pkg/front_end/testcases/general/inject_private_patch/main.dart.textual_outline.expect b/pkg/front_end/testcases/general/inject_private_patch/main.dart.textual_outline.expect
new file mode 100644
index 0000000..3c9c90e
--- /dev/null
+++ b/pkg/front_end/testcases/general/inject_private_patch/main.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+import 'dart:test';
+
+main() {}
diff --git a/pkg/front_end/testcases/general/inject_private_patch/main.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/inject_private_patch/main.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..3c9c90e
--- /dev/null
+++ b/pkg/front_end/testcases/general/inject_private_patch/main.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+import 'dart:test';
+
+main() {}
diff --git a/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.expect b/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.expect
new file mode 100644
index 0000000..01e1fe7
--- /dev/null
+++ b/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.expect
@@ -0,0 +1,144 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:test";
+
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:35:7: Error: The non-abstract class 'ClassImplements' is missing implementations for these members:
+// - Class._privateInjectedInstanceMember1
+// - Class._privateInjectedInstanceMember2
+// Try to either
+// - provide an implementation,
+// - inherit an implementation from a superclass or mixin,
+// - mark the class as abstract, or
+// - provide a 'noSuchMethod' implementation.
+//
+// class ClassImplements
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/general/inject_private_patch/patch_lib1.dart:10:8: Context: 'Class._privateInjectedInstanceMember1' is defined here.
+// void _privateInjectedInstanceMember1(Class c) {
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/general/inject_private_patch/patch_lib2.dart:10:8: Context: 'Class._privateInjectedInstanceMember2' is defined here.
+// void _privateInjectedInstanceMember2(Class c) {
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:32:8: Error: The method 'ClassExtends._privateInstanceMember' has fewer positional arguments than those of overridden method 'Class._privateInstanceMember'.
+// void _privateInstanceMember() {}
+// ^
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:6:8: Context: This is the overridden method ('_privateInstanceMember').
+// void _privateInstanceMember(Class c) {
+// ^
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:37:8: Error: The method 'ClassImplements._privateInstanceMember' has fewer positional arguments than those of overridden method 'Class._privateInstanceMember'.
+// void _privateInstanceMember() {}
+// ^
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:6:8: Context: This is the overridden method ('_privateInstanceMember').
+// void _privateInstanceMember(Class c) {
+// ^
+//
+import self as self2;
+import "dart:_internal" as _in;
+import "dart:core" as core;
+
+import "dart:_internal";
+import "dart:_internal";
+
+@#C1
+@#C1
+class Class extends core::Object {
+ synthetic constructor •() → self2::Class
+ : super core::Object::•()
+ ;
+ method _privateInstanceMember(self2::Class c) → void {
+ this.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ }
+ static method _privateStaticMember() → void {
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ }
+ method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedInstanceMember1(self2::Class c) → void {
+ this.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ }
+ static method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedStaticMember1() → void {
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ }
+ method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedInstanceMember2(self2::Class c) → void {
+ this.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ }
+ static method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedStaticMember2() → void {
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ }
+}
+class ClassExtends extends self2::Class {
+ synthetic constructor •() → self2::ClassExtends
+ : super self2::Class::•()
+ ;
+ method _privateInstanceMember() → void {}
+}
+class ClassImplements extends core::Object implements self2::Class {
+ synthetic constructor •() → self2::ClassImplements
+ : super core::Object::•()
+ ;
+ method _privateInstanceMember() → void {}
+ no-such-method-forwarder method _privateInjectedInstanceMember1(self2::Class c) → void
+ return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[c]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic};
+ no-such-method-forwarder method _privateInjectedInstanceMember2(self2::Class c) → void
+ return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[c]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic};
+}
+static method _privateTopLevelMember() → void {
+ self2::_privateTopLevelMember();
+ self2::_privateInjectedTopLevelMember1();
+ self2::_privateInjectedTopLevelMember2();
+}
+static method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedTopLevelMember1() → void {
+ self2::_privateTopLevelMember();
+ self2::_privateInjectedTopLevelMember1();
+ self2::_privateInjectedTopLevelMember2();
+}
+static method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedTopLevelMember2() → void {
+ self2::_privateTopLevelMember();
+ self2::_privateInjectedTopLevelMember1();
+ self2::_privateInjectedTopLevelMember2();
+}
+
+constants {
+ #C1 = _in::_Patch {}
+ #C2 = #dart:test::_privateInjectedInstanceMember1
+ #C3 = <core::Type*>[]
+ #C4 = <core::Symbol*, dynamic>{)
+ #C5 = #dart:test::_privateInjectedInstanceMember2
+}
diff --git a/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.modular.expect b/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.modular.expect
new file mode 100644
index 0000000..01e1fe7
--- /dev/null
+++ b/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.modular.expect
@@ -0,0 +1,144 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:test";
+
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:35:7: Error: The non-abstract class 'ClassImplements' is missing implementations for these members:
+// - Class._privateInjectedInstanceMember1
+// - Class._privateInjectedInstanceMember2
+// Try to either
+// - provide an implementation,
+// - inherit an implementation from a superclass or mixin,
+// - mark the class as abstract, or
+// - provide a 'noSuchMethod' implementation.
+//
+// class ClassImplements
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/general/inject_private_patch/patch_lib1.dart:10:8: Context: 'Class._privateInjectedInstanceMember1' is defined here.
+// void _privateInjectedInstanceMember1(Class c) {
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/general/inject_private_patch/patch_lib2.dart:10:8: Context: 'Class._privateInjectedInstanceMember2' is defined here.
+// void _privateInjectedInstanceMember2(Class c) {
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:32:8: Error: The method 'ClassExtends._privateInstanceMember' has fewer positional arguments than those of overridden method 'Class._privateInstanceMember'.
+// void _privateInstanceMember() {}
+// ^
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:6:8: Context: This is the overridden method ('_privateInstanceMember').
+// void _privateInstanceMember(Class c) {
+// ^
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:37:8: Error: The method 'ClassImplements._privateInstanceMember' has fewer positional arguments than those of overridden method 'Class._privateInstanceMember'.
+// void _privateInstanceMember() {}
+// ^
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:6:8: Context: This is the overridden method ('_privateInstanceMember').
+// void _privateInstanceMember(Class c) {
+// ^
+//
+import self as self2;
+import "dart:_internal" as _in;
+import "dart:core" as core;
+
+import "dart:_internal";
+import "dart:_internal";
+
+@#C1
+@#C1
+class Class extends core::Object {
+ synthetic constructor •() → self2::Class
+ : super core::Object::•()
+ ;
+ method _privateInstanceMember(self2::Class c) → void {
+ this.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ }
+ static method _privateStaticMember() → void {
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ }
+ method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedInstanceMember1(self2::Class c) → void {
+ this.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ }
+ static method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedStaticMember1() → void {
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ }
+ method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedInstanceMember2(self2::Class c) → void {
+ this.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ }
+ static method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedStaticMember2() → void {
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ }
+}
+class ClassExtends extends self2::Class {
+ synthetic constructor •() → self2::ClassExtends
+ : super self2::Class::•()
+ ;
+ method _privateInstanceMember() → void {}
+}
+class ClassImplements extends core::Object implements self2::Class {
+ synthetic constructor •() → self2::ClassImplements
+ : super core::Object::•()
+ ;
+ method _privateInstanceMember() → void {}
+ no-such-method-forwarder method _privateInjectedInstanceMember1(self2::Class c) → void
+ return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[c]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic};
+ no-such-method-forwarder method _privateInjectedInstanceMember2(self2::Class c) → void
+ return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[c]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic};
+}
+static method _privateTopLevelMember() → void {
+ self2::_privateTopLevelMember();
+ self2::_privateInjectedTopLevelMember1();
+ self2::_privateInjectedTopLevelMember2();
+}
+static method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedTopLevelMember1() → void {
+ self2::_privateTopLevelMember();
+ self2::_privateInjectedTopLevelMember1();
+ self2::_privateInjectedTopLevelMember2();
+}
+static method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedTopLevelMember2() → void {
+ self2::_privateTopLevelMember();
+ self2::_privateInjectedTopLevelMember1();
+ self2::_privateInjectedTopLevelMember2();
+}
+
+constants {
+ #C1 = _in::_Patch {}
+ #C2 = #dart:test::_privateInjectedInstanceMember1
+ #C3 = <core::Type*>[]
+ #C4 = <core::Symbol*, dynamic>{)
+ #C5 = #dart:test::_privateInjectedInstanceMember2
+}
diff --git a/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.outline.expect b/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.outline.expect
new file mode 100644
index 0000000..86f656d
--- /dev/null
+++ b/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.outline.expect
@@ -0,0 +1,103 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:test";
+
+static method main() → dynamic
+ ;
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:35:7: Error: The non-abstract class 'ClassImplements' is missing implementations for these members:
+// - Class._privateInjectedInstanceMember1
+// - Class._privateInjectedInstanceMember2
+// Try to either
+// - provide an implementation,
+// - inherit an implementation from a superclass or mixin,
+// - mark the class as abstract, or
+// - provide a 'noSuchMethod' implementation.
+//
+// class ClassImplements
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/general/inject_private_patch/patch_lib1.dart:10:8: Context: 'Class._privateInjectedInstanceMember1' is defined here.
+// void _privateInjectedInstanceMember1(Class c) {
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/general/inject_private_patch/patch_lib2.dart:10:8: Context: 'Class._privateInjectedInstanceMember2' is defined here.
+// void _privateInjectedInstanceMember2(Class c) {
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:32:8: Error: The method 'ClassExtends._privateInstanceMember' has fewer positional arguments than those of overridden method 'Class._privateInstanceMember'.
+// void _privateInstanceMember() {}
+// ^
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:6:8: Context: This is the overridden method ('_privateInstanceMember').
+// void _privateInstanceMember(Class c) {
+// ^
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:37:8: Error: The method 'ClassImplements._privateInstanceMember' has fewer positional arguments than those of overridden method 'Class._privateInstanceMember'.
+// void _privateInstanceMember() {}
+// ^
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:6:8: Context: This is the overridden method ('_privateInstanceMember').
+// void _privateInstanceMember(Class c) {
+// ^
+//
+import self as self2;
+import "dart:_internal" as _in;
+import "dart:core" as core;
+
+import "dart:_internal";
+import "dart:_internal";
+
+@_in::patch
+@_in::patch
+class Class extends core::Object {
+ synthetic constructor •() → self2::Class
+ ;
+ method _privateInstanceMember(self2::Class c) → void
+ ;
+ static method _privateStaticMember() → void
+ ;
+ method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedInstanceMember1(self2::Class c) → void
+ ;
+ static method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedStaticMember1() → void
+ ;
+ method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedInstanceMember2(self2::Class c) → void
+ ;
+ static method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedStaticMember2() → void
+ ;
+}
+class ClassExtends extends self2::Class {
+ synthetic constructor •() → self2::ClassExtends
+ ;
+ method _privateInstanceMember() → void
+ ;
+}
+class ClassImplements extends core::Object implements self2::Class {
+ synthetic constructor •() → self2::ClassImplements
+ ;
+ method _privateInstanceMember() → void
+ ;
+ no-such-method-forwarder method _privateInjectedInstanceMember1(self2::Class c) → void
+ return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#_privateInjectedInstanceMember1, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[c]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) → dynamic};
+ no-such-method-forwarder method _privateInjectedInstanceMember2(self2::Class c) → void
+ return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#_privateInjectedInstanceMember2, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[c]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) → dynamic};
+}
+static method _privateTopLevelMember() → void
+ ;
+static method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedTopLevelMember1() → void
+ ;
+static method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedTopLevelMember2() → void
+ ;
+
+
+Extra constant evaluation status:
+Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:7:8 -> InstanceConstant(const _Patch{})
+Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:7:8 -> InstanceConstant(const _Patch{})
+Evaluated: SymbolLiteral @ org-dartlang-testcase:///origin_lib.dart:35:7 -> SymbolConstant(#_privateInjectedInstanceMember1)
+Evaluated: ListLiteral @ org-dartlang-testcase:///origin_lib.dart:35:7 -> ListConstant(const <Type*>[])
+Evaluated: MapLiteral @ org-dartlang-testcase:///origin_lib.dart:35:7 -> MapConstant(const <Symbol*, dynamic>{})
+Evaluated: SymbolLiteral @ org-dartlang-testcase:///origin_lib.dart:35:7 -> SymbolConstant(#_privateInjectedInstanceMember2)
+Evaluated: ListLiteral @ org-dartlang-testcase:///origin_lib.dart:35:7 -> ListConstant(const <Type*>[])
+Evaluated: MapLiteral @ org-dartlang-testcase:///origin_lib.dart:35:7 -> MapConstant(const <Symbol*, dynamic>{})
+Extra constant evaluation: evaluated: 22, effectively constant: 8
diff --git a/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.transformed.expect b/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.transformed.expect
new file mode 100644
index 0000000..93ecb63
--- /dev/null
+++ b/pkg/front_end/testcases/general/inject_private_patch/main.dart.weak.transformed.expect
@@ -0,0 +1,144 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:test";
+
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:35:7: Error: The non-abstract class 'ClassImplements' is missing implementations for these members:
+// - Class._privateInjectedInstanceMember1
+// - Class._privateInjectedInstanceMember2
+// Try to either
+// - provide an implementation,
+// - inherit an implementation from a superclass or mixin,
+// - mark the class as abstract, or
+// - provide a 'noSuchMethod' implementation.
+//
+// class ClassImplements
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/general/inject_private_patch/patch_lib1.dart:10:8: Context: 'Class._privateInjectedInstanceMember1' is defined here.
+// void _privateInjectedInstanceMember1(Class c) {
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/general/inject_private_patch/patch_lib2.dart:10:8: Context: 'Class._privateInjectedInstanceMember2' is defined here.
+// void _privateInjectedInstanceMember2(Class c) {
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:32:8: Error: The method 'ClassExtends._privateInstanceMember' has fewer positional arguments than those of overridden method 'Class._privateInstanceMember'.
+// void _privateInstanceMember() {}
+// ^
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:6:8: Context: This is the overridden method ('_privateInstanceMember').
+// void _privateInstanceMember(Class c) {
+// ^
+//
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:37:8: Error: The method 'ClassImplements._privateInstanceMember' has fewer positional arguments than those of overridden method 'Class._privateInstanceMember'.
+// void _privateInstanceMember() {}
+// ^
+// pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart:6:8: Context: This is the overridden method ('_privateInstanceMember').
+// void _privateInstanceMember(Class c) {
+// ^
+//
+import self as self2;
+import "dart:_internal" as _in;
+import "dart:core" as core;
+
+import "dart:_internal";
+import "dart:_internal";
+
+@#C1
+@#C1
+class Class extends core::Object {
+ synthetic constructor •() → self2::Class
+ : super core::Object::•()
+ ;
+ method _privateInstanceMember(self2::Class c) → void {
+ this.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ }
+ static method _privateStaticMember() → void {
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ }
+ method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedInstanceMember1(self2::Class c) → void {
+ this.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ }
+ static method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedStaticMember1() → void {
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ }
+ method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedInstanceMember2(self2::Class c) → void {
+ this.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ this.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInstanceMember}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember1}(c){(self2::Class) → void};
+ c.{self2::Class::_privateInjectedInstanceMember2}(c){(self2::Class) → void};
+ }
+ static method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedStaticMember2() → void {
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ self2::Class::_privateStaticMember();
+ self2::Class::_privateInjectedStaticMember1();
+ self2::Class::_privateInjectedStaticMember2();
+ }
+}
+class ClassExtends extends self2::Class {
+ synthetic constructor •() → self2::ClassExtends
+ : super self2::Class::•()
+ ;
+ method _privateInstanceMember() → void {}
+}
+class ClassImplements extends core::Object implements self2::Class {
+ synthetic constructor •() → self2::ClassImplements
+ : super core::Object::•()
+ ;
+ method _privateInstanceMember() → void {}
+ no-such-method-forwarder method _privateInjectedInstanceMember1(self2::Class c) → void
+ return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(c)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic};
+ no-such-method-forwarder method _privateInjectedInstanceMember2(self2::Class c) → void
+ return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(c)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic};
+}
+static method _privateTopLevelMember() → void {
+ self2::_privateTopLevelMember();
+ self2::_privateInjectedTopLevelMember1();
+ self2::_privateInjectedTopLevelMember2();
+}
+static method /* from org-dartlang-testcase:///patch_lib1.dart */ _privateInjectedTopLevelMember1() → void {
+ self2::_privateTopLevelMember();
+ self2::_privateInjectedTopLevelMember1();
+ self2::_privateInjectedTopLevelMember2();
+}
+static method /* from org-dartlang-testcase:///patch_lib2.dart */ _privateInjectedTopLevelMember2() → void {
+ self2::_privateTopLevelMember();
+ self2::_privateInjectedTopLevelMember1();
+ self2::_privateInjectedTopLevelMember2();
+}
+
+constants {
+ #C1 = _in::_Patch {}
+ #C2 = #dart:test::_privateInjectedInstanceMember1
+ #C3 = <core::Type*>[]
+ #C4 = <core::Symbol*, dynamic>{)
+ #C5 = #dart:test::_privateInjectedInstanceMember2
+}
diff --git a/pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart b/pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart
new file mode 100644
index 0000000..8a0b4d9
--- /dev/null
+++ b/pkg/front_end/testcases/general/inject_private_patch/origin_lib.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Class {
+ void _privateInstanceMember(Class c) {
+ _privateInstanceMember(c);
+ _privateInjectedInstanceMember1(c);
+ _privateInjectedInstanceMember2(c);
+ c._privateInstanceMember(c);
+ c._privateInjectedInstanceMember1(c);
+ c._privateInjectedInstanceMember2(c);
+ }
+
+ static void _privateStaticMember() {
+ _privateStaticMember();
+ _privateInjectedStaticMember1();
+ _privateInjectedStaticMember2();
+ Class._privateStaticMember();
+ Class._privateInjectedStaticMember1();
+ Class._privateInjectedStaticMember2();
+ }
+}
+
+void _privateTopLevelMember() {
+ _privateTopLevelMember();
+ _privateInjectedTopLevelMember1();
+ _privateInjectedTopLevelMember2();
+}
+
+class ClassExtends extends Class /* Ok */ {
+ void _privateInstanceMember() {}
+}
+
+class ClassImplements
+ implements Class /* // Error, missing (injected) members. */ {
+ void _privateInstanceMember() {}
+}
diff --git a/pkg/front_end/testcases/general/inject_private_patch/patch_lib1.dart b/pkg/front_end/testcases/general/inject_private_patch/patch_lib1.dart
new file mode 100644
index 0000000..ae76650
--- /dev/null
+++ b/pkg/front_end/testcases/general/inject_private_patch/patch_lib1.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// ignore: import_internal_library
+import 'dart:_internal';
+
+@patch
+class Class {
+ void _privateInjectedInstanceMember1(Class c) {
+ _privateInstanceMember(c);
+ _privateInjectedInstanceMember1(c);
+ _privateInjectedInstanceMember2(c);
+ c._privateInstanceMember(c);
+ c._privateInjectedInstanceMember1(c);
+ c._privateInjectedInstanceMember2(c);
+ }
+
+ static void _privateInjectedStaticMember1() {
+ _privateStaticMember();
+ _privateInjectedStaticMember1();
+ _privateInjectedStaticMember2();
+ Class._privateStaticMember();
+ Class._privateInjectedStaticMember1();
+ Class._privateInjectedStaticMember2();
+ }
+}
+
+void _privateInjectedTopLevelMember1() {
+ _privateTopLevelMember();
+ _privateInjectedTopLevelMember1();
+ _privateInjectedTopLevelMember2();
+}
diff --git a/pkg/front_end/testcases/general/inject_private_patch/patch_lib2.dart b/pkg/front_end/testcases/general/inject_private_patch/patch_lib2.dart
new file mode 100644
index 0000000..a3ae222
--- /dev/null
+++ b/pkg/front_end/testcases/general/inject_private_patch/patch_lib2.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// ignore: import_internal_library
+import 'dart:_internal';
+
+@patch
+class Class {
+ void _privateInjectedInstanceMember2(Class c) {
+ _privateInstanceMember(c);
+ _privateInjectedInstanceMember1(c);
+ _privateInjectedInstanceMember2(c);
+ c._privateInstanceMember(c);
+ c._privateInjectedInstanceMember1(c);
+ c._privateInjectedInstanceMember2(c);
+ }
+
+ static void _privateInjectedStaticMember2() {
+ _privateStaticMember();
+ _privateInjectedStaticMember1();
+ _privateInjectedStaticMember2();
+ Class._privateStaticMember();
+ Class._privateInjectedStaticMember1();
+ Class._privateInjectedStaticMember2();
+ }
+}
+
+void _privateInjectedTopLevelMember2() {
+ _privateTopLevelMember();
+ _privateInjectedTopLevelMember1();
+ _privateInjectedTopLevelMember2();
+}
diff --git a/pkg/front_end/testcases/general/records_opt_out.dart.weak.expect b/pkg/front_end/testcases/general/records_opt_out.dart.weak.expect
index 2f8545c..1a0fef0 100644
--- a/pkg/front_end/testcases/general/records_opt_out.dart.weak.expect
+++ b/pkg/front_end/testcases/general/records_opt_out.dart.weak.expect
@@ -32,35 +32,53 @@
// String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b;
// ^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (int, String) method1(int a, String b) => (a, b);
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// int method2([(int, String) record = const (0, '')]) => record.$0;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// String method3([(int, String) record = const (0, '')]) => record.$1;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// ({int a, String b}) method4(int a, String b) => (a: a, b: b);
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// int method5([({int a, String b}) record = const (a: 0, b: '')]) => record.a;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/records_opt_out.dart.weak.modular.expect b/pkg/front_end/testcases/general/records_opt_out.dart.weak.modular.expect
index 2f8545c..1a0fef0 100644
--- a/pkg/front_end/testcases/general/records_opt_out.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/records_opt_out.dart.weak.modular.expect
@@ -32,35 +32,53 @@
// String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b;
// ^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (int, String) method1(int a, String b) => (a, b);
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// int method2([(int, String) record = const (0, '')]) => record.$0;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// String method3([(int, String) record = const (0, '')]) => record.$1;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// ({int a, String b}) method4(int a, String b) => (a: a, b: b);
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// int method5([({int a, String b}) record = const (a: 0, b: '')]) => record.a;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/records_opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/general/records_opt_out.dart.weak.transformed.expect
index 2f8545c..1a0fef0 100644
--- a/pkg/front_end/testcases/general/records_opt_out.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/records_opt_out.dart.weak.transformed.expect
@@ -32,35 +32,53 @@
// String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b;
// ^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (int, String) method1(int a, String b) => (a, b);
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// int method2([(int, String) record = const (0, '')]) => record.$0;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// String method3([(int, String) record = const (0, '')]) => record.$1;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// ({int a, String b}) method4(int a, String b) => (a: a, b: b);
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// int method5([({int a, String b}) record = const (a: 0, b: '')]) => record.a;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b;
// ^
+// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.18
+// ^^^^^^^^^^^^^
//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/incremental/export_core.yaml.world.2.expect b/pkg/front_end/testcases/incremental/export_core.yaml.world.2.expect
index 10e2231..33ff62c 100644
--- a/pkg/front_end/testcases/incremental/export_core.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/export_core.yaml.world.2.expect
@@ -50,6 +50,7 @@
core::Pattern,
core::Provisional,
core::RangeError,
+ core::Record,
core::RegExp,
core::RegExpMatch,
core::RuneIterator,
diff --git a/pkg/front_end/testcases/incremental/export_core.yaml.world.3.expect b/pkg/front_end/testcases/incremental/export_core.yaml.world.3.expect
index 18b6808..99d8359 100644
--- a/pkg/front_end/testcases/incremental/export_core.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental/export_core.yaml.world.3.expect
@@ -50,6 +50,7 @@
core::Pattern,
core::Provisional,
core::RangeError,
+ core::Record,
core::RegExp,
core::RegExpMatch,
core::RuneIterator,
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart
new file mode 100644
index 0000000..2010c55
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case true:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.strong.expect
new file mode 100644
index 0000000..3f94f95
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.strong.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = true
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..3f94f95
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = true
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.expect
new file mode 100644
index 0000000..3f94f95
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = true
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..3f94f95
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.modular.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = true
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..3f94f95
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = true
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart
new file mode 100644
index 0000000..33dadd4
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case true as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart
new file mode 100644
index 0000000..0bc9844
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case true) {}
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart
new file mode 100644
index 0000000..da66dd0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case true!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart
new file mode 100644
index 0000000..bcc27cc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case true?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/boolean_literal_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_case.dart b/pkg/front_end/testcases/patterns/cast_inside_case.dart
new file mode 100644
index 0000000..839b1e9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_case.dart
@@ -0,0 +1,7 @@
+test(dynamic x) {
+ const y = 1;
+ switch (x) {
+ case y as int:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart
new file mode 100644
index 0000000..94c2849
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart
@@ -0,0 +1,10 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {
+ switch (x) {
+ case C(f: 1 as int):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart
new file mode 100644
index 0000000..0a0628f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart
@@ -0,0 +1,9 @@
+class C {
+ int? f;
+}
+test(dynamic x) {
+ switch (x) {
+ case C(: var f as int):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_if_case.dart b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart
new file mode 100644
index 0000000..24b9975
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case var y as int) {}
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart
new file mode 100644
index 0000000..b14e897
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case [1 as int]:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_list_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart
new file mode 100644
index 0000000..b2351ce
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int? _ as double? & Object? _:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart
new file mode 100644
index 0000000..6c32b0e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int? _ & double? _ as Object?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_and_rhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart
new file mode 100644
index 0000000..ad7bc01
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int? _ as double? | Object? _:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart
new file mode 100644
index 0000000..73dc2fb
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int? _ | double? _ as Object?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_logical_or_rhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart
new file mode 100644
index 0000000..0b2a7c2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case {'a': 1 as int}:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_map_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart
new file mode 100644
index 0000000..00aa8e3
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1 as int):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_parenthesized_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart
new file mode 100644
index 0000000..a0acf48
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (: var n as int, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_implicitly_named.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart
new file mode 100644
index 0000000..7683724
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (n: 1 as int, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_named.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart
new file mode 100644
index 0000000..363ae75
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1 as int, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.strong.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/cast_inside_record_pattern_unnamed.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart
new file mode 100644
index 0000000..bbf32b5a
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart
@@ -0,0 +1,7 @@
+test(dynamic x) {
+ const y = 1;
+ switch (x) {
+ case y:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.strong.expect
new file mode 100644
index 0000000..78d52d9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.strong.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..78d52d9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.expect
new file mode 100644
index 0000000..78d52d9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..78d52d9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.modular.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..78d52d9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart
new file mode 100644
index 0000000..06346a3
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart
@@ -0,0 +1,7 @@
+test(dynamic x) {
+ const y = 1;
+ switch (x) {
+ case y as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart
new file mode 100644
index 0000000..e57dd1c
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart
@@ -0,0 +1,4 @@
+test(dynamic x) {
+ const y = 1;
+ if (x case y) {}
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart
new file mode 100644
index 0000000..551a532
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart
@@ -0,0 +1,7 @@
+test(dynamic x) {
+ const y = 1;
+ switch (x) {
+ case y!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart
new file mode 100644
index 0000000..642f1e7
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart
@@ -0,0 +1,7 @@
+test(dynamic x) {
+ const y = 1;
+ switch (x) {
+ case y?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/constant_identifier_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_case.dart b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart
new file mode 100644
index 0000000..6e2109d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1.0:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.strong.expect
new file mode 100644
index 0000000..b2f8564
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.strong.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:3:10: Error: Case expression '1.0' does not have a primitive operator '=='.
+// case 1.0:
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1.0
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..b2f8564
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:3:10: Error: Case expression '1.0' does not have a primitive operator '=='.
+// case 1.0:
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1.0
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.expect
new file mode 100644
index 0000000..b2f8564
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:3:10: Error: Case expression '1.0' does not have a primitive operator '=='.
+// case 1.0:
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1.0
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..b2f8564
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.modular.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:3:10: Error: Case expression '1.0' does not have a primitive operator '=='.
+// case 1.0:
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1.0
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..b2f8564
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:3:10: Error: Case expression '1.0' does not have a primitive operator '=='.
+// case 1.0:
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1.0
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart
new file mode 100644
index 0000000..1499eab
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1.0 as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart
new file mode 100644
index 0000000..5ddadfd
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case 1.0) {}
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart
new file mode 100644
index 0000000..c310c19
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1.0!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart
new file mode 100644
index 0000000..afd0901
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1.0?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/double_literal_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart
new file mode 100644
index 0000000..fd3b2e6
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart
@@ -0,0 +1,5 @@
+f() {
+ try {
+ true ? : 2;
+ } catch (e) {}
+}
diff --git a/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.strong.expect b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.strong.expect
new file mode 100644
index 0000000..feef5e0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.strong.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: Expected an identifier, but got ':'.
+// Try inserting an identifier before ':'.
+// true ? : 2;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method f() → dynamic {
+ try {
+ true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: This couldn't be parsed.
+ true ? : 2;
+ ^" : 2;
+ }
+ on core::Object catch(final core::Object e) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.strong.transformed.expect
new file mode 100644
index 0000000..feef5e0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.strong.transformed.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: Expected an identifier, but got ':'.
+// Try inserting an identifier before ':'.
+// true ? : 2;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method f() → dynamic {
+ try {
+ true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: This couldn't be parsed.
+ true ? : 2;
+ ^" : 2;
+ }
+ on core::Object catch(final core::Object e) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.textual_outline.expect
new file mode 100644
index 0000000..f19ca72
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.textual_outline.expect
@@ -0,0 +1 @@
+f() {}
diff --git a/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..f19ca72
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+f() {}
diff --git a/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.expect b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.expect
new file mode 100644
index 0000000..feef5e0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: Expected an identifier, but got ':'.
+// Try inserting an identifier before ':'.
+// true ? : 2;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method f() → dynamic {
+ try {
+ true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: This couldn't be parsed.
+ true ? : 2;
+ ^" : 2;
+ }
+ on core::Object catch(final core::Object e) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.modular.expect
new file mode 100644
index 0000000..feef5e0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.modular.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: Expected an identifier, but got ':'.
+// Try inserting an identifier before ':'.
+// true ? : 2;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method f() → dynamic {
+ try {
+ true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: This couldn't be parsed.
+ true ? : 2;
+ ^" : 2;
+ }
+ on core::Object catch(final core::Object e) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.outline.expect
new file mode 100644
index 0000000..bf82130
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method f() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.transformed.expect
new file mode 100644
index 0000000..feef5e0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart.weak.transformed.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: Expected an identifier, but got ':'.
+// Try inserting an identifier before ':'.
+// true ? : 2;
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method f() → dynamic {
+ try {
+ true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: This couldn't be parsed.
+ true ? : 2;
+ ^" : 2;
+ }
+ on core::Object catch(final core::Object e) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart
new file mode 100644
index 0000000..e9c0965
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart
@@ -0,0 +1,10 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {
+ switch (x) {
+ case C(f: 1) as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart
new file mode 100644
index 0000000..ced59e0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart
@@ -0,0 +1,10 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {
+ switch (x) {
+ case C(f: 1)!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart
new file mode 100644
index 0000000..b4b5123
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart
@@ -0,0 +1,9 @@
+class C {
+ int? f;
+}
+test(dynamic x) {
+ switch (x) {
+ case C(f: 1)?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart
new file mode 100644
index 0000000..b4536681
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart
@@ -0,0 +1,8 @@
+class C<T> {}
+
+test(dynamic x) {
+ switch (x) {
+ case C<int>():
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.strong.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.strong.expect
new file mode 100644
index 0000000..f51de12
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.strong.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::C<self::C::T%>
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.strong.transformed.expect
new file mode 100644
index 0000000..f51de12
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.strong.transformed.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::C<self::C::T%>
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.textual_outline.expect
new file mode 100644
index 0000000..3db1d01
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+class C<T> {}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..3db1d01
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+class C<T> {}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.expect
new file mode 100644
index 0000000..f51de12
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::C<self::C::T%>
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.modular.expect
new file mode 100644
index 0000000..f51de12
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.modular.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::C<self::C::T%>
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.outline.expect
new file mode 100644
index 0000000..51f3bba
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.outline.expect
@@ -0,0 +1,10 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::C<self::C::T%>
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.transformed.expect
new file mode 100644
index 0000000..f51de12
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args.dart.weak.transformed.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::C<self::C::T%>
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart
new file mode 100644
index 0000000..0cecead
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart
@@ -0,0 +1,10 @@
+class C<T> {
+ T? f;
+}
+
+test(dynamic x) {
+ switch (x) {
+ case C<int>(f: 1)!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..918a402
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ covariant-by-class field self::C::T? f = null;
+ synthetic constructor •() → self::C<self::C::T%>
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..918a402
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ covariant-by-class field self::C::T? f = null;
+ synthetic constructor •() → self::C<self::C::T%>
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..2a25eb4
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C<T> {
+ T? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..2a25eb4
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C<T> {
+ T? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..918a402
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ covariant-by-class field self::C::T? f = null;
+ synthetic constructor •() → self::C<self::C::T%>
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..918a402
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ covariant-by-class field self::C::T? f = null;
+ synthetic constructor •() → self::C<self::C::T%>
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..bc7897e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ covariant-by-class field self::C::T? f;
+ synthetic constructor •() → self::C<self::C::T%>
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..918a402
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/extractor_pattern_with_type_args_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+ covariant-by-class field self::C::T? f = null;
+ synthetic constructor •() → self::C<self::C::T%>
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_case.dart b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart
new file mode 100644
index 0000000..c86381a
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case final y:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart
new file mode 100644
index 0000000..f282dc9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case final y as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart
new file mode 100644
index 0000000..3adc2c0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case final y) {}
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart
new file mode 100644
index 0000000..d9db6a1
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case final y!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart
new file mode 100644
index 0000000..cce20cd
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case final y?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/final_variable_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/folder.options b/pkg/front_end/testcases/patterns/folder.options
new file mode 100644
index 0000000..3a75a83
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/folder.options
@@ -0,0 +1 @@
+--enable-experiment=patterns
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart
new file mode 100644
index 0000000..0fec161
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.strong.expect
new file mode 100644
index 0000000..78d52d9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.strong.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..78d52d9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.expect
new file mode 100644
index 0000000..78d52d9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..78d52d9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.modular.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..78d52d9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = 1
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart
new file mode 100644
index 0000000..1406426
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1 as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart
new file mode 100644
index 0000000..e94db9a
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case 1) {}
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart
new file mode 100644
index 0000000..a594990
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart
new file mode 100644
index 0000000..9566ccb
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/integer_literal_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart
new file mode 100644
index 0000000..5a0d71c
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case [1, 2]:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart
new file mode 100644
index 0000000..a324cd3
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case []:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.strong.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart
new file mode 100644
index 0000000..a324cd3
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case []:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.strong.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_empty_whitespace.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart
new file mode 100644
index 0000000..a157bf0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case <int>[1, 2]:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.strong.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_case_with_type_arguments.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart
new file mode 100644
index 0000000..8ff639e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case [1] as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart
new file mode 100644
index 0000000..eb88027
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case [1]!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart
new file mode 100644
index 0000000..e3f5eeb
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case [1]?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/list_pattern_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart
new file mode 100644
index 0000000..e61adeb
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case int? _ & double? _) {}
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart
new file mode 100644
index 0000000..b8195b3
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int? _ & double? _ & Object? _:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_and_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart
new file mode 100644
index 0000000..2864da4
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int? _ & double? _ | Object? _:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart
new file mode 100644
index 0000000..08f6ee5
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int? _ | double? _ & Object? _:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.strong.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_and_inside_logical_or_rhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart
new file mode 100644
index 0000000..49c82b7
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case int? _ | double? _) {}
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart
new file mode 100644
index 0000000..594f152
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int? _ | double? _ | Object? _:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/logical_or_inside_logical_or_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart
new file mode 100644
index 0000000..901134c
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case {'a': 1, 'b': 2}:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart
new file mode 100644
index 0000000..cb9625b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case {}:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.strong.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_empty.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart
new file mode 100644
index 0000000..f997a27
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case <String, int>{'a': 1, 'b': 2}:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.strong.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_case_with_type_arguments.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart
new file mode 100644
index 0000000..a98fd3b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case {'a': 1} as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart
new file mode 100644
index 0000000..348cfc4
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case {'a': 1}!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart
new file mode 100644
index 0000000..b92be3e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case {'a': 1}?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/map_pattern_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_case.dart b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart
new file mode 100644
index 0000000..551a532
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart
@@ -0,0 +1,7 @@
+test(dynamic x) {
+ const y = 1;
+ switch (x) {
+ case y!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart
new file mode 100644
index 0000000..1da35ed
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart
@@ -0,0 +1,10 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {
+ switch (x) {
+ case C(f: 1!):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart
new file mode 100644
index 0000000..57cdf02c
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart
@@ -0,0 +1,9 @@
+class C {
+ int? f;
+}
+test(dynamic x) {
+ switch (x) {
+ case C(: var f!):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart
new file mode 100644
index 0000000..72748e8
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case var y!) {}
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart
new file mode 100644
index 0000000..8ca8338
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case [1!]:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_list_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart
new file mode 100644
index 0000000..86b756e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1! & 2:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart
new file mode 100644
index 0000000..ff84f4e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1 & 2!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_and_rhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart
new file mode 100644
index 0000000..e97cea3
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1! | 2:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart
new file mode 100644
index 0000000..75511fe
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1 | 2!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_logical_or_rhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart
new file mode 100644
index 0000000..5988a1d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case {'a': 1!}:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_map_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart
new file mode 100644
index 0000000..b9a3f9f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1!):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_parenthesized_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart
new file mode 100644
index 0000000..eb346ba
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (: var n!, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_implicitly_named.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart
new file mode 100644
index 0000000..ec78439
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (n: 1!, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_named.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart
new file mode 100644
index 0000000..c9c86bd
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1!, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.strong.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_assert_inside_record_pattern_unnamed.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_case.dart b/pkg/front_end/testcases/patterns/null_check_inside_case.dart
new file mode 100644
index 0000000..642f1e7
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_case.dart
@@ -0,0 +1,7 @@
+test(dynamic x) {
+ const y = 1;
+ switch (x) {
+ case y?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart
new file mode 100644
index 0000000..a0d4ce1
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart
@@ -0,0 +1,9 @@
+class C {
+ int? f;
+}
+test(dynamic x) {
+ switch (x) {
+ case C(f: 1?):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart
new file mode 100644
index 0000000..982edaa
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart
@@ -0,0 +1,9 @@
+class C {
+ int? f;
+}
+test(dynamic x) {
+ switch (x) {
+ case C(: var f?):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart
new file mode 100644
index 0000000..8112c89
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case var y?) {}
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart
new file mode 100644
index 0000000..3b97341
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case [1?]:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_list_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart
new file mode 100644
index 0000000..1b2721d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1? & 2:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart
new file mode 100644
index 0000000..519e476
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1 & 2?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_and_rhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart
new file mode 100644
index 0000000..307ba80
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1? | 2:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart
new file mode 100644
index 0000000..81f3894
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1 | 2?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_logical_or_rhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart
new file mode 100644
index 0000000..d23631c
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case {'a': 1?}:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_map_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart
new file mode 100644
index 0000000..edd38435
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1?):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_parenthesized_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart
new file mode 100644
index 0000000..902a14a
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (: var n?, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_implicitly_named.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart
new file mode 100644
index 0000000..cf7275b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (n: 1?, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_named.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart
new file mode 100644
index 0000000..d91df54
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1?, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_check_inside_record_pattern_unnamed.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_case.dart b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart
new file mode 100644
index 0000000..2b9c294
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case null:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart
new file mode 100644
index 0000000..33ac639
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case null as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart
new file mode 100644
index 0000000..7129f39
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case null) {}
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart
new file mode 100644
index 0000000..0c1701a
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case null!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart
new file mode 100644
index 0000000..3e27a6a
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case null?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/null_literal_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart
new file mode 100644
index 0000000..560fd36
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1) as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart
new file mode 100644
index 0000000..343b0c7
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1)!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart
new file mode 100644
index 0000000..092ffae
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1)?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/parenthesized_pattern_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart
new file mode 100644
index 0000000..e3e1be7
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart
@@ -0,0 +1,8 @@
+import 'dart:async' as async;
+
+test(dynamic x) {
+ switch (x) {
+ case async.Future<int>():
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.strong.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.strong.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.strong.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.strong.transformed.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.strong.transformed.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.textual_outline.expect
new file mode 100644
index 0000000..0e78a37
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+import 'dart:async' as async;
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..0e78a37
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+import 'dart:async' as async;
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.modular.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.modular.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.outline.expect
new file mode 100644
index 0000000..d5d6748
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.outline.expect
@@ -0,0 +1,7 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.transformed.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args.dart.weak.transformed.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart
new file mode 100644
index 0000000..a2b5b01
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart
@@ -0,0 +1,8 @@
+import 'dart:async' as async;
+
+test(dynamic x) {
+ switch (x) {
+ case async.Future<int>() as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.strong.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..0e78a37
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+import 'dart:async' as async;
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..0e78a37
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+import 'dart:async' as async;
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..d5d6748
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,7 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart
new file mode 100644
index 0000000..32ff7d6
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart
@@ -0,0 +1,8 @@
+import 'dart:async' as async;
+
+test(dynamic x) {
+ switch (x) {
+ case async.Future<int>()!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.strong.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..0e78a37
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+import 'dart:async' as async;
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..0e78a37
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+import 'dart:async' as async;
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..d5d6748
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,7 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart
new file mode 100644
index 0000000..bac5f39
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart
@@ -0,0 +1,8 @@
+import 'dart:async' as async;
+
+test(dynamic x) {
+ switch (x) {
+ case async.Future<int>()?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.strong.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..0e78a37
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+import 'dart:async' as async;
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..0e78a37
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+import 'dart:async' as async;
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..d5d6748
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,7 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..030449f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/prefixed_extractor_pattern_with_type_args_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "dart:async" as async;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart
new file mode 100644
index 0000000..8e47fb8
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart
new file mode 100644
index 0000000..21999ff
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case ():
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.strong.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_empty.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart
new file mode 100644
index 0000000..f333264
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1,):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.strong.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_case_singleton.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart
new file mode 100644
index 0000000..bc972a3
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1, 2) as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart
new file mode 100644
index 0000000..e38fe12
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1, 2)!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart
new file mode 100644
index 0000000..19e41f8
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (1, 2)?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/record_pattern_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart
new file mode 100644
index 0000000..42b228a
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case == 1 << 1:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_equal.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart
new file mode 100644
index 0000000..694d98a
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case > 1 << 1:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart
new file mode 100644
index 0000000..7b14a3b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case >= 1 << 1:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_greater_than_or_equal.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart
new file mode 100644
index 0000000..e07efbf
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case < 1 << 1:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart
new file mode 100644
index 0000000..0ae950c
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case <= 1 << 1:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_less_than_or_equal.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart
new file mode 100644
index 0000000..2de3a3b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case != 1 << 1:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_case_not_equal.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart
new file mode 100644
index 0000000..9331783
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart
@@ -0,0 +1,9 @@
+class C {
+ int? f;
+}
+test(dynamic x) {
+ switch (x) {
+ case C(f: == 1):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_extractor_pattern.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_if_case.dart b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart
new file mode 100644
index 0000000..6f6d154
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case == 1) {}
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart
new file mode 100644
index 0000000..4a1a120
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case [== 1]:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_list_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart
new file mode 100644
index 0000000..fd98413
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case == 1 & 2:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart
new file mode 100644
index 0000000..f94c2daa
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1 & == 2:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_and_rhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart
new file mode 100644
index 0000000..7c0299e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case == 1 | 2:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart
new file mode 100644
index 0000000..72ede7b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1 | == 2:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_logical_or_rhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart
new file mode 100644
index 0000000..dfdfdfc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case {'a': == 1}:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_map_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart
new file mode 100644
index 0000000..236ce5b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (== 1):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_parenthesized_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart
new file mode 100644
index 0000000..18b00a3
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (n: == 1, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_named.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart
new file mode 100644
index 0000000..3a9fce3
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (== 1, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.strong.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/relational_inside_record_pattern_unnamed.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_case.dart b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart
new file mode 100644
index 0000000..5b72723
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case "x":
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.strong.expect
new file mode 100644
index 0000000..3868fdb
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.strong.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = "x"
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..3868fdb
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = "x"
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.expect
new file mode 100644
index 0000000..3868fdb
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = "x"
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..3868fdb
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.modular.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = "x"
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..3868fdb
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = "x"
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart
new file mode 100644
index 0000000..4a0772b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case "x" as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart
new file mode 100644
index 0000000..d942735
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case "x") {}
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart
new file mode 100644
index 0000000..02484b9
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case "x"!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart
new file mode 100644
index 0000000..afc0b4a
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case "x"?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/string_literal_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart
new file mode 100644
index 0000000..69263dc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case final int y:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart
new file mode 100644
index 0000000..55eff04
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case final int y as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart
new file mode 100644
index 0000000..23a7be5
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case final int y) {}
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart
new file mode 100644
index 0000000..60bc23f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case final int y!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart
new file mode 100644
index 0000000..0c353b0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case final int y?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_final_variable_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart
new file mode 100644
index 0000000..0467e3a
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int y:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart
new file mode 100644
index 0000000..d7014fb
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int y as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart
new file mode 100644
index 0000000..d196b02
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case int y) {}
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart
new file mode 100644
index 0000000..15f6ee1
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int y!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart
new file mode 100644
index 0000000..b5d73c0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int y?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart
new file mode 100644
index 0000000..1ed75c0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int as:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart
new file mode 100644
index 0000000..7ad75b0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int as as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart
new file mode 100644
index 0000000..019892f
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart
@@ -0,0 +1,9 @@
+class C {
+ int? f;
+}
+test(dynamic x) {
+ switch (x) {
+ case C(f: int as):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart
new file mode 100644
index 0000000..c3b1745
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart
@@ -0,0 +1,9 @@
+class C {
+ int? f;
+}
+test(dynamic x) {
+ switch (x) {
+ case C(: int as):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.strong.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.strong.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bb89d6e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class C {
+ int? f;
+}
+
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.modular.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect
new file mode 100644
index 0000000..1a382fc
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f;
+ synthetic constructor •() → self::C
+ ;
+}
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c70e8d
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_extractor_pattern_implicitly_named.dart.weak.transformed.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ field core::int? f = null;
+ synthetic constructor •() → self::C
+ : super core::Object::•()
+ ;
+}
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart
new file mode 100644
index 0000000..48bef7b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case int as) {}
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart
new file mode 100644
index 0000000..e0c8105
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case [int as]:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_list_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart
new file mode 100644
index 0000000..1db90f3
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int as & 2:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart
new file mode 100644
index 0000000..af77ec0
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1 & int as:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_and_rhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart
new file mode 100644
index 0000000..7252f50
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int as | 2:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_lhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart
new file mode 100644
index 0000000..1299dfe
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case 1 | int as:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_logical_or_rhs.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart
new file mode 100644
index 0000000..8d20335
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case {'a': int as}:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_map_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart
new file mode 100644
index 0000000..0ae62db
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int as!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart
new file mode 100644
index 0000000..07f6b72
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case int as?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart
new file mode 100644
index 0000000..e4f6eeb
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (int as):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_parenthesized_pattern.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart
new file mode 100644
index 0000000..b1b1106
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (: int as, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_implicitly_named.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart
new file mode 100644
index 0000000..c1e202e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (n: int as, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_named.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart
new file mode 100644
index 0000000..656b439
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case (int as, 2):
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.strong.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/typed_variable_named_as_inside_record_pattern_unnamed.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_case.dart b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart
new file mode 100644
index 0000000..0e106d8
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case var y:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.strong.expect b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.expect b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart
new file mode 100644
index 0000000..78d4369
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case var y as Object:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.strong.expect b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.expect b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_cast.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart
new file mode 100644
index 0000000..90e1b5a
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart
@@ -0,0 +1,3 @@
+test(dynamic x) {
+ if (x case var y) {}
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.strong.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.strong.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.strong.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.strong.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.modular.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.modular.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.transformed.expect
new file mode 100644
index 0000000..d6b1b22
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_if_case.dart.weak.transformed.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test(dynamic x) → dynamic {
+ if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart
new file mode 100644
index 0000000..bd9e656
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case var y!:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.strong.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_assert.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart
new file mode 100644
index 0000000..719c79e
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart
@@ -0,0 +1,6 @@
+test(dynamic x) {
+ switch (x) {
+ case var y?:
+ break;
+ }
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.strong.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.strong.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.textual_outline.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8655004
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test(dynamic x) {}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.modular.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.modular.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.outline.expect
new file mode 100644
index 0000000..303aa9b
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..c4a01a2
--- /dev/null
+++ b/pkg/front_end/testcases/patterns/var_variable_inside_null_check.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test(dynamic x) → dynamic {
+ #L1:
+ switch(x) {
+ #L2:
+ case #C1:
+ {
+ break #L1;
+ }
+ }
+}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/records/custom_record_class_unsupported.dart b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart
new file mode 100644
index 0000000..320a9ee
--- /dev/null
+++ b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// @dart=2.17
+
+abstract class Record {
+ Record create();
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.strong.expect b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.strong.expect
new file mode 100644
index 0000000..1138c4c
--- /dev/null
+++ b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.strong.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class Record extends core::Object {
+ synthetic constructor •() → self::Record
+ : super core::Object::•()
+ ;
+ abstract method create() → self::Record;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.strong.transformed.expect b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.strong.transformed.expect
new file mode 100644
index 0000000..1138c4c
--- /dev/null
+++ b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.strong.transformed.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class Record extends core::Object {
+ synthetic constructor •() → self::Record
+ : super core::Object::•()
+ ;
+ abstract method create() → self::Record;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.textual_outline.expect b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.textual_outline.expect
new file mode 100644
index 0000000..e64bf7c
--- /dev/null
+++ b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+// @dart = 2.17
+abstract class Record {
+ Record create();
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..e64bf7c
--- /dev/null
+++ b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+// @dart = 2.17
+abstract class Record {
+ Record create();
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.expect b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.expect
new file mode 100644
index 0000000..1138c4c
--- /dev/null
+++ b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class Record extends core::Object {
+ synthetic constructor •() → self::Record
+ : super core::Object::•()
+ ;
+ abstract method create() → self::Record;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.modular.expect b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.modular.expect
new file mode 100644
index 0000000..1138c4c
--- /dev/null
+++ b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.modular.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class Record extends core::Object {
+ synthetic constructor •() → self::Record
+ : super core::Object::•()
+ ;
+ abstract method create() → self::Record;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.outline.expect b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.outline.expect
new file mode 100644
index 0000000..0051b94
--- /dev/null
+++ b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class Record extends core::Object {
+ synthetic constructor •() → self::Record
+ ;
+ abstract method create() → self::Record;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.transformed.expect b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.transformed.expect
new file mode 100644
index 0000000..1138c4c
--- /dev/null
+++ b/pkg/front_end/testcases/records/custom_record_class_unsupported.dart.weak.transformed.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class Record extends core::Object {
+ synthetic constructor •() → self::Record
+ : super core::Object::•()
+ ;
+ abstract method create() → self::Record;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart
new file mode 100644
index 0000000..9d2e267
--- /dev/null
+++ b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Callable {
+ void call() {}
+}
+
+T id<T>(T x) => x;
+
+foo() {
+ // No static error.
+ // Inferred type of the record is (int, double, int Function(int), void Function()).
+ var c = Callable();
+ dynamic d = 3;
+ (num, double, int Function(int), void Function()) r = (d, 3, id, c);
+ ({num x, double y, int Function(int) f, void Function() g}) r2 = (x: d, y: 3, f: id, g: c);
+ (num, double, {int Function(int) f, void Function() g}) r3 = (d, 3, f: id, g: c);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.strong.expect b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.strong.expect
new file mode 100644
index 0000000..555fa6e
--- /dev/null
+++ b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.strong.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Callable extends core::Object {
+ synthetic constructor •() → self::Callable
+ : super core::Object::•()
+ ;
+ method call() → void {}
+}
+static method id<T extends core::Object? = dynamic>(self::id::T% x) → self::id::T%
+ return x;
+static method foo() → dynamic {
+ self::Callable c = new self::Callable::•();
+ dynamic d = 3;
+ (core::num, core::double, (core::int) → core::int, () → void) r = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.0, #C2, let final self::Callable #t1 = c in #t1 == null ?{() → void} null : #t1.{self::Callable::call}{() → void});
+ ({required f: (core::int) → core::int, required g: () → void, required x: core::num, required y: core::double}) r2 = let final core::num #t2 = d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num in let final core::double #t3 = 3.0 in let final (core::int) → core::int #t4 = #C2 in ({f: #t4, g: let final self::Callable #t5 = c in #t5 == null ?{() → void} null : #t5.{self::Callable::call}{() → void}, x: #t2, y: #t3});
+ (core::num, core::double, {required f: (core::int) → core::int, required g: () → void}) r3 = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.0, {f: #C2, g: let final self::Callable #t6 = c in #t6 == null ?{() → void} null : #t6.{self::Callable::call}{() → void}});
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = static-tearoff self::id
+ #C2 = instantiation #C1 <core::int>
+}
diff --git a/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.strong.transformed.expect b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.strong.transformed.expect
new file mode 100644
index 0000000..e8b53f7
--- /dev/null
+++ b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.strong.transformed.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Callable extends core::Object {
+ synthetic constructor •() → self::Callable
+ : super core::Object::•()
+ ;
+ method call() → void {}
+}
+static method id<T extends core::Object? = dynamic>(self::id::T% x) → self::id::T%
+ return x;
+static method foo() → dynamic {
+ self::Callable c = new self::Callable::•();
+ dynamic d = 3;
+ (core::num, core::double, (core::int) → core::int, () → void) r = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.0, #C2, let final self::Callable #t1 = c in #t1 == null ?{() → void} null : #t1.{self::Callable::call}{() → void});
+ ({required f: (core::int) → core::int, required g: () → void, required x: core::num, required y: core::double}) r2 = let final core::num #t2 = d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num in let final core::double #t3 = 3.0 in let final (core::int) → core::int #t4 = #C2 in ({f: #t4, g: let final self::Callable #t5 = c in #t5 == null ?{() → void} null : #t5.{self::Callable::call}{() → void}, x: #t2, y: #t3});
+ (core::num, core::double, {required f: (core::int) → core::int, required g: () → void}) r3 = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.0, {f: #C2, g: let final self::Callable #t6 = c in #t6 == null ?{() → void} null : #t6.{self::Callable::call}{() → void}});
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = static-tearoff self::id
+ #C2 = instantiation #C1 <core::int>
+}
+
+Extra constant evaluation status:
+Evaluated: VariableGet @ org-dartlang-testcase:///pointwise_implicit_downcasts.dart:17:84 -> InstantiationConstant(id<int>)
+Evaluated: VariableGet @ org-dartlang-testcase:///pointwise_implicit_downcasts.dart:17:78 -> DoubleConstant(3.0)
+Extra constant evaluation: evaluated: 38, effectively constant: 2
diff --git a/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.textual_outline.expect b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.textual_outline.expect
new file mode 100644
index 0000000..fba2365
--- /dev/null
+++ b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.textual_outline.expect
@@ -0,0 +1,7 @@
+class Callable {
+ void call() {}
+}
+
+T id<T>(T x) => x;
+foo() {}
+main() {}
diff --git a/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..aab97f0
--- /dev/null
+++ b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.textual_outline_modelled.expect
@@ -0,0 +1,8 @@
+T id<T>(T x) => x;
+
+class Callable {
+ void call() {}
+}
+
+foo() {}
+main() {}
diff --git a/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.expect b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.expect
new file mode 100644
index 0000000..e48067a
--- /dev/null
+++ b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Callable extends core::Object {
+ synthetic constructor •() → self::Callable
+ : super core::Object::•()
+ ;
+ method call() → void {}
+}
+static method id<T extends core::Object? = dynamic>(self::id::T% x) → self::id::T%
+ return x;
+static method foo() → dynamic {
+ self::Callable c = new self::Callable::•();
+ dynamic d = 3;
+ (core::num, core::double, (core::int) → core::int, () → void) r = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.0, #C2, let final self::Callable #t1 = c in #t1 == null ?{() → void} null : #t1.{self::Callable::call}{() → void});
+ ({required f: (core::int) → core::int, required g: () → void, required x: core::num, required y: core::double}) r2 = let final core::num #t2 = d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num in let final core::double #t3 = 3.0 in let final (core::int) → core::int #t4 = #C2 in ({f: #t4, g: let final self::Callable #t5 = c in #t5 == null ?{() → void} null : #t5.{self::Callable::call}{() → void}, x: #t2, y: #t3});
+ (core::num, core::double, {required f: (core::int) → core::int, required g: () → void}) r3 = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.0, {f: #C2, g: let final self::Callable #t6 = c in #t6 == null ?{() → void} null : #t6.{self::Callable::call}{() → void}});
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = static-tearoff self::id
+ #C2 = instantiation #C1 <core::int*>
+}
diff --git a/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.modular.expect b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.modular.expect
new file mode 100644
index 0000000..e48067a
--- /dev/null
+++ b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.modular.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Callable extends core::Object {
+ synthetic constructor •() → self::Callable
+ : super core::Object::•()
+ ;
+ method call() → void {}
+}
+static method id<T extends core::Object? = dynamic>(self::id::T% x) → self::id::T%
+ return x;
+static method foo() → dynamic {
+ self::Callable c = new self::Callable::•();
+ dynamic d = 3;
+ (core::num, core::double, (core::int) → core::int, () → void) r = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.0, #C2, let final self::Callable #t1 = c in #t1 == null ?{() → void} null : #t1.{self::Callable::call}{() → void});
+ ({required f: (core::int) → core::int, required g: () → void, required x: core::num, required y: core::double}) r2 = let final core::num #t2 = d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num in let final core::double #t3 = 3.0 in let final (core::int) → core::int #t4 = #C2 in ({f: #t4, g: let final self::Callable #t5 = c in #t5 == null ?{() → void} null : #t5.{self::Callable::call}{() → void}, x: #t2, y: #t3});
+ (core::num, core::double, {required f: (core::int) → core::int, required g: () → void}) r3 = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.0, {f: #C2, g: let final self::Callable #t6 = c in #t6 == null ?{() → void} null : #t6.{self::Callable::call}{() → void}});
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = static-tearoff self::id
+ #C2 = instantiation #C1 <core::int*>
+}
diff --git a/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.outline.expect b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.outline.expect
new file mode 100644
index 0000000..a62758b
--- /dev/null
+++ b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.outline.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Callable extends core::Object {
+ synthetic constructor •() → self::Callable
+ ;
+ method call() → void
+ ;
+}
+static method id<T extends core::Object? = dynamic>(self::id::T% x) → self::id::T%
+ ;
+static method foo() → dynamic
+ ;
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.transformed.expect b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.transformed.expect
new file mode 100644
index 0000000..35f9e47
--- /dev/null
+++ b/pkg/front_end/testcases/records/pointwise_implicit_downcasts.dart.weak.transformed.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Callable extends core::Object {
+ synthetic constructor •() → self::Callable
+ : super core::Object::•()
+ ;
+ method call() → void {}
+}
+static method id<T extends core::Object? = dynamic>(self::id::T% x) → self::id::T%
+ return x;
+static method foo() → dynamic {
+ self::Callable c = new self::Callable::•();
+ dynamic d = 3;
+ (core::num, core::double, (core::int) → core::int, () → void) r = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.0, #C2, let final self::Callable #t1 = c in #t1 == null ?{() → void} null : #t1.{self::Callable::call}{() → void});
+ ({required f: (core::int) → core::int, required g: () → void, required x: core::num, required y: core::double}) r2 = let final core::num #t2 = d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num in let final core::double #t3 = 3.0 in let final (core::int) → core::int #t4 = #C2 in ({f: #t4, g: let final self::Callable #t5 = c in #t5 == null ?{() → void} null : #t5.{self::Callable::call}{() → void}, x: #t2, y: #t3});
+ (core::num, core::double, {required f: (core::int) → core::int, required g: () → void}) r3 = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.0, {f: #C2, g: let final self::Callable #t6 = c in #t6 == null ?{() → void} null : #t6.{self::Callable::call}{() → void}});
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = static-tearoff self::id
+ #C2 = instantiation #C1 <core::int*>
+}
+
+Extra constant evaluation status:
+Evaluated: VariableGet @ org-dartlang-testcase:///pointwise_implicit_downcasts.dart:17:84 -> InstantiationConstant(id<int*>)
+Evaluated: VariableGet @ org-dartlang-testcase:///pointwise_implicit_downcasts.dart:17:78 -> DoubleConstant(3.0)
+Extra constant evaluation: evaluated: 38, effectively constant: 2
diff --git a/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.expect b/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.expect
index a5f34cd..4c3f156 100644
--- a/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.expect
+++ b/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.expect
@@ -6,85 +6,133 @@
// // @dart=2.9
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, b: 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (int, String);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1, c: 2, d: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1, d: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, d: 1, b: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (d: 0, a: 1, b: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, 2, a: 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, b: 3, 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, b: 3, c: 4, 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, a: 1, 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, 1, 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: this, 0);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.transformed.expect b/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.transformed.expect
index a5f34cd..4c3f156 100644
--- a/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.transformed.expect
@@ -6,85 +6,133 @@
// // @dart=2.9
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, b: 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (int, String);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1, c: 2, d: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1, d: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, d: 1, b: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (d: 0, a: 1, b: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, 2, a: 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, b: 3, 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, b: 3, c: 4, 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, a: 1, 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, 1, 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: this, 0);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.expect b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.expect
index 6a9ad1f..3e646fb 100644
--- a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.expect
+++ b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.expect
@@ -2,85 +2,133 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, b: 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (int, String);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1, c: 2, d: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1, d: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, d: 1, b: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (d: 0, a: 1, b: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, 2, a: 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, b: 3, 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, b: 3, c: 4, 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, a: 1, 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, 1, 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: this, 0);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.modular.expect b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.modular.expect
index 6a9ad1f..3e646fb 100644
--- a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.modular.expect
@@ -2,85 +2,133 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, b: 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (int, String);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1, c: 2, d: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1, d: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, d: 1, b: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (d: 0, a: 1, b: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, 2, a: 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, b: 3, 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, b: 3, c: 4, 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, a: 1, 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, 1, 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: this, 0);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.transformed.expect b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.transformed.expect
index 6a9ad1f..3e646fb 100644
--- a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.transformed.expect
@@ -2,85 +2,133 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, b: 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, 1);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (int, String);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1, c: 2, d: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, b: 1, d: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, d: 1, b: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (d: 0, a: 1, b: 2, c: 3);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, 2, a: 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, b: 3, 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, 1, a: 2, b: 3, c: 4, 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (0, a: 1, 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: 0, 1, 2, 3, b: 4, c: 5);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: This requires the experimental 'records' language feature to be enabled.
-// Try passing the '--enable-experiment=records' command line option.
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
// (a: this, 0);
// ^
+// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/records/simple_inference.dart b/pkg/front_end/testcases/records/simple_inference.dart
index da9d76a..8f3c99b 100644
--- a/pkg/front_end/testcases/records/simple_inference.dart
+++ b/pkg/front_end/testcases/records/simple_inference.dart
@@ -15,7 +15,7 @@
}
foo4() {
- (num, num) r = (3 as dynamic, 3.5); // Error.
+ (num, num) r = (3 as dynamic, 3.5);
}
foo5((int, String?) r, (int, X) Function<X>() f) {
diff --git a/pkg/front_end/testcases/records/simple_inference.dart.strong.expect b/pkg/front_end/testcases/records/simple_inference.dart.strong.expect
index 51b70be..bc3c922 100644
--- a/pkg/front_end/testcases/records/simple_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/records/simple_inference.dart.strong.expect
@@ -1,11 +1,4 @@
library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/records/simple_inference.dart:18:18: Error: A value of type '(dynamic, double)' can't be assigned to a variable of type '(num, num)'.
-// (num, num) r = (3 as dynamic, 3.5); // Error.
-// ^
-//
import self as self;
import "dart:core" as core;
@@ -31,9 +24,7 @@
} =>#t1;
}
static method foo4() → dynamic {
- (core::num, core::num) r = invalid-expression "pkg/front_end/testcases/records/simple_inference.dart:18:18: Error: A value of type '(dynamic, double)' can't be assigned to a variable of type '(num, num)'.
- (num, num) r = (3 as dynamic, 3.5); // Error.
- ^" in (3 as{ForNonNullableByDefault} dynamic, 3.5) as{TypeError,ForNonNullableByDefault} (core::num, core::num);
+ (core::num, core::num) r = ((3 as{ForNonNullableByDefault} dynamic) as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.5);
}
static method foo5((core::int, core::String?) r, <X extends core::Object? = dynamic>() → (core::int, X%) f) → dynamic {
r = f<core::String?>(){() → (core::int, core::String?)};
diff --git a/pkg/front_end/testcases/records/simple_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/records/simple_inference.dart.strong.transformed.expect
index f44bae4..60d1614 100644
--- a/pkg/front_end/testcases/records/simple_inference.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/records/simple_inference.dart.strong.transformed.expect
@@ -1,11 +1,4 @@
library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/records/simple_inference.dart:18:18: Error: A value of type '(dynamic, double)' can't be assigned to a variable of type '(num, num)'.
-// (num, num) r = (3 as dynamic, 3.5); // Error.
-// ^
-//
import self as self;
import "dart:core" as core;
@@ -31,9 +24,7 @@
} =>#t1;
}
static method foo4() → dynamic {
- (core::num, core::num) r = invalid-expression "pkg/front_end/testcases/records/simple_inference.dart:18:18: Error: A value of type '(dynamic, double)' can't be assigned to a variable of type '(num, num)'.
- (num, num) r = (3 as dynamic, 3.5); // Error.
- ^" in (3 as{ForNonNullableByDefault} dynamic, 3.5) as{TypeError,ForNonNullableByDefault} (core::num, core::num);
+ (core::num, core::num) r = ((3 as{ForNonNullableByDefault} dynamic) as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.5);
}
static method foo5((core::int, core::String?) r, <X extends core::Object? = dynamic>() → (core::int, X%) f) → dynamic {
r = f<core::String?>(){() → (core::int, core::String?)};
@@ -53,4 +44,5 @@
Evaluated: RecordLiteral @ org-dartlang-testcase:///simple_inference.dart:14:18 -> RecordConstant(const (3, 3.5))
Evaluated: VariableGetImpl @ org-dartlang-testcase:///simple_inference.dart:14:18 -> RecordConstant(const (3, 3.5))
Evaluated: VariableGet @ org-dartlang-testcase:///simple_inference.dart:14:18 -> RecordConstant(const (3, 3.5))
-Extra constant evaluation: evaluated: 24, effectively constant: 3
+Evaluated: RecordLiteral @ org-dartlang-testcase:///simple_inference.dart:18:18 -> RecordConstant(const (3, 3.5))
+Extra constant evaluation: evaluated: 25, effectively constant: 4
diff --git a/pkg/front_end/testcases/records/simple_inference.dart.weak.expect b/pkg/front_end/testcases/records/simple_inference.dart.weak.expect
index 51b70be..bc3c922 100644
--- a/pkg/front_end/testcases/records/simple_inference.dart.weak.expect
+++ b/pkg/front_end/testcases/records/simple_inference.dart.weak.expect
@@ -1,11 +1,4 @@
library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/records/simple_inference.dart:18:18: Error: A value of type '(dynamic, double)' can't be assigned to a variable of type '(num, num)'.
-// (num, num) r = (3 as dynamic, 3.5); // Error.
-// ^
-//
import self as self;
import "dart:core" as core;
@@ -31,9 +24,7 @@
} =>#t1;
}
static method foo4() → dynamic {
- (core::num, core::num) r = invalid-expression "pkg/front_end/testcases/records/simple_inference.dart:18:18: Error: A value of type '(dynamic, double)' can't be assigned to a variable of type '(num, num)'.
- (num, num) r = (3 as dynamic, 3.5); // Error.
- ^" in (3 as{ForNonNullableByDefault} dynamic, 3.5) as{TypeError,ForNonNullableByDefault} (core::num, core::num);
+ (core::num, core::num) r = ((3 as{ForNonNullableByDefault} dynamic) as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.5);
}
static method foo5((core::int, core::String?) r, <X extends core::Object? = dynamic>() → (core::int, X%) f) → dynamic {
r = f<core::String?>(){() → (core::int, core::String?)};
diff --git a/pkg/front_end/testcases/records/simple_inference.dart.weak.modular.expect b/pkg/front_end/testcases/records/simple_inference.dart.weak.modular.expect
index 51b70be..bc3c922 100644
--- a/pkg/front_end/testcases/records/simple_inference.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/records/simple_inference.dart.weak.modular.expect
@@ -1,11 +1,4 @@
library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/records/simple_inference.dart:18:18: Error: A value of type '(dynamic, double)' can't be assigned to a variable of type '(num, num)'.
-// (num, num) r = (3 as dynamic, 3.5); // Error.
-// ^
-//
import self as self;
import "dart:core" as core;
@@ -31,9 +24,7 @@
} =>#t1;
}
static method foo4() → dynamic {
- (core::num, core::num) r = invalid-expression "pkg/front_end/testcases/records/simple_inference.dart:18:18: Error: A value of type '(dynamic, double)' can't be assigned to a variable of type '(num, num)'.
- (num, num) r = (3 as dynamic, 3.5); // Error.
- ^" in (3 as{ForNonNullableByDefault} dynamic, 3.5) as{TypeError,ForNonNullableByDefault} (core::num, core::num);
+ (core::num, core::num) r = ((3 as{ForNonNullableByDefault} dynamic) as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.5);
}
static method foo5((core::int, core::String?) r, <X extends core::Object? = dynamic>() → (core::int, X%) f) → dynamic {
r = f<core::String?>(){() → (core::int, core::String?)};
diff --git a/pkg/front_end/testcases/records/simple_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/records/simple_inference.dart.weak.transformed.expect
index f44bae4..60d1614 100644
--- a/pkg/front_end/testcases/records/simple_inference.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/records/simple_inference.dart.weak.transformed.expect
@@ -1,11 +1,4 @@
library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/records/simple_inference.dart:18:18: Error: A value of type '(dynamic, double)' can't be assigned to a variable of type '(num, num)'.
-// (num, num) r = (3 as dynamic, 3.5); // Error.
-// ^
-//
import self as self;
import "dart:core" as core;
@@ -31,9 +24,7 @@
} =>#t1;
}
static method foo4() → dynamic {
- (core::num, core::num) r = invalid-expression "pkg/front_end/testcases/records/simple_inference.dart:18:18: Error: A value of type '(dynamic, double)' can't be assigned to a variable of type '(num, num)'.
- (num, num) r = (3 as dynamic, 3.5); // Error.
- ^" in (3 as{ForNonNullableByDefault} dynamic, 3.5) as{TypeError,ForNonNullableByDefault} (core::num, core::num);
+ (core::num, core::num) r = ((3 as{ForNonNullableByDefault} dynamic) as{TypeError,ForDynamic,ForNonNullableByDefault} core::num, 3.5);
}
static method foo5((core::int, core::String?) r, <X extends core::Object? = dynamic>() → (core::int, X%) f) → dynamic {
r = f<core::String?>(){() → (core::int, core::String?)};
@@ -53,4 +44,5 @@
Evaluated: RecordLiteral @ org-dartlang-testcase:///simple_inference.dart:14:18 -> RecordConstant(const (3, 3.5))
Evaluated: VariableGetImpl @ org-dartlang-testcase:///simple_inference.dart:14:18 -> RecordConstant(const (3, 3.5))
Evaluated: VariableGet @ org-dartlang-testcase:///simple_inference.dart:14:18 -> RecordConstant(const (3, 3.5))
-Extra constant evaluation: evaluated: 24, effectively constant: 3
+Evaluated: RecordLiteral @ org-dartlang-testcase:///simple_inference.dart:18:18 -> RecordConstant(const (3, 3.5))
+Extra constant evaluation: evaluated: 25, effectively constant: 4
diff --git a/pkg/front_end/testcases/records/type_record.dart b/pkg/front_end/testcases/records/type_record.dart
new file mode 100644
index 0000000..8e226f9
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record.dart
@@ -0,0 +1,69 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class A<X> {}
+
+typedef R = Record;
+
+typedef AR = A<Record>;
+
+typedef RR = R;
+
+typedef AR2 = A<R>;
+
+typedef AR3 = A<RR>;
+
+typedef AR4 = A<AR>;
+
+Record foo1() => throw '';
+
+dynamic foo2() => <Record>[];
+
+dynamic foo3() => Record;
+
+dynamic foo4() => List<Record>;
+
+dynamic foo5(Record r) => null;
+
+dynamic foo6({required Record r}) => null;
+
+List<Record> foo7() => throw '';
+
+dynamic foo8(List<Record> l) => null;
+
+R foo9() => throw '';
+
+AR foo10() => throw '';
+
+RR foo11() => throw '';
+
+dynamic foo12(R r) => null;
+
+dynamic foo13(AR l) => null;
+
+dynamic foo14(RR l) => null;
+
+abstract class A1 extends A<Record> {}
+
+abstract class A2 implements A<Record> {}
+
+abstract class A3 with A<Record> {}
+
+abstract class A4 extends AR {}
+
+abstract class A5 extends AR2 {}
+
+abstract class A6 extends AR3 {}
+
+abstract class A7 extends AR4 {}
+
+foo((int, String) record) {
+ bar(record); // Ok.
+}
+
+bar(Record record) {
+ foo(record); // Error.
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/records/type_record.dart.strong.expect b/pkg/front_end/testcases/records/type_record.dart.strong.expect
new file mode 100644
index 0000000..5f3e43c
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record.dart.strong.expect
@@ -0,0 +1,105 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record.dart:66:7: Error: The argument type 'Record' can't be assigned to the parameter type '(int, String)'.
+// foo(record); // Error.
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef AR = self::A<core::Record>;
+typedef RR = core::Record;
+typedef AR2 = self::A<core::Record>;
+typedef AR3 = self::A<core::Record>;
+typedef AR4 = self::A<self::A<core::Record>>;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ : super core::Object::•()
+ ;
+}
+abstract class A1 extends self::A<core::Record> {
+ synthetic constructor •() → self::A1
+ : super self::A::•()
+ ;
+}
+abstract class A2 extends core::Object implements self::A<core::Record> {
+ synthetic constructor •() → self::A2
+ : super core::Object::•()
+ ;
+}
+abstract class _A3&Object&A = core::Object with self::A<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&A {
+ synthetic constructor •() → self::A3
+ : super self::_A3&Object&A::•()
+ ;
+}
+abstract class A4 extends self::A<core::Record> {
+ synthetic constructor •() → self::A4
+ : super self::A::•()
+ ;
+}
+abstract class A5 extends self::A<core::Record> {
+ synthetic constructor •() → self::A5
+ : super self::A::•()
+ ;
+}
+abstract class A6 extends self::A<core::Record> {
+ synthetic constructor •() → self::A6
+ : super self::A::•()
+ ;
+}
+abstract class A7 extends self::A<self::A<core::Record>> {
+ synthetic constructor •() → self::A7
+ : super self::A::•()
+ ;
+}
+static method foo1() → core::Record
+ return throw "";
+static method foo2() → dynamic
+ return <core::Record>[];
+static method foo3() → dynamic
+ return #C1;
+static method foo4() → dynamic
+ return #C2;
+static method foo5(core::Record r) → dynamic
+ return null;
+static method foo6({required core::Record r = #C3}) → dynamic
+ return null;
+static method foo7() → core::List<core::Record>
+ return throw "";
+static method foo8(core::List<core::Record> l) → dynamic
+ return null;
+static method foo9() → core::Record
+ return throw "";
+static method foo10() → self::A<core::Record>
+ return throw "";
+static method foo11() → core::Record
+ return throw "";
+static method foo12(core::Record r) → dynamic
+ return null;
+static method foo13(self::A<core::Record> l) → dynamic
+ return null;
+static method foo14(core::Record l) → dynamic
+ return null;
+static method foo((core::int, core::String) record) → dynamic {
+ self::bar(record);
+}
+static method bar(core::Record record) → dynamic {
+ self::foo(invalid-expression "pkg/front_end/testcases/records/type_record.dart:66:7: Error: The argument type 'Record' can't be assigned to the parameter type '(int, String)'.
+ foo(record); // Error.
+ ^" in record as{TypeError,ForNonNullableByDefault} (core::int, core::String));
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = TypeLiteralConstant(core::Record)
+ #C2 = TypeLiteralConstant(core::List<core::Record>)
+ #C3 = null
+}
diff --git a/pkg/front_end/testcases/records/type_record.dart.strong.transformed.expect b/pkg/front_end/testcases/records/type_record.dart.strong.transformed.expect
new file mode 100644
index 0000000..799191c
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record.dart.strong.transformed.expect
@@ -0,0 +1,105 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record.dart:66:7: Error: The argument type 'Record' can't be assigned to the parameter type '(int, String)'.
+// foo(record); // Error.
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef AR = self::A<core::Record>;
+typedef RR = core::Record;
+typedef AR2 = self::A<core::Record>;
+typedef AR3 = self::A<core::Record>;
+typedef AR4 = self::A<self::A<core::Record>>;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ : super core::Object::•()
+ ;
+}
+abstract class A1 extends self::A<core::Record> {
+ synthetic constructor •() → self::A1
+ : super self::A::•()
+ ;
+}
+abstract class A2 extends core::Object implements self::A<core::Record> {
+ synthetic constructor •() → self::A2
+ : super core::Object::•()
+ ;
+}
+abstract class _A3&Object&A extends core::Object implements self::A<core::Record> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&A {
+ synthetic constructor •() → self::A3
+ : super self::_A3&Object&A::•()
+ ;
+}
+abstract class A4 extends self::A<core::Record> {
+ synthetic constructor •() → self::A4
+ : super self::A::•()
+ ;
+}
+abstract class A5 extends self::A<core::Record> {
+ synthetic constructor •() → self::A5
+ : super self::A::•()
+ ;
+}
+abstract class A6 extends self::A<core::Record> {
+ synthetic constructor •() → self::A6
+ : super self::A::•()
+ ;
+}
+abstract class A7 extends self::A<self::A<core::Record>> {
+ synthetic constructor •() → self::A7
+ : super self::A::•()
+ ;
+}
+static method foo1() → core::Record
+ return throw "";
+static method foo2() → dynamic
+ return core::_GrowableList::•<core::Record>(0);
+static method foo3() → dynamic
+ return #C1;
+static method foo4() → dynamic
+ return #C2;
+static method foo5(core::Record r) → dynamic
+ return null;
+static method foo6({required core::Record r = #C3}) → dynamic
+ return null;
+static method foo7() → core::List<core::Record>
+ return throw "";
+static method foo8(core::List<core::Record> l) → dynamic
+ return null;
+static method foo9() → core::Record
+ return throw "";
+static method foo10() → self::A<core::Record>
+ return throw "";
+static method foo11() → core::Record
+ return throw "";
+static method foo12(core::Record r) → dynamic
+ return null;
+static method foo13(self::A<core::Record> l) → dynamic
+ return null;
+static method foo14(core::Record l) → dynamic
+ return null;
+static method foo((core::int, core::String) record) → dynamic {
+ self::bar(record);
+}
+static method bar(core::Record record) → dynamic {
+ self::foo(invalid-expression "pkg/front_end/testcases/records/type_record.dart:66:7: Error: The argument type 'Record' can't be assigned to the parameter type '(int, String)'.
+ foo(record); // Error.
+ ^" in record as{TypeError,ForNonNullableByDefault} (core::int, core::String));
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = TypeLiteralConstant(core::Record)
+ #C2 = TypeLiteralConstant(core::List<core::Record>)
+ #C3 = null
+}
diff --git a/pkg/front_end/testcases/records/type_record.dart.textual_outline.expect b/pkg/front_end/testcases/records/type_record.dart.textual_outline.expect
new file mode 100644
index 0000000..20ec198
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record.dart.textual_outline.expect
@@ -0,0 +1,31 @@
+abstract class A<X> {}
+typedef R = Record;
+typedef AR = A<Record>;
+typedef RR = R;
+typedef AR2 = A<R>;
+typedef AR3 = A<RR>;
+typedef AR4 = A<AR>;
+Record foo1() => throw '';
+dynamic foo2() => <Record>[];
+dynamic foo3() => Record;
+dynamic foo4() => List<Record>;
+dynamic foo5(Record r) => null;
+dynamic foo6({required Record r}) => null;
+List<Record> foo7() => throw '';
+dynamic foo8(List<Record> l) => null;
+R foo9() => throw '';
+AR foo10() => throw '';
+RR foo11() => throw '';
+dynamic foo12(R r) => null;
+dynamic foo13(AR l) => null;
+dynamic foo14(RR l) => null;
+abstract class A1 extends A<Record> {}
+abstract class A2 implements A<Record> {}
+abstract class A3 with A<Record> {}
+abstract class A4 extends AR {}
+abstract class A5 extends AR2 {}
+abstract class A6 extends AR3 {}
+abstract class A7 extends AR4 {}
+foo((int, String) record) {}
+bar(Record record) {}
+main() {}
diff --git a/pkg/front_end/testcases/records/type_record.dart.weak.expect b/pkg/front_end/testcases/records/type_record.dart.weak.expect
new file mode 100644
index 0000000..ab3f4df
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record.dart.weak.expect
@@ -0,0 +1,105 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record.dart:66:7: Error: The argument type 'Record' can't be assigned to the parameter type '(int, String)'.
+// foo(record); // Error.
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef AR = self::A<core::Record>;
+typedef RR = core::Record;
+typedef AR2 = self::A<core::Record>;
+typedef AR3 = self::A<core::Record>;
+typedef AR4 = self::A<self::A<core::Record>>;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ : super core::Object::•()
+ ;
+}
+abstract class A1 extends self::A<core::Record> {
+ synthetic constructor •() → self::A1
+ : super self::A::•()
+ ;
+}
+abstract class A2 extends core::Object implements self::A<core::Record> {
+ synthetic constructor •() → self::A2
+ : super core::Object::•()
+ ;
+}
+abstract class _A3&Object&A = core::Object with self::A<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&A {
+ synthetic constructor •() → self::A3
+ : super self::_A3&Object&A::•()
+ ;
+}
+abstract class A4 extends self::A<core::Record> {
+ synthetic constructor •() → self::A4
+ : super self::A::•()
+ ;
+}
+abstract class A5 extends self::A<core::Record> {
+ synthetic constructor •() → self::A5
+ : super self::A::•()
+ ;
+}
+abstract class A6 extends self::A<core::Record> {
+ synthetic constructor •() → self::A6
+ : super self::A::•()
+ ;
+}
+abstract class A7 extends self::A<self::A<core::Record>> {
+ synthetic constructor •() → self::A7
+ : super self::A::•()
+ ;
+}
+static method foo1() → core::Record
+ return throw "";
+static method foo2() → dynamic
+ return <core::Record>[];
+static method foo3() → dynamic
+ return #C1;
+static method foo4() → dynamic
+ return #C2;
+static method foo5(core::Record r) → dynamic
+ return null;
+static method foo6({required core::Record r = #C3}) → dynamic
+ return null;
+static method foo7() → core::List<core::Record>
+ return throw "";
+static method foo8(core::List<core::Record> l) → dynamic
+ return null;
+static method foo9() → core::Record
+ return throw "";
+static method foo10() → self::A<core::Record>
+ return throw "";
+static method foo11() → core::Record
+ return throw "";
+static method foo12(core::Record r) → dynamic
+ return null;
+static method foo13(self::A<core::Record> l) → dynamic
+ return null;
+static method foo14(core::Record l) → dynamic
+ return null;
+static method foo((core::int, core::String) record) → dynamic {
+ self::bar(record);
+}
+static method bar(core::Record record) → dynamic {
+ self::foo(invalid-expression "pkg/front_end/testcases/records/type_record.dart:66:7: Error: The argument type 'Record' can't be assigned to the parameter type '(int, String)'.
+ foo(record); // Error.
+ ^" in record as{TypeError,ForNonNullableByDefault} (core::int, core::String));
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = TypeLiteralConstant(core::Record*)
+ #C2 = TypeLiteralConstant(core::List<core::Record*>*)
+ #C3 = null
+}
diff --git a/pkg/front_end/testcases/records/type_record.dart.weak.modular.expect b/pkg/front_end/testcases/records/type_record.dart.weak.modular.expect
new file mode 100644
index 0000000..ab3f4df
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record.dart.weak.modular.expect
@@ -0,0 +1,105 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record.dart:66:7: Error: The argument type 'Record' can't be assigned to the parameter type '(int, String)'.
+// foo(record); // Error.
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef AR = self::A<core::Record>;
+typedef RR = core::Record;
+typedef AR2 = self::A<core::Record>;
+typedef AR3 = self::A<core::Record>;
+typedef AR4 = self::A<self::A<core::Record>>;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ : super core::Object::•()
+ ;
+}
+abstract class A1 extends self::A<core::Record> {
+ synthetic constructor •() → self::A1
+ : super self::A::•()
+ ;
+}
+abstract class A2 extends core::Object implements self::A<core::Record> {
+ synthetic constructor •() → self::A2
+ : super core::Object::•()
+ ;
+}
+abstract class _A3&Object&A = core::Object with self::A<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&A {
+ synthetic constructor •() → self::A3
+ : super self::_A3&Object&A::•()
+ ;
+}
+abstract class A4 extends self::A<core::Record> {
+ synthetic constructor •() → self::A4
+ : super self::A::•()
+ ;
+}
+abstract class A5 extends self::A<core::Record> {
+ synthetic constructor •() → self::A5
+ : super self::A::•()
+ ;
+}
+abstract class A6 extends self::A<core::Record> {
+ synthetic constructor •() → self::A6
+ : super self::A::•()
+ ;
+}
+abstract class A7 extends self::A<self::A<core::Record>> {
+ synthetic constructor •() → self::A7
+ : super self::A::•()
+ ;
+}
+static method foo1() → core::Record
+ return throw "";
+static method foo2() → dynamic
+ return <core::Record>[];
+static method foo3() → dynamic
+ return #C1;
+static method foo4() → dynamic
+ return #C2;
+static method foo5(core::Record r) → dynamic
+ return null;
+static method foo6({required core::Record r = #C3}) → dynamic
+ return null;
+static method foo7() → core::List<core::Record>
+ return throw "";
+static method foo8(core::List<core::Record> l) → dynamic
+ return null;
+static method foo9() → core::Record
+ return throw "";
+static method foo10() → self::A<core::Record>
+ return throw "";
+static method foo11() → core::Record
+ return throw "";
+static method foo12(core::Record r) → dynamic
+ return null;
+static method foo13(self::A<core::Record> l) → dynamic
+ return null;
+static method foo14(core::Record l) → dynamic
+ return null;
+static method foo((core::int, core::String) record) → dynamic {
+ self::bar(record);
+}
+static method bar(core::Record record) → dynamic {
+ self::foo(invalid-expression "pkg/front_end/testcases/records/type_record.dart:66:7: Error: The argument type 'Record' can't be assigned to the parameter type '(int, String)'.
+ foo(record); // Error.
+ ^" in record as{TypeError,ForNonNullableByDefault} (core::int, core::String));
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = TypeLiteralConstant(core::Record*)
+ #C2 = TypeLiteralConstant(core::List<core::Record*>*)
+ #C3 = null
+}
diff --git a/pkg/front_end/testcases/records/type_record.dart.weak.outline.expect b/pkg/front_end/testcases/records/type_record.dart.weak.outline.expect
new file mode 100644
index 0000000..266db25
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record.dart.weak.outline.expect
@@ -0,0 +1,81 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef AR = self::A<core::Record>;
+typedef RR = core::Record;
+typedef AR2 = self::A<core::Record>;
+typedef AR3 = self::A<core::Record>;
+typedef AR4 = self::A<self::A<core::Record>>;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ ;
+}
+abstract class A1 extends self::A<core::Record> {
+ synthetic constructor •() → self::A1
+ ;
+}
+abstract class A2 extends core::Object implements self::A<core::Record> {
+ synthetic constructor •() → self::A2
+ ;
+}
+abstract class _A3&Object&A = core::Object with self::A<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&A {
+ synthetic constructor •() → self::A3
+ ;
+}
+abstract class A4 extends self::A<core::Record> {
+ synthetic constructor •() → self::A4
+ ;
+}
+abstract class A5 extends self::A<core::Record> {
+ synthetic constructor •() → self::A5
+ ;
+}
+abstract class A6 extends self::A<core::Record> {
+ synthetic constructor •() → self::A6
+ ;
+}
+abstract class A7 extends self::A<self::A<core::Record>> {
+ synthetic constructor •() → self::A7
+ ;
+}
+static method foo1() → core::Record
+ ;
+static method foo2() → dynamic
+ ;
+static method foo3() → dynamic
+ ;
+static method foo4() → dynamic
+ ;
+static method foo5(core::Record r) → dynamic
+ ;
+static method foo6({required core::Record r}) → dynamic
+ ;
+static method foo7() → core::List<core::Record>
+ ;
+static method foo8(core::List<core::Record> l) → dynamic
+ ;
+static method foo9() → core::Record
+ ;
+static method foo10() → self::A<core::Record>
+ ;
+static method foo11() → core::Record
+ ;
+static method foo12(core::Record r) → dynamic
+ ;
+static method foo13(self::A<core::Record> l) → dynamic
+ ;
+static method foo14(core::Record l) → dynamic
+ ;
+static method foo((core::int, core::String) record) → dynamic
+ ;
+static method bar(core::Record record) → dynamic
+ ;
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/records/type_record.dart.weak.transformed.expect b/pkg/front_end/testcases/records/type_record.dart.weak.transformed.expect
new file mode 100644
index 0000000..8b645c9
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record.dart.weak.transformed.expect
@@ -0,0 +1,105 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record.dart:66:7: Error: The argument type 'Record' can't be assigned to the parameter type '(int, String)'.
+// foo(record); // Error.
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef AR = self::A<core::Record>;
+typedef RR = core::Record;
+typedef AR2 = self::A<core::Record>;
+typedef AR3 = self::A<core::Record>;
+typedef AR4 = self::A<self::A<core::Record>>;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::X%>
+ : super core::Object::•()
+ ;
+}
+abstract class A1 extends self::A<core::Record> {
+ synthetic constructor •() → self::A1
+ : super self::A::•()
+ ;
+}
+abstract class A2 extends core::Object implements self::A<core::Record> {
+ synthetic constructor •() → self::A2
+ : super core::Object::•()
+ ;
+}
+abstract class _A3&Object&A extends core::Object implements self::A<core::Record> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&A {
+ synthetic constructor •() → self::A3
+ : super self::_A3&Object&A::•()
+ ;
+}
+abstract class A4 extends self::A<core::Record> {
+ synthetic constructor •() → self::A4
+ : super self::A::•()
+ ;
+}
+abstract class A5 extends self::A<core::Record> {
+ synthetic constructor •() → self::A5
+ : super self::A::•()
+ ;
+}
+abstract class A6 extends self::A<core::Record> {
+ synthetic constructor •() → self::A6
+ : super self::A::•()
+ ;
+}
+abstract class A7 extends self::A<self::A<core::Record>> {
+ synthetic constructor •() → self::A7
+ : super self::A::•()
+ ;
+}
+static method foo1() → core::Record
+ return throw "";
+static method foo2() → dynamic
+ return core::_GrowableList::•<core::Record>(0);
+static method foo3() → dynamic
+ return #C1;
+static method foo4() → dynamic
+ return #C2;
+static method foo5(core::Record r) → dynamic
+ return null;
+static method foo6({required core::Record r = #C3}) → dynamic
+ return null;
+static method foo7() → core::List<core::Record>
+ return throw "";
+static method foo8(core::List<core::Record> l) → dynamic
+ return null;
+static method foo9() → core::Record
+ return throw "";
+static method foo10() → self::A<core::Record>
+ return throw "";
+static method foo11() → core::Record
+ return throw "";
+static method foo12(core::Record r) → dynamic
+ return null;
+static method foo13(self::A<core::Record> l) → dynamic
+ return null;
+static method foo14(core::Record l) → dynamic
+ return null;
+static method foo((core::int, core::String) record) → dynamic {
+ self::bar(record);
+}
+static method bar(core::Record record) → dynamic {
+ self::foo(invalid-expression "pkg/front_end/testcases/records/type_record.dart:66:7: Error: The argument type 'Record' can't be assigned to the parameter type '(int, String)'.
+ foo(record); // Error.
+ ^" in record as{TypeError,ForNonNullableByDefault} (core::int, core::String));
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = TypeLiteralConstant(core::Record*)
+ #C2 = TypeLiteralConstant(core::List<core::Record*>*)
+ #C3 = null
+}
diff --git a/pkg/front_end/testcases/records/type_record_as_supertype.dart b/pkg/front_end/testcases/records/type_record_as_supertype.dart
new file mode 100644
index 0000000..7a909bc
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_as_supertype.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef R = Record;
+
+typedef RR = R;
+
+class G<X> {}
+
+abstract class A1 extends Record {} // Error.
+abstract class A2 extends RR {} // Error.
+abstract class A3 extends G<Record> {} // Ok.
+abstract class A4 extends G<RR> {} // Ok.
+
+abstract class B1 implements Record {} // Error.
+abstract class B2 implements RR {} // Error.
+abstract class B3 implements G<Record> {} // Ok.
+abstract class B4 implements G<RR> {} // Ok.
+
+abstract class C1 with Record {} // Error.
+abstract class C2 with RR {} // Error.
+abstract class C3 with G<Record> {} // Ok.
+abstract class C4 with G<RR> {} // Ok.
+
+main() {}
diff --git a/pkg/front_end/testcases/records/type_record_as_supertype.dart.strong.expect b/pkg/front_end/testcases/records/type_record_as_supertype.dart.strong.expect
new file mode 100644
index 0000000..2c8af64
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_as_supertype.dart.strong.expect
@@ -0,0 +1,135 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:11:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:12:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 extends RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:16:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B1 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:17:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B2 implements RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:21:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C1 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'RR' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// sdk/lib/core/record.dart:11:16: Context: This is the type denoted by the type alias.
+// abstract class Record {}
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+class G<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::G<self::G::X%>
+ : super core::Object::•()
+ ;
+}
+abstract class A1 extends core::Record {
+ synthetic constructor •() → self::A1
+ : super core::Record::•()
+ ;
+}
+abstract class A2 extends core::Record {
+ synthetic constructor •() → self::A2
+ : super core::Record::•()
+ ;
+}
+abstract class A3 extends self::G<core::Record> {
+ synthetic constructor •() → self::A3
+ : super self::G::•()
+ ;
+}
+abstract class A4 extends self::G<core::Record> {
+ synthetic constructor •() → self::A4
+ : super self::G::•()
+ ;
+}
+abstract class B1 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B1
+ : super core::Object::•()
+ ;
+}
+abstract class B2 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+}
+abstract class B3 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B3
+ : super core::Object::•()
+ ;
+}
+abstract class B4 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B4
+ : super core::Object::•()
+ ;
+}
+abstract class _C1&Object&Record = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C1&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class C1 extends self::_C1&Object&Record {
+ synthetic constructor •() → self::C1
+ : super self::_C1&Object&Record::•()
+ ;
+}
+abstract class _C2&Object&RR = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C2&Object&RR
+ : super core::Object::•()
+ ;
+}
+abstract class C2 extends self::_C2&Object&RR {
+ synthetic constructor •() → self::C2
+ : super self::_C2&Object&RR::•()
+ ;
+}
+abstract class _C3&Object&G = core::Object with self::G<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C3&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C3 extends self::_C3&Object&G {
+ synthetic constructor •() → self::C3
+ : super self::_C3&Object&G::•()
+ ;
+}
+abstract class _C4&Object&G = core::Object with self::G<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C4&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C4 extends self::_C4&Object&G {
+ synthetic constructor •() → self::C4
+ : super self::_C4&Object&G::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/type_record_as_supertype.dart.strong.transformed.expect b/pkg/front_end/testcases/records/type_record_as_supertype.dart.strong.transformed.expect
new file mode 100644
index 0000000..1ace8f9
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_as_supertype.dart.strong.transformed.expect
@@ -0,0 +1,135 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:11:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:12:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 extends RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:16:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B1 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:17:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B2 implements RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:21:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C1 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'RR' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// sdk/lib/core/record.dart:11:16: Context: This is the type denoted by the type alias.
+// abstract class Record {}
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+class G<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::G<self::G::X%>
+ : super core::Object::•()
+ ;
+}
+abstract class A1 extends core::Record {
+ synthetic constructor •() → self::A1
+ : super core::Record::•()
+ ;
+}
+abstract class A2 extends core::Record {
+ synthetic constructor •() → self::A2
+ : super core::Record::•()
+ ;
+}
+abstract class A3 extends self::G<core::Record> {
+ synthetic constructor •() → self::A3
+ : super self::G::•()
+ ;
+}
+abstract class A4 extends self::G<core::Record> {
+ synthetic constructor •() → self::A4
+ : super self::G::•()
+ ;
+}
+abstract class B1 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B1
+ : super core::Object::•()
+ ;
+}
+abstract class B2 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+}
+abstract class B3 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B3
+ : super core::Object::•()
+ ;
+}
+abstract class B4 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B4
+ : super core::Object::•()
+ ;
+}
+abstract class _C1&Object&Record extends core::Object implements core::Record /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C1&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class C1 extends self::_C1&Object&Record {
+ synthetic constructor •() → self::C1
+ : super self::_C1&Object&Record::•()
+ ;
+}
+abstract class _C2&Object&RR extends core::Object implements core::Record /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C2&Object&RR
+ : super core::Object::•()
+ ;
+}
+abstract class C2 extends self::_C2&Object&RR {
+ synthetic constructor •() → self::C2
+ : super self::_C2&Object&RR::•()
+ ;
+}
+abstract class _C3&Object&G extends core::Object implements self::G<core::Record> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C3&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C3 extends self::_C3&Object&G {
+ synthetic constructor •() → self::C3
+ : super self::_C3&Object&G::•()
+ ;
+}
+abstract class _C4&Object&G extends core::Object implements self::G<core::Record> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C4&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C4 extends self::_C4&Object&G {
+ synthetic constructor •() → self::C4
+ : super self::_C4&Object&G::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/type_record_as_supertype.dart.textual_outline.expect b/pkg/front_end/testcases/records/type_record_as_supertype.dart.textual_outline.expect
new file mode 100644
index 0000000..b1fdcff
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_as_supertype.dart.textual_outline.expect
@@ -0,0 +1,30 @@
+typedef R = Record;
+typedef RR = R;
+
+class G<X> {}
+
+abstract class A1 extends Record {}
+
+abstract class A2 extends RR {}
+
+abstract class A3 extends G<Record> {}
+
+abstract class A4 extends G<RR> {}
+
+abstract class B1 implements Record {}
+
+abstract class B2 implements RR {}
+
+abstract class B3 implements G<Record> {}
+
+abstract class B4 implements G<RR> {}
+
+abstract class C1 with Record {}
+
+abstract class C2 with RR {}
+
+abstract class C3 with G<Record> {}
+
+abstract class C4 with G<RR> {}
+
+main() {}
diff --git a/pkg/front_end/testcases/records/type_record_as_supertype.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/records/type_record_as_supertype.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8bcf211
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_as_supertype.dart.textual_outline_modelled.expect
@@ -0,0 +1,29 @@
+abstract class A1 extends Record {}
+
+abstract class A2 extends RR {}
+
+abstract class A3 extends G<Record> {}
+
+abstract class A4 extends G<RR> {}
+
+abstract class B1 implements Record {}
+
+abstract class B2 implements RR {}
+
+abstract class B3 implements G<Record> {}
+
+abstract class B4 implements G<RR> {}
+
+abstract class C1 with Record {}
+
+abstract class C2 with RR {}
+
+abstract class C3 with G<Record> {}
+
+abstract class C4 with G<RR> {}
+
+class G<X> {}
+
+main() {}
+typedef R = Record;
+typedef RR = R;
diff --git a/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.expect b/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.expect
new file mode 100644
index 0000000..2c8af64
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.expect
@@ -0,0 +1,135 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:11:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:12:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 extends RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:16:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B1 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:17:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B2 implements RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:21:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C1 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'RR' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// sdk/lib/core/record.dart:11:16: Context: This is the type denoted by the type alias.
+// abstract class Record {}
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+class G<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::G<self::G::X%>
+ : super core::Object::•()
+ ;
+}
+abstract class A1 extends core::Record {
+ synthetic constructor •() → self::A1
+ : super core::Record::•()
+ ;
+}
+abstract class A2 extends core::Record {
+ synthetic constructor •() → self::A2
+ : super core::Record::•()
+ ;
+}
+abstract class A3 extends self::G<core::Record> {
+ synthetic constructor •() → self::A3
+ : super self::G::•()
+ ;
+}
+abstract class A4 extends self::G<core::Record> {
+ synthetic constructor •() → self::A4
+ : super self::G::•()
+ ;
+}
+abstract class B1 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B1
+ : super core::Object::•()
+ ;
+}
+abstract class B2 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+}
+abstract class B3 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B3
+ : super core::Object::•()
+ ;
+}
+abstract class B4 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B4
+ : super core::Object::•()
+ ;
+}
+abstract class _C1&Object&Record = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C1&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class C1 extends self::_C1&Object&Record {
+ synthetic constructor •() → self::C1
+ : super self::_C1&Object&Record::•()
+ ;
+}
+abstract class _C2&Object&RR = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C2&Object&RR
+ : super core::Object::•()
+ ;
+}
+abstract class C2 extends self::_C2&Object&RR {
+ synthetic constructor •() → self::C2
+ : super self::_C2&Object&RR::•()
+ ;
+}
+abstract class _C3&Object&G = core::Object with self::G<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C3&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C3 extends self::_C3&Object&G {
+ synthetic constructor •() → self::C3
+ : super self::_C3&Object&G::•()
+ ;
+}
+abstract class _C4&Object&G = core::Object with self::G<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C4&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C4 extends self::_C4&Object&G {
+ synthetic constructor •() → self::C4
+ : super self::_C4&Object&G::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.modular.expect b/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.modular.expect
new file mode 100644
index 0000000..2c8af64
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.modular.expect
@@ -0,0 +1,135 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:11:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:12:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 extends RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:16:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B1 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:17:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B2 implements RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:21:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C1 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'RR' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// sdk/lib/core/record.dart:11:16: Context: This is the type denoted by the type alias.
+// abstract class Record {}
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+class G<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::G<self::G::X%>
+ : super core::Object::•()
+ ;
+}
+abstract class A1 extends core::Record {
+ synthetic constructor •() → self::A1
+ : super core::Record::•()
+ ;
+}
+abstract class A2 extends core::Record {
+ synthetic constructor •() → self::A2
+ : super core::Record::•()
+ ;
+}
+abstract class A3 extends self::G<core::Record> {
+ synthetic constructor •() → self::A3
+ : super self::G::•()
+ ;
+}
+abstract class A4 extends self::G<core::Record> {
+ synthetic constructor •() → self::A4
+ : super self::G::•()
+ ;
+}
+abstract class B1 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B1
+ : super core::Object::•()
+ ;
+}
+abstract class B2 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+}
+abstract class B3 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B3
+ : super core::Object::•()
+ ;
+}
+abstract class B4 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B4
+ : super core::Object::•()
+ ;
+}
+abstract class _C1&Object&Record = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C1&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class C1 extends self::_C1&Object&Record {
+ synthetic constructor •() → self::C1
+ : super self::_C1&Object&Record::•()
+ ;
+}
+abstract class _C2&Object&RR = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C2&Object&RR
+ : super core::Object::•()
+ ;
+}
+abstract class C2 extends self::_C2&Object&RR {
+ synthetic constructor •() → self::C2
+ : super self::_C2&Object&RR::•()
+ ;
+}
+abstract class _C3&Object&G = core::Object with self::G<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C3&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C3 extends self::_C3&Object&G {
+ synthetic constructor •() → self::C3
+ : super self::_C3&Object&G::•()
+ ;
+}
+abstract class _C4&Object&G = core::Object with self::G<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C4&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C4 extends self::_C4&Object&G {
+ synthetic constructor •() → self::C4
+ : super self::_C4&Object&G::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.outline.expect b/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.outline.expect
new file mode 100644
index 0000000..f960292
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.outline.expect
@@ -0,0 +1,123 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:11:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:12:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 extends RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:16:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B1 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:17:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B2 implements RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:21:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C1 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'RR' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// sdk/lib/core/record.dart:11:16: Context: This is the type denoted by the type alias.
+// abstract class Record {}
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+class G<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::G<self::G::X%>
+ ;
+}
+abstract class A1 extends core::Record {
+ synthetic constructor •() → self::A1
+ ;
+}
+abstract class A2 extends core::Record {
+ synthetic constructor •() → self::A2
+ ;
+}
+abstract class A3 extends self::G<core::Record> {
+ synthetic constructor •() → self::A3
+ ;
+}
+abstract class A4 extends self::G<core::Record> {
+ synthetic constructor •() → self::A4
+ ;
+}
+abstract class B1 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B1
+ ;
+}
+abstract class B2 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B2
+ ;
+}
+abstract class B3 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B3
+ ;
+}
+abstract class B4 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B4
+ ;
+}
+abstract class _C1&Object&Record = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C1&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class C1 extends self::_C1&Object&Record {
+ synthetic constructor •() → self::C1
+ ;
+}
+abstract class _C2&Object&RR = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C2&Object&RR
+ : super core::Object::•()
+ ;
+}
+abstract class C2 extends self::_C2&Object&RR {
+ synthetic constructor •() → self::C2
+ ;
+}
+abstract class _C3&Object&G = core::Object with self::G<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C3&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C3 extends self::_C3&Object&G {
+ synthetic constructor •() → self::C3
+ ;
+}
+abstract class _C4&Object&G = core::Object with self::G<core::Record> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C4&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C4 extends self::_C4&Object&G {
+ synthetic constructor •() → self::C4
+ ;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.transformed.expect b/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.transformed.expect
new file mode 100644
index 0000000..1ace8f9
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.transformed.expect
@@ -0,0 +1,135 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:11:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:12:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 extends RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:16:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B1 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:17:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class B2 implements RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:21:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C1 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
+// typedef RR = R;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_as_supertype.dart:22:16: Error: 'RR' is restricted and can't be extended or implemented.
+// abstract class C2 with RR {} // Error.
+// ^
+// sdk/lib/core/record.dart:11:16: Context: This is the type denoted by the type alias.
+// abstract class Record {}
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+class G<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::G<self::G::X%>
+ : super core::Object::•()
+ ;
+}
+abstract class A1 extends core::Record {
+ synthetic constructor •() → self::A1
+ : super core::Record::•()
+ ;
+}
+abstract class A2 extends core::Record {
+ synthetic constructor •() → self::A2
+ : super core::Record::•()
+ ;
+}
+abstract class A3 extends self::G<core::Record> {
+ synthetic constructor •() → self::A3
+ : super self::G::•()
+ ;
+}
+abstract class A4 extends self::G<core::Record> {
+ synthetic constructor •() → self::A4
+ : super self::G::•()
+ ;
+}
+abstract class B1 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B1
+ : super core::Object::•()
+ ;
+}
+abstract class B2 extends core::Object implements core::Record {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+}
+abstract class B3 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B3
+ : super core::Object::•()
+ ;
+}
+abstract class B4 extends core::Object implements self::G<core::Record> {
+ synthetic constructor •() → self::B4
+ : super core::Object::•()
+ ;
+}
+abstract class _C1&Object&Record extends core::Object implements core::Record /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C1&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class C1 extends self::_C1&Object&Record {
+ synthetic constructor •() → self::C1
+ : super self::_C1&Object&Record::•()
+ ;
+}
+abstract class _C2&Object&RR extends core::Object implements core::Record /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C2&Object&RR
+ : super core::Object::•()
+ ;
+}
+abstract class C2 extends self::_C2&Object&RR {
+ synthetic constructor •() → self::C2
+ : super self::_C2&Object&RR::•()
+ ;
+}
+abstract class _C3&Object&G extends core::Object implements self::G<core::Record> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C3&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C3 extends self::_C3&Object&G {
+ synthetic constructor •() → self::C3
+ : super self::_C3&Object&G::•()
+ ;
+}
+abstract class _C4&Object&G extends core::Object implements self::G<core::Record> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_C4&Object&G
+ : super core::Object::•()
+ ;
+}
+abstract class C4 extends self::_C4&Object&G {
+ synthetic constructor •() → self::C4
+ : super self::_C4&Object&G::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart
new file mode 100644
index 0000000..7e2c72f
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef R = Record;
+typedef RR = R;
+
+foo1() => Record(); // Error.
+foo2() => R(); // Error.
+foo3() => RR(); // Error.
+
+main() {}
diff --git a/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.strong.expect b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.strong.expect
new file mode 100644
index 0000000..47b061f
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.strong.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:8:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo1() => Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:9:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo2() => R(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:10:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo3() => RR(); // Error.
+// ^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+static method foo1() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo2() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo3() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.strong.transformed.expect b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.strong.transformed.expect
new file mode 100644
index 0000000..47b061f
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.strong.transformed.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:8:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo1() => Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:9:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo2() => R(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:10:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo3() => RR(); // Error.
+// ^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+static method foo1() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo2() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo3() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.textual_outline.expect b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.textual_outline.expect
new file mode 100644
index 0000000..9a7bdb8
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+typedef R = Record;
+typedef RR = R;
+foo1() => Record();
+foo2() => R();
+foo3() => RR();
+main() {}
diff --git a/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..949b90a9
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+foo1() => Record();
+foo2() => R();
+foo3() => RR();
+main() {}
+typedef R = Record;
+typedef RR = R;
diff --git a/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.expect b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.expect
new file mode 100644
index 0000000..47b061f
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:8:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo1() => Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:9:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo2() => R(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:10:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo3() => RR(); // Error.
+// ^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+static method foo1() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo2() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo3() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.modular.expect b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.modular.expect
new file mode 100644
index 0000000..47b061f
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.modular.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:8:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo1() => Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:9:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo2() => R(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:10:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo3() => RR(); // Error.
+// ^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+static method foo1() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo2() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo3() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.outline.expect b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.outline.expect
new file mode 100644
index 0000000..b3f8d4e
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.outline.expect
@@ -0,0 +1,14 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+static method foo1() → dynamic
+ ;
+static method foo2() → dynamic
+ ;
+static method foo3() → dynamic
+ ;
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.transformed.expect b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.transformed.expect
new file mode 100644
index 0000000..47b061f
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_constructor_forbidden.dart.weak.transformed.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:8:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo1() => Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:9:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo2() => R(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_constructor_forbidden.dart:10:11: Error: The class 'Record' is abstract and can't be instantiated.
+// foo3() => RR(); // Error.
+// ^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef R = core::Record;
+typedef RR = core::Record;
+static method foo1() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo2() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo3() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/records/type_record_unsupported.dart b/pkg/front_end/testcases/records/type_record_unsupported.dart
new file mode 100644
index 0000000..4e7ea83
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_unsupported.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// @dart=2.17
+
+import './type_record_unsupported_lib.dart';
+
+typedef R = Record; // Error.
+
+typedef AR = A<Record>; // Error.
+
+typedef AR2 = A<FromSupportedR>; // Error.
+
+typedef AR3 = A<FromSupportedRR>; // Error.
+
+typedef AR4 = A<FromSupportedAR>; // Ok: indirect use.
+
+typedef RR = FromSupportedR; // Error.
+
+Record foo1() => throw ''; // Error.
+
+dynamic foo2() => new Record(); // Error.
+
+dynamic foo3() => const Record(); // Error.
+
+dynamic foo4() => <Record>[]; // Error.
+
+dynamic foo5() => Record; // Error.
+
+dynamic foo6() => List<Record>; // Error.
+
+dynamic foo7(Record r) => null; // Error.
+
+dynamic foo8({required Record r}) => null; // Error.
+
+List<Record> foo9() => throw ''; // Error.
+
+dynamic foo10(List<Record> l) => null; // Error.
+
+FromSupportedR foo11() => throw ''; // Error.
+
+FromSupportedAR foo12() => throw ''; // Ok: indirect use.
+
+FromSupportedRR foo13() => throw ''; // Error.
+
+dynamic foo14(FromSupportedR r) => null; // Error.
+
+dynamic foo15(FromSupportedAR l) => null; // Ok: indirect use.
+
+dynamic foo16(FromSupportedRR l) => null; // Error.
+
+dynamic foo17() => FromSupportedR; // Error.
+
+dynamic foo18() => FromSupportedAR; // Ok: indirect use.
+
+dynamic foo19() => FromSupportedRR; // Error.
+
+abstract class A1 extends Record {} // Error.
+
+abstract class A2 implements Record {} // Error.
+
+abstract class A3 with Record {} // Error.
+
+abstract class A4 extends A<Record> {} // Error.
+
+abstract class A5 implements A<Record> {} // Error.
+
+abstract class A6 with A<Record> {} // Error.
+
+abstract class A7 extends FromSupportedR {} // Error.
+
+abstract class A8 extends FromSupportedAR {} // Ok: indirect use.
+
+abstract class A9 extends FromSupportedRR {} // Error.
+
+main() {}
diff --git a/pkg/front_end/testcases/records/type_record_unsupported.dart.strong.expect b/pkg/front_end/testcases/records/type_record_unsupported.dart.strong.expect
new file mode 100644
index 0000000..d900d54
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_unsupported.dart.strong.expect
@@ -0,0 +1,401 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:7:9: Context: The issue arises via this type alias.
+// typedef FromSupportedR = Record;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:11:9: Context: The issue arises via this type alias.
+// typedef FromSupportedRR = FromSupportedR;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:9:13: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef R = Record; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:11:16: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR = A<Record>; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:13:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR2 = A<FromSupportedR>; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:15:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR3 = A<FromSupportedRR>; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:19:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef RR = FromSupportedR; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:21:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// Record foo1() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:33:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo7(Record r) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:35:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo8({required Record r}) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:37:6: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// List<Record> foo9() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:39:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo10(List<Record> l) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:41:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedR foo11() => throw ''; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:45:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedRR foo13() => throw ''; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:47:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo14(FromSupportedR r) => null; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:51:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo16(FromSupportedRR l) => null; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A1 extends Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The type 'Record' can't be used as supertype.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A2 implements Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The type 'Record' can't be used as supertype.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:65:29: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A4 extends A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:67:32: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A5 implements A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:69:26: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A6 with A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A3 with Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The type 'Record' can't be used as supertype.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:23:23: Error: The class 'Record' is abstract and can't be instantiated.
+// dynamic foo2() => new Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: The class 'Record' is abstract and can't be instantiated.
+// dynamic foo3() => const Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// dynamic foo3() => const Record(); // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:27:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo4() => <Record>[]; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:29:19: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo5() => Record; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:31:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo6() => List<Record>; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:53:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo17() => FromSupportedR; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:57:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo19() => FromSupportedRR; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+import self as self;
+import "type_record_unsupported_lib.dart" as typ;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///type_record_unsupported_lib.dart";
+
+typedef R = invalid-type;
+typedef AR = typ::A<invalid-type>;
+typedef AR2 = typ::A<core::Record>;
+typedef AR3 = typ::A<core::Record>;
+typedef AR4 = typ::A<typ::A<core::Record>>;
+typedef RR = core::Record;
+abstract class A1 extends core::Object {
+ synthetic constructor •() → self::A1
+ : super core::Object::•()
+ ;
+}
+abstract class A2 extends core::Object {
+ synthetic constructor •() → self::A2
+ : super core::Object::•()
+ ;
+}
+abstract class _A3&Object&Record = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&Record {
+ synthetic constructor •() → self::A3
+ : super self::_A3&Object&Record::•()
+ ;
+}
+abstract class A4 extends typ::A<invalid-type> {
+ synthetic constructor •() → self::A4
+ : super typ::A::•()
+ ;
+}
+abstract class A5 extends core::Object implements typ::A<invalid-type> {
+ synthetic constructor •() → self::A5
+ : super core::Object::•()
+ ;
+}
+abstract class _A6&Object&A = core::Object with typ::A<invalid-type> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A6&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A6 extends self::_A6&Object&A {
+ synthetic constructor •() → self::A6
+ : super self::_A6&Object&A::•()
+ ;
+}
+abstract class A7 extends core::Record {
+ synthetic constructor •() → self::A7
+ : super core::Record::•()
+ ;
+}
+abstract class A8 extends typ::A<core::Record> {
+ synthetic constructor •() → self::A8
+ : super typ::A::•()
+ ;
+}
+abstract class A9 extends core::Record {
+ synthetic constructor •() → self::A9
+ : super core::Record::•()
+ ;
+}
+static method foo1() → invalid-type
+ return throw "";
+static method foo2() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo3() → dynamic
+ return throw invalid-expression "pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+Try using a constructor or factory that is 'const'.
+dynamic foo3() => const Record(); // Error.
+ ^";
+static method foo4() → dynamic
+ return <invalid-type>[];
+static method foo5() → dynamic
+ return #C1;
+static method foo6() → dynamic
+ return #C2;
+static method foo7(invalid-type r) → dynamic
+ return null;
+static method foo8({required invalid-type r = #C3}) → dynamic
+ return null;
+static method foo9() → core::List<invalid-type>
+ return throw "";
+static method foo10(core::List<invalid-type> l) → dynamic
+ return null;
+static method foo11() → core::Record
+ return throw "";
+static method foo12() → typ::A<core::Record>
+ return throw "";
+static method foo13() → core::Record
+ return throw "";
+static method foo14(core::Record r) → dynamic
+ return null;
+static method foo15(typ::A<core::Record> l) → dynamic
+ return null;
+static method foo16(core::Record l) → dynamic
+ return null;
+static method foo17() → dynamic
+ return #C4;
+static method foo18() → dynamic
+ return #C5;
+static method foo19() → dynamic
+ return #C4;
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+import self as typ;
+import "dart:core" as core;
+
+typedef FromSupportedR = core::Record;
+typedef FromSupportedAR = typ::A<core::Record>;
+typedef FromSupportedRR = core::Record;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → typ::A<typ::A::X%>
+ : super core::Object::•()
+ ;
+}
+
+constants {
+ #C1 = TypeLiteralConstant(invalid-type)
+ #C2 = TypeLiteralConstant(core::List<invalid-type>)
+ #C3 = null
+ #C4 = TypeLiteralConstant(core::Record)
+ #C5 = TypeLiteralConstant(typ::A<core::Record>)
+}
diff --git a/pkg/front_end/testcases/records/type_record_unsupported.dart.strong.transformed.expect b/pkg/front_end/testcases/records/type_record_unsupported.dart.strong.transformed.expect
new file mode 100644
index 0000000..8abeebc
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_unsupported.dart.strong.transformed.expect
@@ -0,0 +1,401 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:7:9: Context: The issue arises via this type alias.
+// typedef FromSupportedR = Record;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:11:9: Context: The issue arises via this type alias.
+// typedef FromSupportedRR = FromSupportedR;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:9:13: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef R = Record; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:11:16: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR = A<Record>; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:13:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR2 = A<FromSupportedR>; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:15:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR3 = A<FromSupportedRR>; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:19:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef RR = FromSupportedR; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:21:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// Record foo1() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:33:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo7(Record r) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:35:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo8({required Record r}) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:37:6: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// List<Record> foo9() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:39:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo10(List<Record> l) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:41:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedR foo11() => throw ''; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:45:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedRR foo13() => throw ''; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:47:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo14(FromSupportedR r) => null; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:51:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo16(FromSupportedRR l) => null; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A1 extends Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The type 'Record' can't be used as supertype.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A2 implements Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The type 'Record' can't be used as supertype.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:65:29: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A4 extends A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:67:32: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A5 implements A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:69:26: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A6 with A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A3 with Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The type 'Record' can't be used as supertype.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:23:23: Error: The class 'Record' is abstract and can't be instantiated.
+// dynamic foo2() => new Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: The class 'Record' is abstract and can't be instantiated.
+// dynamic foo3() => const Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// dynamic foo3() => const Record(); // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:27:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo4() => <Record>[]; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:29:19: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo5() => Record; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:31:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo6() => List<Record>; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:53:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo17() => FromSupportedR; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:57:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo19() => FromSupportedRR; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+import self as self;
+import "type_record_unsupported_lib.dart" as typ;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///type_record_unsupported_lib.dart";
+
+typedef R = invalid-type;
+typedef AR = typ::A<invalid-type>;
+typedef AR2 = typ::A<core::Record>;
+typedef AR3 = typ::A<core::Record>;
+typedef AR4 = typ::A<typ::A<core::Record>>;
+typedef RR = core::Record;
+abstract class A1 extends core::Object {
+ synthetic constructor •() → self::A1
+ : super core::Object::•()
+ ;
+}
+abstract class A2 extends core::Object {
+ synthetic constructor •() → self::A2
+ : super core::Object::•()
+ ;
+}
+abstract class _A3&Object&Record extends core::Object implements core::Record /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&Record {
+ synthetic constructor •() → self::A3
+ : super self::_A3&Object&Record::•()
+ ;
+}
+abstract class A4 extends typ::A<invalid-type> {
+ synthetic constructor •() → self::A4
+ : super typ::A::•()
+ ;
+}
+abstract class A5 extends core::Object implements typ::A<invalid-type> {
+ synthetic constructor •() → self::A5
+ : super core::Object::•()
+ ;
+}
+abstract class _A6&Object&A extends core::Object implements typ::A<invalid-type> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A6&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A6 extends self::_A6&Object&A {
+ synthetic constructor •() → self::A6
+ : super self::_A6&Object&A::•()
+ ;
+}
+abstract class A7 extends core::Record {
+ synthetic constructor •() → self::A7
+ : super core::Record::•()
+ ;
+}
+abstract class A8 extends typ::A<core::Record> {
+ synthetic constructor •() → self::A8
+ : super typ::A::•()
+ ;
+}
+abstract class A9 extends core::Record {
+ synthetic constructor •() → self::A9
+ : super core::Record::•()
+ ;
+}
+static method foo1() → invalid-type
+ return throw "";
+static method foo2() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo3() → dynamic
+ return throw invalid-expression "pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+Try using a constructor or factory that is 'const'.
+dynamic foo3() => const Record(); // Error.
+ ^";
+static method foo4() → dynamic
+ return core::_GrowableList::•<invalid-type>(0);
+static method foo5() → dynamic
+ return #C1;
+static method foo6() → dynamic
+ return #C2;
+static method foo7(invalid-type r) → dynamic
+ return null;
+static method foo8({required invalid-type r = #C3}) → dynamic
+ return null;
+static method foo9() → core::List<invalid-type>
+ return throw "";
+static method foo10(core::List<invalid-type> l) → dynamic
+ return null;
+static method foo11() → core::Record
+ return throw "";
+static method foo12() → typ::A<core::Record>
+ return throw "";
+static method foo13() → core::Record
+ return throw "";
+static method foo14(core::Record r) → dynamic
+ return null;
+static method foo15(typ::A<core::Record> l) → dynamic
+ return null;
+static method foo16(core::Record l) → dynamic
+ return null;
+static method foo17() → dynamic
+ return #C4;
+static method foo18() → dynamic
+ return #C5;
+static method foo19() → dynamic
+ return #C4;
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+import self as typ;
+import "dart:core" as core;
+
+typedef FromSupportedR = core::Record;
+typedef FromSupportedAR = typ::A<core::Record>;
+typedef FromSupportedRR = core::Record;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → typ::A<typ::A::X%>
+ : super core::Object::•()
+ ;
+}
+
+constants {
+ #C1 = TypeLiteralConstant(invalid-type)
+ #C2 = TypeLiteralConstant(core::List<invalid-type>)
+ #C3 = null
+ #C4 = TypeLiteralConstant(core::Record)
+ #C5 = TypeLiteralConstant(typ::A<core::Record>)
+}
diff --git a/pkg/front_end/testcases/records/type_record_unsupported.dart.textual_outline.expect b/pkg/front_end/testcases/records/type_record_unsupported.dart.textual_outline.expect
new file mode 100644
index 0000000..629c3b1
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_unsupported.dart.textual_outline.expect
@@ -0,0 +1,48 @@
+// @dart = 2.17
+import './type_record_unsupported_lib.dart';
+
+typedef R = Record;
+typedef AR = A<Record>;
+typedef AR2 = A<FromSupportedR>;
+typedef AR3 = A<FromSupportedRR>;
+typedef AR4 = A<FromSupportedAR>;
+typedef RR = FromSupportedR;
+Record foo1() => throw '';
+dynamic foo2() => new Record();
+dynamic foo3() => const Record();
+dynamic foo4() => <Record>[];
+dynamic foo5() => Record;
+dynamic foo6() => List<Record>;
+dynamic foo7(Record r) => null;
+dynamic foo8({required Record r}) => null;
+List<Record> foo9() => throw '';
+dynamic foo10(List<Record> l) => null;
+FromSupportedR foo11() => throw '';
+FromSupportedAR foo12() => throw '';
+FromSupportedRR foo13() => throw '';
+dynamic foo14(FromSupportedR r) => null;
+dynamic foo15(FromSupportedAR l) => null;
+dynamic foo16(FromSupportedRR l) => null;
+dynamic foo17() => FromSupportedR;
+dynamic foo18() => FromSupportedAR;
+dynamic foo19() => FromSupportedRR;
+
+abstract class A1 extends Record {}
+
+abstract class A2 implements Record {}
+
+abstract class A3 with Record {}
+
+abstract class A4 extends A<Record> {}
+
+abstract class A5 implements A<Record> {}
+
+abstract class A6 with A<Record> {}
+
+abstract class A7 extends FromSupportedR {}
+
+abstract class A8 extends FromSupportedAR {}
+
+abstract class A9 extends FromSupportedRR {}
+
+main() {}
diff --git a/pkg/front_end/testcases/records/type_record_unsupported.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/records/type_record_unsupported.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..08eb3e5
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_unsupported.dart.textual_outline_modelled.expect
@@ -0,0 +1,48 @@
+// @dart = 2.17
+import './type_record_unsupported_lib.dart';
+
+FromSupportedAR foo12() => throw '';
+FromSupportedR foo11() => throw '';
+FromSupportedRR foo13() => throw '';
+List<Record> foo9() => throw '';
+Record foo1() => throw '';
+
+abstract class A1 extends Record {}
+
+abstract class A2 implements Record {}
+
+abstract class A3 with Record {}
+
+abstract class A4 extends A<Record> {}
+
+abstract class A5 implements A<Record> {}
+
+abstract class A6 with A<Record> {}
+
+abstract class A7 extends FromSupportedR {}
+
+abstract class A8 extends FromSupportedAR {}
+
+abstract class A9 extends FromSupportedRR {}
+
+dynamic foo10(List<Record> l) => null;
+dynamic foo14(FromSupportedR r) => null;
+dynamic foo15(FromSupportedAR l) => null;
+dynamic foo16(FromSupportedRR l) => null;
+dynamic foo17() => FromSupportedR;
+dynamic foo18() => FromSupportedAR;
+dynamic foo19() => FromSupportedRR;
+dynamic foo2() => new Record();
+dynamic foo3() => const Record();
+dynamic foo4() => <Record>[];
+dynamic foo5() => Record;
+dynamic foo6() => List<Record>;
+dynamic foo7(Record r) => null;
+dynamic foo8({required Record r}) => null;
+main() {}
+typedef AR = A<Record>;
+typedef AR2 = A<FromSupportedR>;
+typedef AR3 = A<FromSupportedRR>;
+typedef AR4 = A<FromSupportedAR>;
+typedef R = Record;
+typedef RR = FromSupportedR;
diff --git a/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.expect b/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.expect
new file mode 100644
index 0000000..0254763
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.expect
@@ -0,0 +1,401 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:7:9: Context: The issue arises via this type alias.
+// typedef FromSupportedR = Record;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:11:9: Context: The issue arises via this type alias.
+// typedef FromSupportedRR = FromSupportedR;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:9:13: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef R = Record; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:11:16: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR = A<Record>; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:13:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR2 = A<FromSupportedR>; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:15:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR3 = A<FromSupportedRR>; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:19:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef RR = FromSupportedR; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:21:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// Record foo1() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:33:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo7(Record r) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:35:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo8({required Record r}) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:37:6: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// List<Record> foo9() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:39:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo10(List<Record> l) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:41:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedR foo11() => throw ''; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:45:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedRR foo13() => throw ''; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:47:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo14(FromSupportedR r) => null; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:51:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo16(FromSupportedRR l) => null; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A1 extends Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The type 'Record' can't be used as supertype.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A2 implements Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The type 'Record' can't be used as supertype.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:65:29: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A4 extends A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:67:32: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A5 implements A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:69:26: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A6 with A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A3 with Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The type 'Record' can't be used as supertype.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:23:23: Error: The class 'Record' is abstract and can't be instantiated.
+// dynamic foo2() => new Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: The class 'Record' is abstract and can't be instantiated.
+// dynamic foo3() => const Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// dynamic foo3() => const Record(); // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:27:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo4() => <Record>[]; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:29:19: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo5() => Record; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:31:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo6() => List<Record>; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:53:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo17() => FromSupportedR; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:57:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo19() => FromSupportedRR; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+import self as self;
+import "type_record_unsupported_lib.dart" as typ;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///type_record_unsupported_lib.dart";
+
+typedef R = invalid-type;
+typedef AR = typ::A<invalid-type>;
+typedef AR2 = typ::A<core::Record>;
+typedef AR3 = typ::A<core::Record>;
+typedef AR4 = typ::A<typ::A<core::Record>>;
+typedef RR = core::Record;
+abstract class A1 extends core::Object {
+ synthetic constructor •() → self::A1
+ : super core::Object::•()
+ ;
+}
+abstract class A2 extends core::Object {
+ synthetic constructor •() → self::A2
+ : super core::Object::•()
+ ;
+}
+abstract class _A3&Object&Record = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&Record {
+ synthetic constructor •() → self::A3
+ : super self::_A3&Object&Record::•()
+ ;
+}
+abstract class A4 extends typ::A<invalid-type> {
+ synthetic constructor •() → self::A4
+ : super typ::A::•()
+ ;
+}
+abstract class A5 extends core::Object implements typ::A<invalid-type> {
+ synthetic constructor •() → self::A5
+ : super core::Object::•()
+ ;
+}
+abstract class _A6&Object&A = core::Object with typ::A<invalid-type> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A6&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A6 extends self::_A6&Object&A {
+ synthetic constructor •() → self::A6
+ : super self::_A6&Object&A::•()
+ ;
+}
+abstract class A7 extends core::Record {
+ synthetic constructor •() → self::A7
+ : super core::Record::•()
+ ;
+}
+abstract class A8 extends typ::A<core::Record> {
+ synthetic constructor •() → self::A8
+ : super typ::A::•()
+ ;
+}
+abstract class A9 extends core::Record {
+ synthetic constructor •() → self::A9
+ : super core::Record::•()
+ ;
+}
+static method foo1() → invalid-type
+ return throw "";
+static method foo2() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo3() → dynamic
+ return throw invalid-expression "pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+Try using a constructor or factory that is 'const'.
+dynamic foo3() => const Record(); // Error.
+ ^";
+static method foo4() → dynamic
+ return <invalid-type>[];
+static method foo5() → dynamic
+ return #C1;
+static method foo6() → dynamic
+ return #C2;
+static method foo7(invalid-type r) → dynamic
+ return null;
+static method foo8({required invalid-type r = #C3}) → dynamic
+ return null;
+static method foo9() → core::List<invalid-type>
+ return throw "";
+static method foo10(core::List<invalid-type> l) → dynamic
+ return null;
+static method foo11() → core::Record
+ return throw "";
+static method foo12() → typ::A<core::Record>
+ return throw "";
+static method foo13() → core::Record
+ return throw "";
+static method foo14(core::Record r) → dynamic
+ return null;
+static method foo15(typ::A<core::Record> l) → dynamic
+ return null;
+static method foo16(core::Record l) → dynamic
+ return null;
+static method foo17() → dynamic
+ return #C4;
+static method foo18() → dynamic
+ return #C5;
+static method foo19() → dynamic
+ return #C4;
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+import self as typ;
+import "dart:core" as core;
+
+typedef FromSupportedR = core::Record;
+typedef FromSupportedAR = typ::A<core::Record>;
+typedef FromSupportedRR = core::Record;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → typ::A<typ::A::X%>
+ : super core::Object::•()
+ ;
+}
+
+constants {
+ #C1 = TypeLiteralConstant(invalid-type)
+ #C2 = TypeLiteralConstant(core::List<invalid-type>*)
+ #C3 = null
+ #C4 = TypeLiteralConstant(core::Record*)
+ #C5 = TypeLiteralConstant(typ::A<core::Record*>*)
+}
diff --git a/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.modular.expect b/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.modular.expect
new file mode 100644
index 0000000..0254763
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.modular.expect
@@ -0,0 +1,401 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:7:9: Context: The issue arises via this type alias.
+// typedef FromSupportedR = Record;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:11:9: Context: The issue arises via this type alias.
+// typedef FromSupportedRR = FromSupportedR;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:9:13: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef R = Record; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:11:16: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR = A<Record>; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:13:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR2 = A<FromSupportedR>; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:15:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR3 = A<FromSupportedRR>; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:19:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef RR = FromSupportedR; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:21:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// Record foo1() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:33:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo7(Record r) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:35:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo8({required Record r}) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:37:6: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// List<Record> foo9() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:39:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo10(List<Record> l) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:41:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedR foo11() => throw ''; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:45:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedRR foo13() => throw ''; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:47:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo14(FromSupportedR r) => null; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:51:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo16(FromSupportedRR l) => null; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A1 extends Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The type 'Record' can't be used as supertype.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A2 implements Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The type 'Record' can't be used as supertype.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:65:29: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A4 extends A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:67:32: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A5 implements A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:69:26: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A6 with A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A3 with Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The type 'Record' can't be used as supertype.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:23:23: Error: The class 'Record' is abstract and can't be instantiated.
+// dynamic foo2() => new Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: The class 'Record' is abstract and can't be instantiated.
+// dynamic foo3() => const Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// dynamic foo3() => const Record(); // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:27:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo4() => <Record>[]; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:29:19: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo5() => Record; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:31:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo6() => List<Record>; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:53:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo17() => FromSupportedR; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:57:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo19() => FromSupportedRR; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+import self as self;
+import "type_record_unsupported_lib.dart" as typ;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///type_record_unsupported_lib.dart";
+
+typedef R = invalid-type;
+typedef AR = typ::A<invalid-type>;
+typedef AR2 = typ::A<core::Record>;
+typedef AR3 = typ::A<core::Record>;
+typedef AR4 = typ::A<typ::A<core::Record>>;
+typedef RR = core::Record;
+abstract class A1 extends core::Object {
+ synthetic constructor •() → self::A1
+ : super core::Object::•()
+ ;
+}
+abstract class A2 extends core::Object {
+ synthetic constructor •() → self::A2
+ : super core::Object::•()
+ ;
+}
+abstract class _A3&Object&Record = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&Record {
+ synthetic constructor •() → self::A3
+ : super self::_A3&Object&Record::•()
+ ;
+}
+abstract class A4 extends typ::A<invalid-type> {
+ synthetic constructor •() → self::A4
+ : super typ::A::•()
+ ;
+}
+abstract class A5 extends core::Object implements typ::A<invalid-type> {
+ synthetic constructor •() → self::A5
+ : super core::Object::•()
+ ;
+}
+abstract class _A6&Object&A = core::Object with typ::A<invalid-type> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A6&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A6 extends self::_A6&Object&A {
+ synthetic constructor •() → self::A6
+ : super self::_A6&Object&A::•()
+ ;
+}
+abstract class A7 extends core::Record {
+ synthetic constructor •() → self::A7
+ : super core::Record::•()
+ ;
+}
+abstract class A8 extends typ::A<core::Record> {
+ synthetic constructor •() → self::A8
+ : super typ::A::•()
+ ;
+}
+abstract class A9 extends core::Record {
+ synthetic constructor •() → self::A9
+ : super core::Record::•()
+ ;
+}
+static method foo1() → invalid-type
+ return throw "";
+static method foo2() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo3() → dynamic
+ return throw invalid-expression "pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+Try using a constructor or factory that is 'const'.
+dynamic foo3() => const Record(); // Error.
+ ^";
+static method foo4() → dynamic
+ return <invalid-type>[];
+static method foo5() → dynamic
+ return #C1;
+static method foo6() → dynamic
+ return #C2;
+static method foo7(invalid-type r) → dynamic
+ return null;
+static method foo8({required invalid-type r = #C3}) → dynamic
+ return null;
+static method foo9() → core::List<invalid-type>
+ return throw "";
+static method foo10(core::List<invalid-type> l) → dynamic
+ return null;
+static method foo11() → core::Record
+ return throw "";
+static method foo12() → typ::A<core::Record>
+ return throw "";
+static method foo13() → core::Record
+ return throw "";
+static method foo14(core::Record r) → dynamic
+ return null;
+static method foo15(typ::A<core::Record> l) → dynamic
+ return null;
+static method foo16(core::Record l) → dynamic
+ return null;
+static method foo17() → dynamic
+ return #C4;
+static method foo18() → dynamic
+ return #C5;
+static method foo19() → dynamic
+ return #C4;
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+import self as typ;
+import "dart:core" as core;
+
+typedef FromSupportedR = core::Record;
+typedef FromSupportedAR = typ::A<core::Record>;
+typedef FromSupportedRR = core::Record;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → typ::A<typ::A::X%>
+ : super core::Object::•()
+ ;
+}
+
+constants {
+ #C1 = TypeLiteralConstant(invalid-type)
+ #C2 = TypeLiteralConstant(core::List<invalid-type>*)
+ #C3 = null
+ #C4 = TypeLiteralConstant(core::Record*)
+ #C5 = TypeLiteralConstant(typ::A<core::Record*>*)
+}
diff --git a/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.outline.expect b/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.outline.expect
new file mode 100644
index 0000000..0e6cc8f
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.outline.expect
@@ -0,0 +1,328 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:7:9: Context: The issue arises via this type alias.
+// typedef FromSupportedR = Record;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:11:9: Context: The issue arises via this type alias.
+// typedef FromSupportedRR = FromSupportedR;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:9:13: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef R = Record; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:11:16: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR = A<Record>; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:13:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR2 = A<FromSupportedR>; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:15:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR3 = A<FromSupportedRR>; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:19:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef RR = FromSupportedR; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:21:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// Record foo1() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:33:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo7(Record r) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:35:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo8({required Record r}) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:37:6: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// List<Record> foo9() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:39:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo10(List<Record> l) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:41:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedR foo11() => throw ''; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:45:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedRR foo13() => throw ''; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:47:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo14(FromSupportedR r) => null; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:51:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo16(FromSupportedRR l) => null; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A1 extends Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The type 'Record' can't be used as supertype.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A2 implements Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The type 'Record' can't be used as supertype.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:65:29: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A4 extends A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:67:32: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A5 implements A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:69:26: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A6 with A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A3 with Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The type 'Record' can't be used as supertype.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+import self as self;
+import "type_record_unsupported_lib.dart" as typ;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///type_record_unsupported_lib.dart";
+
+typedef R = invalid-type;
+typedef AR = typ::A<invalid-type>;
+typedef AR2 = typ::A<core::Record>;
+typedef AR3 = typ::A<core::Record>;
+typedef AR4 = typ::A<typ::A<core::Record>>;
+typedef RR = core::Record;
+abstract class A1 extends core::Object {
+ synthetic constructor •() → self::A1
+ ;
+}
+abstract class A2 extends core::Object {
+ synthetic constructor •() → self::A2
+ ;
+}
+abstract class _A3&Object&Record = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&Record {
+ synthetic constructor •() → self::A3
+ ;
+}
+abstract class A4 extends typ::A<invalid-type> {
+ synthetic constructor •() → self::A4
+ ;
+}
+abstract class A5 extends core::Object implements typ::A<invalid-type> {
+ synthetic constructor •() → self::A5
+ ;
+}
+abstract class _A6&Object&A = core::Object with typ::A<invalid-type> /*isAnonymousMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A6&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A6 extends self::_A6&Object&A {
+ synthetic constructor •() → self::A6
+ ;
+}
+abstract class A7 extends core::Record {
+ synthetic constructor •() → self::A7
+ ;
+}
+abstract class A8 extends typ::A<core::Record> {
+ synthetic constructor •() → self::A8
+ ;
+}
+abstract class A9 extends core::Record {
+ synthetic constructor •() → self::A9
+ ;
+}
+static method foo1() → invalid-type
+ ;
+static method foo2() → dynamic
+ ;
+static method foo3() → dynamic
+ ;
+static method foo4() → dynamic
+ ;
+static method foo5() → dynamic
+ ;
+static method foo6() → dynamic
+ ;
+static method foo7(invalid-type r) → dynamic
+ ;
+static method foo8({required invalid-type r}) → dynamic
+ ;
+static method foo9() → core::List<invalid-type>
+ ;
+static method foo10(core::List<invalid-type> l) → dynamic
+ ;
+static method foo11() → core::Record
+ ;
+static method foo12() → typ::A<core::Record>
+ ;
+static method foo13() → core::Record
+ ;
+static method foo14(core::Record r) → dynamic
+ ;
+static method foo15(typ::A<core::Record> l) → dynamic
+ ;
+static method foo16(core::Record l) → dynamic
+ ;
+static method foo17() → dynamic
+ ;
+static method foo18() → dynamic
+ ;
+static method foo19() → dynamic
+ ;
+static method main() → dynamic
+ ;
+
+library /*isNonNullableByDefault*/;
+import self as typ;
+import "dart:core" as core;
+
+typedef FromSupportedR = core::Record;
+typedef FromSupportedAR = typ::A<core::Record>;
+typedef FromSupportedRR = core::Record;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → typ::A<typ::A::X%>
+ ;
+}
diff --git a/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.transformed.expect b/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.transformed.expect
new file mode 100644
index 0000000..26ab517
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_unsupported.dart.weak.transformed.expect
@@ -0,0 +1,401 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:7:9: Context: The issue arises via this type alias.
+// typedef FromSupportedR = Record;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:16: Error: 'Record' is restricted and can't be extended or implemented.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^
+// pkg/front_end/testcases/records/type_record_unsupported_lib.dart:11:9: Context: The issue arises via this type alias.
+// typedef FromSupportedRR = FromSupportedR;
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:9:13: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef R = Record; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:11:16: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR = A<Record>; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:13:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR2 = A<FromSupportedR>; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:15:17: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef AR3 = A<FromSupportedRR>; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:19:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// typedef RR = FromSupportedR; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:21:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// Record foo1() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:33:14: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo7(Record r) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:35:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo8({required Record r}) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:37:6: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// List<Record> foo9() => throw ''; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:39:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo10(List<Record> l) => null; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:41:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedR foo11() => throw ''; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:45:1: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// FromSupportedRR foo13() => throw ''; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:47:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo14(FromSupportedR r) => null; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:51:15: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo16(FromSupportedRR l) => null; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A1 extends Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:59:27: Error: The type 'Record' can't be used as supertype.
+// abstract class A1 extends Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A2 implements Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:61:30: Error: The type 'Record' can't be used as supertype.
+// abstract class A2 implements Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:65:29: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A4 extends A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:67:32: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A5 implements A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:69:26: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A6 with A<Record> {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:71:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A7 extends FromSupportedR {} // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:75:27: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A9 extends FromSupportedRR {} // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// abstract class A3 with Record {} // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:63:24: Error: The type 'Record' can't be used as supertype.
+// abstract class A3 with Record {} // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:23:23: Error: The class 'Record' is abstract and can't be instantiated.
+// dynamic foo2() => new Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: The class 'Record' is abstract and can't be instantiated.
+// dynamic foo3() => const Record(); // Error.
+// ^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// dynamic foo3() => const Record(); // Error.
+// ^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:27:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo4() => <Record>[]; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:29:19: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo5() => Record; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:31:24: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo6() => List<Record>; // Error.
+// ^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:53:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo17() => FromSupportedR; // Error.
+// ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/records/type_record_unsupported.dart:57:20: Error: The 'records' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher.
+// dynamic foo19() => FromSupportedRR; // Error.
+// ^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/records/type_record_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature.
+// // @dart=2.17
+// ^^^^^^^^^^^^^
+//
+import self as self;
+import "type_record_unsupported_lib.dart" as typ;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///type_record_unsupported_lib.dart";
+
+typedef R = invalid-type;
+typedef AR = typ::A<invalid-type>;
+typedef AR2 = typ::A<core::Record>;
+typedef AR3 = typ::A<core::Record>;
+typedef AR4 = typ::A<typ::A<core::Record>>;
+typedef RR = core::Record;
+abstract class A1 extends core::Object {
+ synthetic constructor •() → self::A1
+ : super core::Object::•()
+ ;
+}
+abstract class A2 extends core::Object {
+ synthetic constructor •() → self::A2
+ : super core::Object::•()
+ ;
+}
+abstract class _A3&Object&Record extends core::Object implements core::Record /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A3&Object&Record
+ : super core::Object::•()
+ ;
+}
+abstract class A3 extends self::_A3&Object&Record {
+ synthetic constructor •() → self::A3
+ : super self::_A3&Object&Record::•()
+ ;
+}
+abstract class A4 extends typ::A<invalid-type> {
+ synthetic constructor •() → self::A4
+ : super typ::A::•()
+ ;
+}
+abstract class A5 extends core::Object implements typ::A<invalid-type> {
+ synthetic constructor •() → self::A5
+ : super core::Object::•()
+ ;
+}
+abstract class _A6&Object&A extends core::Object implements typ::A<invalid-type> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
+ const synthetic constructor •() → self::_A6&Object&A
+ : super core::Object::•()
+ ;
+}
+abstract class A6 extends self::_A6&Object&A {
+ synthetic constructor •() → self::A6
+ : super self::_A6&Object&A::•()
+ ;
+}
+abstract class A7 extends core::Record {
+ synthetic constructor •() → self::A7
+ : super core::Record::•()
+ ;
+}
+abstract class A8 extends typ::A<core::Record> {
+ synthetic constructor •() → self::A8
+ : super typ::A::•()
+ ;
+}
+abstract class A9 extends core::Record {
+ synthetic constructor •() → self::A9
+ : super core::Record::•()
+ ;
+}
+static method foo1() → invalid-type
+ return throw "";
+static method foo2() → dynamic
+ return throw new core::AbstractClassInstantiationError::•("Record");
+static method foo3() → dynamic
+ return throw invalid-expression "pkg/front_end/testcases/records/type_record_unsupported.dart:25:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+Try using a constructor or factory that is 'const'.
+dynamic foo3() => const Record(); // Error.
+ ^";
+static method foo4() → dynamic
+ return core::_GrowableList::•<invalid-type>(0);
+static method foo5() → dynamic
+ return #C1;
+static method foo6() → dynamic
+ return #C2;
+static method foo7(invalid-type r) → dynamic
+ return null;
+static method foo8({required invalid-type r = #C3}) → dynamic
+ return null;
+static method foo9() → core::List<invalid-type>
+ return throw "";
+static method foo10(core::List<invalid-type> l) → dynamic
+ return null;
+static method foo11() → core::Record
+ return throw "";
+static method foo12() → typ::A<core::Record>
+ return throw "";
+static method foo13() → core::Record
+ return throw "";
+static method foo14(core::Record r) → dynamic
+ return null;
+static method foo15(typ::A<core::Record> l) → dynamic
+ return null;
+static method foo16(core::Record l) → dynamic
+ return null;
+static method foo17() → dynamic
+ return #C4;
+static method foo18() → dynamic
+ return #C5;
+static method foo19() → dynamic
+ return #C4;
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+import self as typ;
+import "dart:core" as core;
+
+typedef FromSupportedR = core::Record;
+typedef FromSupportedAR = typ::A<core::Record>;
+typedef FromSupportedRR = core::Record;
+abstract class A<X extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → typ::A<typ::A::X%>
+ : super core::Object::•()
+ ;
+}
+
+constants {
+ #C1 = TypeLiteralConstant(invalid-type)
+ #C2 = TypeLiteralConstant(core::List<invalid-type>*)
+ #C3 = null
+ #C4 = TypeLiteralConstant(core::Record*)
+ #C5 = TypeLiteralConstant(typ::A<core::Record*>*)
+}
diff --git a/pkg/front_end/testcases/records/type_record_unsupported_lib.dart b/pkg/front_end/testcases/records/type_record_unsupported_lib.dart
new file mode 100644
index 0000000..ed9575f
--- /dev/null
+++ b/pkg/front_end/testcases/records/type_record_unsupported_lib.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class A<X> {}
+
+typedef FromSupportedR = Record;
+
+typedef FromSupportedAR = A<Record>;
+
+typedef FromSupportedRR = FromSupportedR;
diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status
index 642a81e..34a457f 100644
--- a/pkg/front_end/testcases/textual_outline.status
+++ b/pkg/front_end/testcases/textual_outline.status
@@ -151,6 +151,7 @@
records/record_type_unsupported: FormatterCrash
records/simple_inference: FormatterCrash
records/structurally_constant: FormatterCrash
+records/type_record: FormatterCrash
regress/ambiguous_builder_01: FormatterCrash
regress/issue_29942: FormatterCrash
regress/issue_29944: FormatterCrash
diff --git a/pkg/front_end/testcases/unified_collections/const_for.dart b/pkg/front_end/testcases/unified_collections/const_for.dart
new file mode 100644
index 0000000..be076a0
--- /dev/null
+++ b/pkg/front_end/testcases/unified_collections/const_for.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+test() {
+ const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+ const List<int> list2 = const [for (int i in list1) i];
+ const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+ const Set<int> set2 = const {for (int i in set1) i};
+}
diff --git a/pkg/front_end/testcases/unified_collections/const_for.dart.textual_outline.expect b/pkg/front_end/testcases/unified_collections/const_for.dart.textual_outline.expect
new file mode 100644
index 0000000..a9f9e5f
--- /dev/null
+++ b/pkg/front_end/testcases/unified_collections/const_for.dart.textual_outline.expect
@@ -0,0 +1 @@
+test() {}
diff --git a/pkg/front_end/testcases/unified_collections/const_for.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/unified_collections/const_for.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..a9f9e5f
--- /dev/null
+++ b/pkg/front_end/testcases/unified_collections/const_for.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+test() {}
diff --git a/pkg/front_end/testcases/unified_collections/const_for.dart.weak.expect b/pkg/front_end/testcases/unified_collections/const_for.dart.weak.expect
new file mode 100644
index 0000000..bbd97e2
--- /dev/null
+++ b/pkg/front_end/testcases/unified_collections/const_for.dart.weak.expect
@@ -0,0 +1,53 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:6:50: Error: Not a constant expression.
+// const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:6:57: Error: Not a constant expression.
+// const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:6:34: Error: 'for' is not supported in constant expressions.
+// const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+// ^^^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:7:34: Error: 'for' is not supported in constant expressions.
+// const List<int> list2 = const [for (int i in list1) i];
+// ^^^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:8:48: Error: Not a constant expression.
+// const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:8:55: Error: Not a constant expression.
+// const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:8:32: Error: 'for' is not supported in constant expressions.
+// const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+// ^^^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:9:32: Error: 'for' is not supported in constant expressions.
+// const Set<int> set2 = const {for (int i in set1) i};
+// ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test() → dynamic {
+ const core::List<core::int> list1 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:6:34: Error: 'for' is not supported in constant expressions.
+ const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+ ^^^";
+ const core::List<core::int> list2 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:7:34: Error: 'for' is not supported in constant expressions.
+ const List<int> list2 = const [for (int i in list1) i];
+ ^^^";
+ const core::Set<core::int> set1 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:8:32: Error: 'for' is not supported in constant expressions.
+ const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+ ^^^";
+ const core::Set<core::int> set2 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:9:32: Error: 'for' is not supported in constant expressions.
+ const Set<int> set2 = const {for (int i in set1) i};
+ ^^^";
+}
diff --git a/pkg/front_end/testcases/unified_collections/const_for.dart.weak.modular.expect b/pkg/front_end/testcases/unified_collections/const_for.dart.weak.modular.expect
new file mode 100644
index 0000000..bbd97e2
--- /dev/null
+++ b/pkg/front_end/testcases/unified_collections/const_for.dart.weak.modular.expect
@@ -0,0 +1,53 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:6:50: Error: Not a constant expression.
+// const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:6:57: Error: Not a constant expression.
+// const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:6:34: Error: 'for' is not supported in constant expressions.
+// const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+// ^^^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:7:34: Error: 'for' is not supported in constant expressions.
+// const List<int> list2 = const [for (int i in list1) i];
+// ^^^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:8:48: Error: Not a constant expression.
+// const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:8:55: Error: Not a constant expression.
+// const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:8:32: Error: 'for' is not supported in constant expressions.
+// const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+// ^^^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:9:32: Error: 'for' is not supported in constant expressions.
+// const Set<int> set2 = const {for (int i in set1) i};
+// ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test() → dynamic {
+ const core::List<core::int> list1 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:6:34: Error: 'for' is not supported in constant expressions.
+ const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+ ^^^";
+ const core::List<core::int> list2 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:7:34: Error: 'for' is not supported in constant expressions.
+ const List<int> list2 = const [for (int i in list1) i];
+ ^^^";
+ const core::Set<core::int> set1 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:8:32: Error: 'for' is not supported in constant expressions.
+ const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+ ^^^";
+ const core::Set<core::int> set2 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:9:32: Error: 'for' is not supported in constant expressions.
+ const Set<int> set2 = const {for (int i in set1) i};
+ ^^^";
+}
diff --git a/pkg/front_end/testcases/unified_collections/const_for.dart.weak.outline.expect b/pkg/front_end/testcases/unified_collections/const_for.dart.weak.outline.expect
new file mode 100644
index 0000000..eef3152
--- /dev/null
+++ b/pkg/front_end/testcases/unified_collections/const_for.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/unified_collections/const_for.dart.weak.transformed.expect b/pkg/front_end/testcases/unified_collections/const_for.dart.weak.transformed.expect
new file mode 100644
index 0000000..bbd97e2
--- /dev/null
+++ b/pkg/front_end/testcases/unified_collections/const_for.dart.weak.transformed.expect
@@ -0,0 +1,53 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:6:50: Error: Not a constant expression.
+// const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:6:57: Error: Not a constant expression.
+// const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:6:34: Error: 'for' is not supported in constant expressions.
+// const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+// ^^^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:7:34: Error: 'for' is not supported in constant expressions.
+// const List<int> list2 = const [for (int i in list1) i];
+// ^^^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:8:48: Error: Not a constant expression.
+// const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:8:55: Error: Not a constant expression.
+// const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+// ^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:8:32: Error: 'for' is not supported in constant expressions.
+// const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+// ^^^
+//
+// pkg/front_end/testcases/unified_collections/const_for.dart:9:32: Error: 'for' is not supported in constant expressions.
+// const Set<int> set2 = const {for (int i in set1) i};
+// ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test() → dynamic {
+ const core::List<core::int> list1 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:6:34: Error: 'for' is not supported in constant expressions.
+ const List<int> list1 = const [for (var i = 1; i < 4; i++) i];
+ ^^^";
+ const core::List<core::int> list2 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:7:34: Error: 'for' is not supported in constant expressions.
+ const List<int> list2 = const [for (int i in list1) i];
+ ^^^";
+ const core::Set<core::int> set1 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:8:32: Error: 'for' is not supported in constant expressions.
+ const Set<int> set1 = const {for (var i = 1; i < 4; i++) i};
+ ^^^";
+ const core::Set<core::int> set2 = invalid-expression "pkg/front_end/testcases/unified_collections/const_for.dart:9:32: Error: 'for' is not supported in constant expressions.
+ const Set<int> set2 = const {for (int i in set1) i};
+ ^^^";
+}
diff --git a/pkg/kernel/lib/core_types.dart b/pkg/kernel/lib/core_types.dart
index 435684c..32a17d8 100644
--- a/pkg/kernel/lib/core_types.dart
+++ b/pkg/kernel/lib/core_types.dart
@@ -28,6 +28,7 @@
'Function',
'Invocation',
'FallThroughError',
+ 'Record',
],
'dart:_internal': [
'LateInitializationErrorImpl',
diff --git a/runtime/tools/heapsnapshot/bin/explore.dart b/runtime/tools/heapsnapshot/bin/explore.dart
index b597b45..3cdf9a7 100644
--- a/runtime/tools/heapsnapshot/bin/explore.dart
+++ b/runtime/tools/heapsnapshot/bin/explore.dart
@@ -82,10 +82,9 @@
.where((p) => !p.isEmpty)
.toList();
if (args.isEmpty) continue;
- if (args.length == 1 && args.single == 'exit') {
+
+ if (await cliCommandRunner.run(cliState, args)) {
return;
}
-
- await cliCommandRunner.run(cliState, args);
}
}
diff --git a/runtime/tools/heapsnapshot/lib/src/analysis.dart b/runtime/tools/heapsnapshot/lib/src/analysis.dart
index 6e257f9..d8a14a8 100644
--- a/runtime/tools/heapsnapshot/lib/src/analysis.dart
+++ b/runtime/tools/heapsnapshot/lib/src/analysis.dart
@@ -7,6 +7,8 @@
import 'package:vm_service/vm_service.dart';
import 'format.dart';
+import 'intset.dart';
+export 'intset.dart';
const int _invalidIdx = 0;
const int _rootObjectIdx = 1;
@@ -14,7 +16,7 @@
class Analysis {
final HeapSnapshotGraph graph;
- late final reachableObjects = transitiveGraph(<int>{_rootObjectIdx});
+ late final reachableObjects = transitiveGraph(roots);
late final Uint32List _retainers = _calculateRetainers();
@@ -66,13 +68,13 @@
Analysis(this.graph);
/// The roots from which alive data can be discovered.
- Set<int> get roots => <int>{_rootObjectIdx};
+ final IntSet roots = IntSet()..add(_rootObjectIdx);
/// Calculates retaining paths for all objects in [objs].
///
/// All retaining paths will have the object itself plus at most [depth]
/// retainers in it.
- List<DedupedUint32List> retainingPathsOf(Set<int> objs, int depth) {
+ List<DedupedUint32List> retainingPathsOf(IntSet objs, int depth) {
final paths = <DedupedUint32List, int>{};
for (var oId in objs) {
final rpath = _retainingPathOf(oId, depth);
@@ -143,7 +145,7 @@
///
/// The classes are sored by sum of shallow-size of objects of a class if
/// [sortBySize] is true and by number of objects per-class otherwise.
- HeapStats generateObjectStats(Set<int> objects, {bool sortBySize = true}) {
+ HeapStats generateObjectStats(IntSet objects, {bool sortBySize = true}) {
final graphObjects = graph.objects;
final numCids = graph.classes.length;
@@ -184,7 +186,7 @@
///
/// The returned [HeapData]s are sorted by cumulative size if
/// [sortBySize] is true and by number of objects otherwise.
- HeapDataStats generateDataStats(Set<int> objects, {bool sortBySize = true}) {
+ HeapDataStats generateDataStats(IntSet objects, {bool sortBySize = true}) {
final graphObjects = graph.objects;
final klasses = graph.classes;
final counts = <HeapData, int>{};
@@ -212,8 +214,8 @@
}
/// Calculates the set of objects transitively reachable by [roots].
- Set<int> transitiveGraph(Set<int> roots, [TraverseFilter? tfilter = null]) {
- final reachable = <int>{};
+ IntSet transitiveGraph(IntSet roots, [TraverseFilter? tfilter = null]) {
+ final reachable = IntSet();
final worklist = <int>[];
final objects = graph.objects;
@@ -221,7 +223,7 @@
reachable.addAll(roots);
worklist.addAll(roots);
- final weakProperties = <int>{};
+ final weakProperties = IntSet();
while (worklist.isNotEmpty) {
while (worklist.isNotEmpty) {
@@ -287,9 +289,8 @@
}
/// Calculates the set of objects that transitively can reach [oids].
- Set<int> reverseTransitiveGraph(Set<int> oids,
- [TraverseFilter? tfilter = null]) {
- final reachable = <int>{};
+ IntSet reverseTransitiveGraph(IntSet oids, [TraverseFilter? tfilter = null]) {
+ final reachable = IntSet();
final worklist = <int>[];
final objects = graph.objects;
@@ -354,8 +355,8 @@
}
// Only keep those in [toFilter] that have references from [from].
- Set<int> filterObjectsReferencedBy(Set<int> toFilter, Set<int> from) {
- final result = <int>{};
+ IntSet filterObjectsReferencedBy(IntSet toFilter, IntSet from) {
+ final result = IntSet();
final objects = graph.objects;
for (final fromId in from) {
@@ -372,11 +373,11 @@
}
/// Returns set of cids that are matching the provided [patterns].
- Set<int> findClassIdsMatching(Iterable<String> patterns) {
+ IntSet findClassIdsMatching(Iterable<String> patterns) {
final regexPatterns = patterns.map((p) => RegExp(p)).toList();
final classes = graph.classes;
- final cids = <int>{};
+ final cids = IntSet();
for (final klass in classes) {
if (regexPatterns.any((pattern) =>
pattern.hasMatch(klass.name) ||
@@ -391,13 +392,13 @@
TraverseFilter? parseTraverseFilter(List<String> patterns) {
if (patterns.isEmpty) return null;
- final aset = <int>{};
- final naset = <int>{};
+ final aset = IntSet();
+ final naset = IntSet();
int bits = 0;
- final fmap = <int, Set<int>>{};
- final nfmap = <int, Set<int>>{};
+ final fmap = <int, IntSet>{};
+ final nfmap = <int, IntSet>{};
for (String pattern in patterns) {
final bool isNegated = pattern.startsWith('^');
if (isNegated) {
@@ -418,7 +419,7 @@
for (final field in klass.fields) {
if (fieldNameRegexp.hasMatch(field.name)) {
(isNegated ? nfmap : fmap)
- .putIfAbsent(cid, _buildSet)
+ .putIfAbsent(cid, IntSet.new)
.add(field.index);
}
}
@@ -443,21 +444,20 @@
}
/// Returns set of objects from [objectIds] whose class id is in [cids].
- Set<int> filterByClassId(Set<int> objectIds, Set<int> cids) {
+ IntSet filterByClassId(IntSet objectIds, IntSet cids) {
return filter(objectIds, (object) => cids.contains(object.classId));
}
/// Returns set of objects from [objectIds] whose class id is in [cids].
- Set<int> filterByClassPatterns(Set<int> objectIds, List<String> patterns) {
+ IntSet filterByClassPatterns(IntSet objectIds, List<String> patterns) {
final tfilter = parseTraverseFilter(patterns);
if (tfilter == null) return objectIds;
return filter(objectIds, tfilter._shouldFilterObject);
}
/// Returns set of objects from [objectIds] whose class id is in [cids].
- Set<int> filter(
- Set<int> objectIds, bool Function(HeapSnapshotObject) filter) {
- final result = <int>{};
+ IntSet filter(IntSet objectIds, bool Function(HeapSnapshotObject) filter) {
+ final result = IntSet();
final objects = graph.objects;
objectIds.forEach((int objId) {
if (filter(objects[objId])) {
@@ -468,11 +468,11 @@
}
/// Returns users of [objs].
- Set<int> findUsers(Set<int> objs, List<String> patterns) {
+ IntSet findUsers(IntSet objs, List<String> patterns) {
final tfilter = parseTraverseFilter(patterns);
final objects = graph.objects;
- final result = <int>{};
+ final result = IntSet();
for (final objId in objs) {
final object = objects[objId];
final referrers = object.referrers;
@@ -496,11 +496,11 @@
}
/// Returns references of [objs].
- Set<int> findReferences(Set<int> objs, List<String> patterns) {
+ IntSet findReferences(IntSet objs, List<String> patterns) {
final tfilter = parseTraverseFilter(patterns);
final objects = graph.objects;
- final result = <int>{};
+ final result = IntSet();
for (final objId in objs) {
final object = objects[objId];
final references = object.references;
@@ -625,7 +625,7 @@
}
@pragma('vm:prefer-inline')
- bool hasMoreThanOneAlive(Set<int> reachableObjects, Uint32List list) {
+ bool hasMoreThanOneAlive(IntSet reachableObjects, Uint32List list) {
int count = 0;
for (int i = 0; i < list.length; ++i) {
if (reachableObjects.contains(list[i])) {
@@ -662,9 +662,9 @@
Uint32List _calculateRetainers() {
final retainers = Uint32List(graph.objects.length);
- var worklist = {_rootObjectIdx};
+ var worklist = IntSet()..add(_rootObjectIdx);
while (!worklist.isEmpty) {
- final next = <int>{};
+ final next = IntSet();
for (final objId in worklist) {
final object = graph.objects[objId];
@@ -717,11 +717,11 @@
final int _bits;
- final Set<int>? _allowed;
- final Set<int>? _disallowed;
+ final IntSet? _allowed;
+ final IntSet? _disallowed;
- final Map<int, Set<int>>? _followMap;
- final Map<int, Set<int>>? _notFollowMap;
+ final Map<int, IntSet>? _followMap;
+ final Map<int, IntSet>? _notFollowMap;
const TraverseFilter._(this._patterns, this._bits, this._allowed,
this._disallowed, this._followMap, this._notFollowMap);
@@ -735,8 +735,8 @@
sb.writeln(
'The traverse filter expression "${_patterns.join(' ')}" matches:\n');
- final ca = _allowed ?? const {};
- final cna = _disallowed ?? const {};
+ final ca = _allowed ?? IntSet();
+ final cna = _disallowed ?? IntSet();
final klasses = graph.classes.toList()
..sort((a, b) => a.name.compareTo(b.name));
@@ -747,8 +747,8 @@
final posEdge = [];
final negEdge = [];
- final f = _followMap?[cid] ?? const {};
- final nf = _notFollowMap?[cid] ?? const {};
+ final f = _followMap?[cid] ?? IntSet();
+ final nf = _notFollowMap?[cid] ?? IntSet();
for (final field in klass.fields) {
final fieldIndex = field.index;
if (f.contains(fieldIndex)) {
@@ -974,5 +974,3 @@
arch64,
arch64c,
}
-
-Set<int> _buildSet() => <int>{};
diff --git a/runtime/tools/heapsnapshot/lib/src/cli.dart b/runtime/tools/heapsnapshot/lib/src/cli.dart
index 0e9450b..41d3b0e 100644
--- a/runtime/tools/heapsnapshot/lib/src/cli.dart
+++ b/runtime/tools/heapsnapshot/lib/src/cli.dart
@@ -112,8 +112,6 @@
Future executeInternal(
CliState state, ArgResults options, List<String> args) async {
- HeapSnapshotGraph.getSnapshot;
-
if (args.length != 1) {
printUsage(state);
return;
@@ -241,7 +239,7 @@
state.output.print('Known named sets:');
final table = Table();
- state.namedSets.forEach((String name, Set<int> oids) {
+ state.namedSets.forEach((String name, IntSet oids) {
table.addRow([name, '{#${oids.length}}']);
});
state.output.print(indent(' ', table.asString));
@@ -398,6 +396,58 @@
}
}
+class HelpCommand extends Command {
+ final name = 'help';
+ final description = 'Shows general help or help for a specific command.';
+ final usage = 'help <command>?';
+ final nameAliases = ['h'];
+
+ HelpCommand();
+
+ Future executeInternal(
+ CliState state, ArgResults options, List<String> args) async {
+ if (args.length >= 1) {
+ final helpCommandName = args[0];
+ final helpCommand = cliCommandRunner.name2command[helpCommandName];
+ if (helpCommand != null) {
+ helpCommand.printUsage(state);
+ return;
+ }
+ }
+ final table = Table();
+ cliCommandRunner.name2command.forEach((name, command) {
+ if (name == command.name) {
+ table.addRow([command.name, command.description]);
+ }
+ });
+ state.output.print('Available commands:');
+ state.output.print(indent(' ', table.asString));
+ }
+
+ String? completeCommand(CliState state, String text) {
+ if (text.indexOf(' ') == -1) {
+ final pc = PostfixCompleter(text);
+ final possibleCommands = cliCommandRunner.name2command.keys.toList();
+ return pc.tryComplete(text, possibleCommands);
+ }
+ return null;
+ }
+}
+
+class ExitCommand extends Command {
+ final name = 'exit';
+ final description = 'Exits the program.';
+ final usage = 'exit';
+ final nameAliases = ['quit', 'q'];
+
+ ExitCommand();
+
+ Future executeInternal(
+ CliState state, ArgResults options, List<String> args) {
+ throw 'unreachable';
+ }
+}
+
class CommandRunner {
final Command defaultCommand;
final Map<String, Command> name2command = {};
@@ -411,36 +461,21 @@
}
}
- Future run(CliState state, List<String> args) async {
- if (args.isEmpty) return;
+ /// Returns `true` if the CLI tool should exit and `false` otherwise.
+ Future<bool> run(CliState state, List<String> args) async {
+ if (args.isEmpty) return false;
final commandName = args.first;
final command = name2command[commandName];
if (command != null) {
- await command.execute(state, args.skip(1).toList());
- return;
- }
- if (const ['help', 'h'].contains(commandName)) {
- if (args.length > 1) {
- final helpCommandName = args[1];
- final helpCommand = name2command[helpCommandName];
- if (helpCommand != null) {
- helpCommand.printUsage(state);
- return;
- }
+ if (command is ExitCommand) {
+ return true;
}
- final table = Table();
- name2command.forEach((name, command) {
- if (name == command.name) {
- table.addRow([command.name, command.description]);
- }
- });
- state.output.print('Available commands:');
- state.output.print(indent(' ', table.asString));
- return;
+ await command.execute(state, args.skip(1).toList());
+ return false;
}
-
await defaultCommand.execute(state, args);
+ return false;
}
String? completeCommand(CliState state, String text) {
@@ -499,6 +534,8 @@
EvaluateCommand(),
ExamineCommand(),
DescFilterCommand(),
+ HelpCommand(),
+ ExitCommand(),
], EvaluateCommand());
class CompletionCollector extends Output {
diff --git a/runtime/tools/heapsnapshot/lib/src/completion.dart b/runtime/tools/heapsnapshot/lib/src/completion.dart
index d1d0a7b..d7f9cfb 100644
--- a/runtime/tools/heapsnapshot/lib/src/completion.dart
+++ b/runtime/tools/heapsnapshot/lib/src/completion.dart
@@ -22,6 +22,12 @@
}
String? _selectCandidate(String prefix, List<String> candidates) {
+ // If there's an exact match, use that.
+ if (candidates.any((candidate) => prefix == candidate)) {
+ return prefix;
+ }
+
+ // Otherwise use the longest possible completion.
candidates = candidates
.where((c) => prefix.length < c.length && c.startsWith(prefix))
.toList();
diff --git a/runtime/tools/heapsnapshot/lib/src/expression.dart b/runtime/tools/heapsnapshot/lib/src/expression.dart
index d001ed2..feee6c3 100644
--- a/runtime/tools/heapsnapshot/lib/src/expression.dart
+++ b/runtime/tools/heapsnapshot/lib/src/expression.dart
@@ -10,7 +10,7 @@
import 'completion.dart';
abstract class SetExpression {
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output);
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output);
}
class FilterExpression extends SetExpression {
@@ -19,7 +19,7 @@
FilterExpression(this.expr, this.patterns);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
final oids = expr.evaluate(namedSets, analysis, output);
if (oids == null) return null;
@@ -54,7 +54,7 @@
DFilterExpression(this.expr, this.patterns);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
final oids = expr.evaluate(namedSets, analysis, output);
if (oids == null) return null;
final predicates = patterns.map((String pattern) {
@@ -129,7 +129,7 @@
MinusExpression(this.expr, this.operands);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
final result = expr.evaluate(namedSets, analysis, output)?.toSet();
if (result == null) return null;
@@ -148,8 +148,8 @@
OrExpression(this.exprs);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
- final result = <int>{};
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ final result = IntSet();
for (int i = 0; i < exprs.length; ++i) {
final oids = exprs[i].evaluate(namedSets, analysis, output);
if (oids == null) return null;
@@ -165,11 +165,11 @@
AndExpression(this.expr, this.operands);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
final nullableResult = expr.evaluate(namedSets, analysis, output)?.toSet();
if (nullableResult == null) return null;
- Set<int> result = nullableResult;
+ IntSet result = nullableResult;
for (int i = 0; i < operands.length; ++i) {
final oids = operands[i].evaluate(namedSets, analysis, output);
if (oids == null) return null;
@@ -187,13 +187,13 @@
SampleExpression(this.expr, this.count);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
final oids = expr.evaluate(namedSets, analysis, output);
if (oids == null) return null;
if (oids.isEmpty) return oids;
- final result = <int>{};
+ final result = IntSet();
final l = oids.toList();
while (result.length < count && result.length < oids.length) {
result.add(l[_random.nextInt(oids.length)]);
@@ -209,7 +209,7 @@
ClosureExpression(this.expr, this.patterns);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
final roots = expr.evaluate(namedSets, analysis, output);
if (roots == null) return null;
@@ -231,7 +231,7 @@
UserClosureExpression(this.expr, this.patterns);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
final roots = expr.evaluate(namedSets, analysis, output);
if (roots == null) return null;
@@ -246,7 +246,7 @@
FollowExpression(this.objs, this.patterns);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
final oids = objs.evaluate(namedSets, analysis, output);
if (oids == null) return null;
@@ -260,7 +260,7 @@
UserFollowExpression(this.objs, this.patterns);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
final oids = objs.evaluate(namedSets, analysis, output);
if (oids == null) return null;
@@ -273,7 +273,7 @@
NamedExpression(this.name);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
final oids = namedSets.getSet(name);
if (oids == null) {
output.printError('"$name" does not refer to a command or named set.');
@@ -289,7 +289,7 @@
SetNameExpression(this.name, this.expr);
- Set<int>? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
+ IntSet? evaluate(NamedSets namedSets, Analysis analysis, Output output) {
final oids = expr.evaluate(namedSets, analysis, output);
if (oids == null) return null;
@@ -298,7 +298,7 @@
}
}
-Set<int>? parseAndEvaluate(
+IntSet? parseAndEvaluate(
NamedSets namedSets, Analysis analysis, String text, Output output) {
final sexpr = parseExpression(text, output, namedSets.names.toSet());
if (sexpr == null) return null;
@@ -611,18 +611,18 @@
}
class NamedSets {
- final Map<String, Set<int>> _namedSets = {};
+ final Map<String, IntSet> _namedSets = {};
int _varIndex = 0;
List<String> get names => _namedSets.keys.toList();
- String nameSet(Set<int> oids, [String? id]) {
+ String nameSet(IntSet oids, [String? id]) {
id ??= _generateName();
_namedSets[id] = oids;
return id;
}
- Set<int>? getSet(String name) => _namedSets[name];
+ IntSet? getSet(String name) => _namedSets[name];
bool hasSetName(String name) => _namedSets.containsKey(name);
@@ -634,7 +634,7 @@
_namedSets.removeWhere((name, _) => cond(name));
}
- void forEach(void Function(String, Set<int>) fun) {
+ void forEach(void Function(String, IntSet) fun) {
_namedSets.forEach(fun);
}
@@ -653,7 +653,7 @@
Filtering a set of objects based on class/field or data:
filter <expr> $dslFilter
- dfilter <expr> [{<,<=,==,>=,>}len]* [content-pattern]*
+ dfilter <expr> [{<,<=,==,>=,>}NUM]* [content-pattern]*
Traversing to references or uses of the set of objects:
diff --git a/runtime/tools/heapsnapshot/lib/src/intset.dart b/runtime/tools/heapsnapshot/lib/src/intset.dart
new file mode 100644
index 0000000..5eb4932
--- /dev/null
+++ b/runtime/tools/heapsnapshot/lib/src/intset.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// The default set implementation is based on a Uint32List+List where both are
+// linear in the number of entries. That means we consume on 64-bit VMs at
+// least 12 bytes per entry.
+//
+// We should consider making a more memory efficient hash set implementation
+// that uses Int32List and utilizing the fact that we never store negative
+// numbers in it.
+typedef IntSet = Set<int>;
diff --git a/runtime/tools/heapsnapshot/pubspec.yaml b/runtime/tools/heapsnapshot/pubspec.yaml
index 46d3584..82e4ca6 100644
--- a/runtime/tools/heapsnapshot/pubspec.yaml
+++ b/runtime/tools/heapsnapshot/pubspec.yaml
@@ -7,7 +7,7 @@
publish_to: none
environment:
- sdk: '>=2.12.0 <3.0.0'
+ sdk: '>=2.15.0 <3.0.0'
dependencies:
args: ^2.0.0
diff --git a/runtime/tools/heapsnapshot/test/completion_test.dart b/runtime/tools/heapsnapshot/test/completion_test.dart
index d2d07d9..bd8bc76 100644
--- a/runtime/tools/heapsnapshot/test/completion_test.dart
+++ b/runtime/tools/heapsnapshot/test/completion_test.dart
@@ -12,7 +12,7 @@
class FakeAnalysis implements Analysis {
@override
- Set<int> get roots => <int>{1};
+ final IntSet roots = IntSet();
@override
dynamic noSuchMethod(Invocation i) {}
@@ -88,4 +88,33 @@
expect(complete('foo'), 'foobar');
});
});
+
+ group('cli-completion meta commands', () {
+ setUp(() {
+ cliState = CliState(CompletionCollector());
+ });
+
+ test('complete short-help', () {
+ expect(complete('h'), 'h');
+ });
+ test('complete long-help', () {
+ expect(complete('he'), 'help');
+ });
+ test('complete short-help-command', () {
+ expect(complete('h lo'), 'h load');
+ });
+ test('complete long-help-command', () {
+ expect(complete('help lo'), 'help load');
+ });
+
+ test('complete exit', () {
+ expect(complete('e'), 'exit');
+ });
+ test('complete short-quit', () {
+ expect(complete('q'), 'q');
+ });
+ test('complete long-quit', () {
+ expect(complete('qu'), 'quit');
+ });
+ });
}
diff --git a/runtime/tools/heapsnapshot/test/utils.dart b/runtime/tools/heapsnapshot/test/utils.dart
index 2bb6889..3461828 100644
--- a/runtime/tools/heapsnapshot/test/utils.dart
+++ b/runtime/tools/heapsnapshot/test/utils.dart
@@ -20,7 +20,7 @@
Future<String> start(List<String> args) async {
var script = Platform.script.toFilePath();
- if (script.endsWith('dart_2.dill')) {
+ if (RegExp('dart_([0-9]+).dill').hasMatch(script)) {
// We run via `dart test` and the `package:test` has wrapped the `main()`
// function. We don't want to invoke the wrapper as subprocess, but rather
// the actual file.
diff --git a/sdk/lib/_internal/vm/lib/errors_patch.dart b/sdk/lib/_internal/vm/lib/errors_patch.dart
index b26c1e5..cf11d3e 100644
--- a/sdk/lib/_internal/vm/lib/errors_patch.dart
+++ b/sdk/lib/_internal/vm/lib/errors_patch.dart
@@ -517,3 +517,33 @@
toString() => "Error: field '$_name' is already initialized.";
}
+
+// Implementations needed to implement the `_stackTrace` member added
+// in the @patch class of [Error].
+
+@patch
+class OutOfMemoryError {
+ StackTrace? get _stackTrace =>
+ throw UnsupportedError('OutOfMemoryError._stackTrace');
+ void set _stackTrace(StackTrace? _) {
+ throw UnsupportedError('OutOfMemoryError._stackTrace');
+ }
+}
+
+@patch
+class StackOverflowError {
+ StackTrace? get _stackTrace =>
+ throw UnsupportedError('StackOverflowError._stackTrace');
+ void set _stackTrace(StackTrace? _) {
+ throw UnsupportedError('StackOverflowError._stackTrace');
+ }
+}
+
+@patch
+class IntegerDivisionByZeroException {
+ StackTrace? get _stackTrace =>
+ throw UnsupportedError('IntegerDivisionByZeroException._stackTrace');
+ void set _stackTrace(StackTrace? _) {
+ throw UnsupportedError('IntegerDivisionByZeroException._stackTrace');
+ }
+}
diff --git a/sdk/lib/_internal/vm/lib/ffi_patch.dart b/sdk/lib/_internal/vm/lib/ffi_patch.dart
index bdc91d8..e134922 100644
--- a/sdk/lib/_internal/vm/lib/ffi_patch.dart
+++ b/sdk/lib/_internal/vm/lib/ffi_patch.dart
@@ -1076,3 +1076,49 @@
static Pointer<Void> get initializeApiDLData =>
Pointer.fromAddress(_initializeApiDLData());
}
+
+// Implementations needed to implement the private member added in the
+// patch class of [Array].
+
+@patch
+class _ArraySize<T extends NativeType> implements Array<T> {
+ _checkIndex(int index) => throw UnsupportedError('_ArraySize._checkIndex');
+
+ List<int> get _nestedDimensions =>
+ throw UnsupportedError('_ArraySize._nestedDimensions');
+
+ int get _nestedDimensionsFirst =>
+ throw UnsupportedError('_ArraySize._nestedDimensionsFirst');
+
+ int? get _nestedDimensionsFirstCache =>
+ throw UnsupportedError('_ArraySize._nestedDimensionsFirstCache');
+
+ void set _nestedDimensionsFirstCache(int? _) {
+ throw UnsupportedError('_ArraySize._nestedDimensionsFirstCache');
+ }
+
+ int get _nestedDimensionsFlattened =>
+ throw UnsupportedError('_ArraySize._nestedDimensionsFlattened');
+
+ int? get _nestedDimensionsFlattenedCache =>
+ throw UnsupportedError('_ArraySize._nestedDimensionsFlattenedCache');
+
+ void set _nestedDimensionsFlattenedCache(int? _) {
+ throw UnsupportedError('_ArraySize._nestedDimensionsFlattenedCache');
+ }
+
+ List<int> get _nestedDimensionsRest =>
+ throw UnsupportedError('_ArraySize._nestedDimensionsRest');
+
+ List<int>? get _nestedDimensionsRestCache =>
+ throw UnsupportedError('_ArraySize._nestedDimensionsRestCache');
+
+ void set _nestedDimensionsRestCache(List<int>? _) {
+ throw UnsupportedError('_ArraySize._nestedDimensionsRestCache');
+ }
+
+ int get _size => throw UnsupportedError('_ArraySize._size');
+
+ Object get _typedDataBase =>
+ throw UnsupportedError('_ArraySize._typedDataBase');
+}
diff --git a/sdk/lib/_internal/vm/lib/integers_patch.dart b/sdk/lib/_internal/vm/lib/integers_patch.dart
index bde90c0..4bc9bb9 100644
--- a/sdk/lib/_internal/vm/lib/integers_patch.dart
+++ b/sdk/lib/_internal/vm/lib/integers_patch.dart
@@ -12,7 +12,6 @@
external const factory int.fromEnvironment(String name,
{int defaultValue = 0});
- int _bitAndFromSmi(_Smi other);
int _bitAndFromInteger(int other);
int _bitOrFromInteger(int other);
int _bitXorFromInteger(int other);
diff --git a/sdk/lib/_internal/vm/lib/lib_prefix.dart b/sdk/lib/_internal/vm/lib/lib_prefix.dart
index d90dae6..1400eec 100644
--- a/sdk/lib/_internal/vm/lib/lib_prefix.dart
+++ b/sdk/lib/_internal/vm/lib/lib_prefix.dart
@@ -31,6 +31,14 @@
String toString() {
return "Deferred library $prefix was not loaded.";
}
+
+ // Implementations needed to implement the `_receiver` and `_invocation`
+ // members added in the @patch class of [NoSuchMethodError].
+
+ Object? get _receiver =>
+ throw UnsupportedError('_DeferredNotLoadedError._receiver');
+ Invocation get _invocation =>
+ throw UnsupportedError('_DeferredNotLoadedError._invocation');
}
@pragma("vm:entry-point")
diff --git a/sdk/lib/_internal/wasm/lib/errors_patch.dart b/sdk/lib/_internal/wasm/lib/errors_patch.dart
index c32a34f..5716680 100644
--- a/sdk/lib/_internal/wasm/lib/errors_patch.dart
+++ b/sdk/lib/_internal/wasm/lib/errors_patch.dart
@@ -167,3 +167,33 @@
throw new StateError(msg);
}
}
+
+// Implementations needed to implement the `_stackTrace` member added
+// in the @patch class of [Error].
+
+@patch
+class OutOfMemoryError {
+ StackTrace? get _stackTrace =>
+ throw UnsupportedError('OutOfMemoryError._stackTrace');
+ void set _stackTrace(StackTrace? _) {
+ throw UnsupportedError('OutOfMemoryError._stackTrace');
+ }
+}
+
+@patch
+class StackOverflowError {
+ StackTrace? get _stackTrace =>
+ throw UnsupportedError('StackOverflowError._stackTrace');
+ void set _stackTrace(StackTrace? _) {
+ throw UnsupportedError('StackOverflowError._stackTrace');
+ }
+}
+
+@patch
+class IntegerDivisionByZeroException {
+ StackTrace? get _stackTrace =>
+ throw UnsupportedError('IntegerDivisionByZeroException._stackTrace');
+ void set _stackTrace(StackTrace? _) {
+ throw UnsupportedError('IntegerDivisionByZeroException._stackTrace');
+ }
+}
diff --git a/sdk/lib/_internal/wasm/lib/integers_patch.dart b/sdk/lib/_internal/wasm/lib/integers_patch.dart
index bde90c0..98c3ee7 100644
--- a/sdk/lib/_internal/wasm/lib/integers_patch.dart
+++ b/sdk/lib/_internal/wasm/lib/integers_patch.dart
@@ -12,14 +12,6 @@
external const factory int.fromEnvironment(String name,
{int defaultValue = 0});
- int _bitAndFromSmi(_Smi other);
- int _bitAndFromInteger(int other);
- int _bitOrFromInteger(int other);
- int _bitXorFromInteger(int other);
- int _shlFromInteger(int other);
- int _shrFromInteger(int other);
- int _ushrFromInteger(int other);
-
static int? _tryParseSmi(String str, int first, int last) {
assert(first <= last);
var ix = first;
diff --git a/sdk/lib/core/core.dart b/sdk/lib/core/core.dart
index 324a84b..d1d4d7b 100644
--- a/sdk/lib/core/core.dart
+++ b/sdk/lib/core/core.dart
@@ -194,6 +194,7 @@
part "object.dart";
part "pattern.dart";
part "print.dart";
+part "record.dart";
part "regexp.dart";
part "set.dart";
part "sink.dart";
diff --git a/sdk/lib/core/core_sources.gni b/sdk/lib/core/core_sources.gni
index 12f70fb..994f55f 100644
--- a/sdk/lib/core/core_sources.gni
+++ b/sdk/lib/core/core_sources.gni
@@ -29,6 +29,7 @@
"object.dart",
"pattern.dart",
"print.dart",
+ "record.dart",
"regexp.dart",
"set.dart",
"sink.dart",
diff --git a/sdk/lib/core/record.dart b/sdk/lib/core/record.dart
new file mode 100644
index 0000000..aa48207
--- /dev/null
+++ b/sdk/lib/core/record.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of dart.core;
+
+/// The base class for all record types.
+///
+/// The run-time type of a record object is a record type, and as such, a
+/// subtype of [Record].
+abstract class Record {}
diff --git a/tests/co19/co19-kernel.status b/tests/co19/co19-kernel.status
index 93f5c98..1f01134 100644
--- a/tests/co19/co19-kernel.status
+++ b/tests/co19/co19-kernel.status
@@ -3,12 +3,12 @@
# BSD-style license that can be found in the LICENSE file.
[ $compiler == dart2wasm ]
-Language/Statements/Continue/async_loops_t07: Skip # https://github.com/dart-lang/sdk/issues/50026
-Language/Statements/Continue/async_loops_t08: Skip # https://github.com/dart-lang/sdk/issues/50026
-LibTest/async/Stream/Stream.fromFutures_all_t01: Skip # https://github.com/dart-lang/sdk/issues/50026
-LibTest/async/Stream/Stream.fromIterable_all_t01: Skip # https://github.com/dart-lang/sdk/issues/50026
-LibTest/async/StreamController/StreamController.broadcast_Stream_all_A01_t01: Skip # https://github.com/dart-lang/sdk/issues/50026
-LibTest/async/StreamController/stream_all_A01_t01: Skip # https://github.com/dart-lang/sdk/issues/50026
+Language/Statements/Continue/async_loops_t07: Skip # https://github.com/dart-lang/sdk/issues/50122
+Language/Statements/Continue/async_loops_t08: Skip # https://github.com/dart-lang/sdk/issues/50122
+LibTest/async/Stream/Stream.fromFutures_all_t01: Skip # https://github.com/dart-lang/sdk/issues/50122
+LibTest/async/Stream/Stream.fromIterable_all_t01: Skip # https://github.com/dart-lang/sdk/issues/50122
+LibTest/async/StreamController/StreamController.broadcast_Stream_all_A01_t01: Skip # https://github.com/dart-lang/sdk/issues/50122
+LibTest/async/StreamController/stream_all_A01_t01: Skip # https://github.com/dart-lang/sdk/issues/50122
[ $runtime == dart_precompiled ]
LibTest/io/RawDatagramSocket/join_A01_t01: Skip # https://github.com/dart-lang/co19/issues/195
diff --git a/tests/language_2/record_literal_problems_test.dart b/tests/language_2/record_literal_problems_test.dart
index 66da8f2..f089d7c 100644
--- a/tests/language_2/record_literal_problems_test.dart
+++ b/tests/language_2/record_literal_problems_test.dart
@@ -10,7 +10,7 @@
var r1 = const (42);
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
// ^
// [analyzer] SYNTACTIC_ERROR.RECORD_LITERAL_ONE_POSITIONAL_NO_TRAILING_COMMA
// [cfe] Record literal with one field requires a trailing comma.
@@ -18,7 +18,7 @@
var r2 = const ();
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
// ^
// [analyzer] SYNTACTIC_ERROR.RECORD_LITERAL_EMPTY
// [cfe] Record literal can't be empty.
diff --git a/tests/language_2/record_literal_test.dart b/tests/language_2/record_literal_test.dart
index 4441b55..f97d8da 100644
--- a/tests/language_2/record_literal_test.dart
+++ b/tests/language_2/record_literal_test.dart
@@ -10,54 +10,54 @@
var record1 = (1, 2, a: 3, b: 4);
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
print(record1);
// With ending comma.
var record2 = (42, 42, 42, );
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
print(record2);
var record3 = (foo: 42, bar: 42, 42, baz: 42, );
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
print(record3);
// Nested.
var record4 = ((42, 42), 42);
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
print(record4);
// With function inside.
var record5 = ((foo, bar) => 42, 42);
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
print(record5);
// 1 record entry with trailing comma.
var record6 = (42, );
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
print(record6);
// Const records.
var record7 = const (42, );
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
print(record7);
var record8 = const (42, foo: "bar");
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
print(record8);
}
diff --git a/tests/language_2/record_type_problems_test.dart b/tests/language_2/record_type_problems_test.dart
index 70d081f..a82a271 100644
--- a/tests/language_2/record_type_problems_test.dart
+++ b/tests/language_2/record_type_problems_test.dart
@@ -16,7 +16,7 @@
// [cfe] Record type named fields list can't be empty.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
(int /* missing trailing comma */ ) r2 = (1, );
//^
@@ -27,14 +27,15 @@
// [cfe] Record type with one entry requires a trailing comma.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
() emptyRecord = Record.empty;
//^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
// [cfe] This requires the experimental 'records' language feature to be enabled.
- // ^^^^^^
- // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
- // [cfe] Undefined name 'Record'.
+// ^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
+// ^
+// [cfe] Member not found: 'empty'.
print(emptyRecord);
}
diff --git a/tests/language_2/record_type_test.dart b/tests/language_2/record_type_test.dart
index e60f48f..edf5293 100644
--- a/tests/language_2/record_type_test.dart
+++ b/tests/language_2/record_type_test.dart
@@ -13,7 +13,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
print(record1);
(int x, int y) record1Named = (1, 2);
//^
@@ -21,7 +21,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
print(record1Named);
(int, int, ) record2 = (1, 2);
@@ -30,7 +30,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
print(record2);
(int x, int y, ) record2Named = (1, 2);
@@ -39,7 +39,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
print(record2Named);
(int, int, {int a, int b}) record3 = (1, 2, a: 3, b: 4);
@@ -48,7 +48,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
print(record3);
(int x, int y, {int a, int b}) record3Named = (1, 2, a: 3, b: 4);
@@ -57,7 +57,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
print(record3Named);
(int, int, {int a, int b, }) record4 = (1, 2, a: 3, b: 4);
@@ -66,7 +66,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
print(record4);
(int x, int y, {int a, int b, }) record4Named = (1, 2, a: 3, b: 4);
@@ -75,13 +75,13 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
print(record4Named);
print(foo((42, b: true), 42));
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
Bar b = new Bar();
print(b.foo(42));
@@ -97,7 +97,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
final (int x, int y) finalRecordType = (42, 42);
// ^
@@ -105,7 +105,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
List<(int, int)> listOfRecords = [];
// ^
@@ -123,7 +123,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
print(oneElementRecord);
({int ok}) oneElementNamedRecord = (ok: 1);
@@ -132,7 +132,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
print(oneElementNamedRecord);
}
@@ -143,7 +143,7 @@
return (42, t);
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
}
(int, T) f2<T>(T t) => (42, t);
@@ -152,7 +152,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
(int a, String b) get topLevelGetterType => throw '';
// [error column 1, length 1]
@@ -169,11 +169,11 @@
if (inputRecord.b) return (42, 42);
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
return (1, 1, );
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
}
class Bar {
@@ -183,7 +183,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
static (int x, int y) staticRecordType = (42, 42);
// ^
@@ -191,7 +191,7 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
(int a, String b) get instanceGetterType => throw '';
//^
@@ -210,7 +210,7 @@
return (42, t);
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
- // [cfe] This requires the experimental 'records' language feature to be enabled.
+ // [cfe] The 'records' language feature is disabled for this library.
}
(int, T) f2<T>(T t) => (42, t);
@@ -219,6 +219,6 @@
// [cfe] This requires the experimental 'records' language feature to be enabled.
// ^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-// [cfe] This requires the experimental 'records' language feature to be enabled.
+// [cfe] The 'records' language feature is disabled for this library.
}
diff --git a/tools/VERSION b/tools/VERSION
index 74e9a59..2c2d141 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 19
PATCH 0
-PRERELEASE 273
+PRERELEASE 274
PRERELEASE_PATCH 0