Version 2.18.0-56.0.dev
Merge commit '70256e540d0cddf41b8d8e9131253ba8f0f0331f' into 'dev'
diff --git a/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart b/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart
index 0a4424c..68f16e3 100644
--- a/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart
@@ -8,7 +8,7 @@
show FormalParameterKind, FormalParameterKindExtension;
import 'package:_fe_analyzer_shared/src/scanner/scanner.dart' show Token;
import 'package:kernel/ast.dart'
- show DartType, DynamicType, Expression, VariableDeclaration;
+ show DartType, DynamicType, Expression, NullLiteral, VariableDeclaration;
import '../constant_context.dart' show ConstantContext;
import '../kernel/body_builder.dart' show BodyBuilder;
@@ -219,23 +219,23 @@
/// formal parameter on a const constructor or instance method.
void buildOutlineExpressions(SourceLibraryBuilder library,
List<DelayedActionPerformer> delayedActionPerformers) {
- if (initializerToken != null) {
- // For modular compilation we need to include default values for optional
- // and named parameters in several cases:
- // * for const constructors to enable constant evaluation,
- // * for instance methods because these might be needed to generated
- // noSuchMethod forwarders, and
- // * for generative constructors to support forwarding constructors
- // in mixin applications.
- bool needsDefaultValues = false;
- if (parent is ConstructorBuilder) {
- needsDefaultValues = true;
- } else if (parent is SourceFactoryBuilder) {
- needsDefaultValues = parent!.isFactory && parent!.isConst;
- } else {
- needsDefaultValues = parent!.isClassInstanceMember;
- }
- if (needsDefaultValues) {
+ // For modular compilation we need to include default values for optional
+ // and named parameters in several cases:
+ // * for const constructors to enable constant evaluation,
+ // * for instance methods because these might be needed to generated
+ // noSuchMethod forwarders, and
+ // * for generative constructors to support forwarding constructors
+ // in mixin applications.
+ bool needsDefaultValues = false;
+ if (parent is ConstructorBuilder) {
+ needsDefaultValues = true;
+ } else if (parent is SourceFactoryBuilder) {
+ needsDefaultValues = parent!.isFactory && parent!.isConst;
+ } else {
+ needsDefaultValues = parent!.isClassInstanceMember;
+ }
+ if (needsDefaultValues) {
+ if (initializerToken != null) {
final ClassBuilder classBuilder = parent!.parent as ClassBuilder;
Scope scope = classBuilder.scope;
BodyBuilder bodyBuilder = library.loader
@@ -255,6 +255,9 @@
library.library);
initializerWasInferred = true;
bodyBuilder.performBacklogComputations(delayedActionPerformers);
+ } else if (kind != FormalParameterKind.requiredPositional) {
+ // As done by BodyBuilder.endFormalParameter.
+ variable!.initializer = new NullLiteral()..parent = variable;
}
}
initializerToken = null;
diff --git a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
index 2f58bb1..bd6983c 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
@@ -27,7 +27,8 @@
import 'package:kernel/src/const_canonical_type.dart';
import 'package:kernel/src/legacy_erasure.dart';
import 'package:kernel/src/norm.dart';
-import 'package:kernel/src/printer.dart' show AstPrinter, AstTextStrategy;
+import 'package:kernel/src/printer.dart'
+ show AstPrinter, AstTextStrategy, defaultAstTextStrategy;
import 'package:kernel/type_algebra.dart';
import 'package:kernel/type_environment.dart';
import 'package:kernel/target/targets.dart';
@@ -2539,8 +2540,8 @@
switch (op) {
case 'toString':
// Default value for toString() of instances.
- return new StringConstant(
- "Instance of '${receiver.classReference.toStringInternal()}'");
+ return new StringConstant("Instance of "
+ "'${receiver.classReference.toText(defaultAstTextStrategy)}'");
}
}
}
diff --git a/pkg/front_end/test/incremental_suite.dart b/pkg/front_end/test/incremental_suite.dart
index 84d3b6c..a8394f1 100644
--- a/pkg/front_end/test/incremental_suite.dart
+++ b/pkg/front_end/test/incremental_suite.dart
@@ -59,6 +59,13 @@
import 'package:kernel/class_hierarchy.dart'
show ClassHierarchy, ClosedWorldClassHierarchy, ForTestingClassInfo;
+import 'package:kernel/src/equivalence.dart'
+ show
+ EquivalenceResult,
+ EquivalenceStrategy,
+ EquivalenceVisitor,
+ checkEquivalence;
+
import 'package:kernel/target/targets.dart'
show
LateLowering,
@@ -110,6 +117,7 @@
const Expectation.fail("UnexpectedInitializationError");
const Expectation ReachableLibrariesError =
const Expectation.fail("ReachableLibrariesError");
+const Expectation EquivalenceError = const Expectation.fail("EquivalenceError");
const Expectation UriToSourceError = const Expectation.fail("UriToSourceError");
const Expectation MissingPlatformLibraries =
const Expectation.fail("MissingPlatformLibraries");
@@ -761,6 +769,16 @@
}
}
+ if (world["compareToPrevious"] == true && newestWholeComponent != null) {
+ EquivalenceResult result = checkEquivalence(
+ newestWholeComponent!, component!,
+ strategy: const Strategy());
+ if (!result.isEquivalent) {
+ return new Result<TestData>(
+ data, EquivalenceError, result.toString());
+ }
+ }
+
newestWholeComponentData = util.postProcess(component!);
newestWholeComponent = component;
String actualSerialized = componentToStringSdkFiltered(component!);
@@ -1135,6 +1153,31 @@
}
}
+class Strategy extends EquivalenceStrategy {
+ const Strategy();
+
+ @override
+ bool checkComponent_libraries(
+ EquivalenceVisitor visitor, Component node, Component other) {
+ return visitor.checkSets(node.libraries.toSet(), other.libraries.toSet(),
+ visitor.matchNamedNodes, visitor.checkNodes, 'libraries');
+ }
+
+ @override
+ bool checkClass_procedures(
+ EquivalenceVisitor visitor, Class node, Class other) {
+ // Check procedures as a set instead of a list to allow for reordering.
+ return visitor.checkSets(node.procedures.toSet(), other.procedures.toSet(),
+ visitor.matchNamedNodes, visitor.checkNodes, 'procedures');
+ }
+
+ @override
+ bool checkVariableDeclaration_binaryOffsetNoTag(EquivalenceVisitor visitor,
+ VariableDeclaration node, VariableDeclaration other) {
+ return true;
+ }
+}
+
Result? checkNNBDSettings(Component component) {
NonNullableByDefaultCompiledMode mode = component.mode;
if (mode == NonNullableByDefaultCompiledMode.Invalid) return null;
diff --git a/pkg/front_end/test/text_representation/empty_reference_test.dart b/pkg/front_end/test/text_representation/empty_reference_test.dart
index dd15aff..5d60dce 100644
--- a/pkg/front_end/test/text_representation/empty_reference_test.dart
+++ b/pkg/front_end/test/text_representation/empty_reference_test.dart
@@ -51,16 +51,16 @@
new TypedefType.byReference(rootReference, Nullability.nonNullable, []),
'<root>');
- CanonicalName library = root.getChild('library');
+ CanonicalName library = root.getChild('lib');
Reference libraryReference = new Reference()..canonicalName = library;
testType(
new InterfaceType.byReference(
libraryReference, Nullability.nonNullable, []),
- 'library');
+ 'library lib');
testType(
new TypedefType.byReference(
libraryReference, Nullability.nonNullable, []),
- 'library');
+ 'library lib');
CanonicalName className = library.getChild('Class');
Reference classNameReference = new Reference()..canonicalName = className;
@@ -68,12 +68,12 @@
new InterfaceType.byReference(
classNameReference, Nullability.nonNullable, []),
'Class',
- verbose: 'library::Class');
+ verbose: 'library lib::Class');
testType(
new TypedefType.byReference(
classNameReference, Nullability.nonNullable, []),
'Class',
- verbose: 'library::Class');
+ verbose: 'library lib::Class');
}
void testMembers() {
@@ -100,7 +100,7 @@
testExpression(new StaticGet.byReference(rootReference), '''
<root>''');
- CanonicalName library = root.getChild('library');
+ CanonicalName library = root.getChild('lib');
Reference libraryReference = new Reference()..canonicalName = library;
testExpression(
new InstanceGet.byReference(
@@ -110,9 +110,10 @@
'''
0.foo''');
testExpression(new StaticGet.byReference(libraryReference), '''
-library''');
+library lib''');
- CanonicalName topLevelMemberName = library.getChild('member');
+ CanonicalName topLevelMemberName =
+ library.getChild(CanonicalName.methodsName).getChild('member');
Reference topLevelMemberNameReference = new Reference()
..canonicalName = topLevelMemberName;
testExpression(
@@ -124,7 +125,7 @@
0.foo''');
testExpression(new StaticGet.byReference(topLevelMemberNameReference), '''
member''', verbose: '''
-library::member''');
+library lib::member''');
CanonicalName className = library.getChild('Class');
Reference classNameReference = new Reference()..canonicalName = className;
@@ -137,9 +138,10 @@
0.foo''');
testExpression(new StaticGet.byReference(classNameReference), '''
Class''', verbose: '''
-library::Class''');
+library lib::Class''');
- CanonicalName classMemberName = className.getChild('member');
+ CanonicalName classMemberName =
+ className.getChild(CanonicalName.methodsName).getChild('member');
Reference classMemberNameReference = new Reference()
..canonicalName = classMemberName;
testExpression(
@@ -151,5 +153,5 @@
0.foo''');
testExpression(new StaticGet.byReference(classMemberNameReference), '''
Class.member''', verbose: '''
-library::Class.member''');
+library lib::Class.member''');
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.outline.expect
index 7c7ba9c..822ba26 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.outline.expect
@@ -23,7 +23,7 @@
}
class Class4 extends core::Object {
final field core::int? field;
- constructor •([core::int? field]) → self::Class4
+ constructor •([core::int? field = null]) → self::Class4
;
static method _#new#tearOff([core::int? field]) → self::Class4
return new self::Class4::•(field);
@@ -31,7 +31,7 @@
class Class5 extends core::Object {
final field core::int field1;
final field core::int? field2;
- constructor •(core::int field1, [core::int? field2]) → self::Class5
+ constructor •(core::int field1, [core::int? field2 = null]) → self::Class5
;
static method _#new#tearOff(core::int field1, [core::int? field2]) → self::Class5
return new self::Class5::•(field1, field2);
@@ -40,7 +40,7 @@
final field core::int field1;
final field core::int? field2;
final field core::int field3;
- constructor •(core::int field1, {core::int? field2, required core::int field3}) → self::Class6
+ constructor •(core::int field1, {core::int? field2 = null, required core::int field3 = null}) → self::Class6
;
static method _#new#tearOff(core::int field1, {core::int? field2, required core::int field3}) → self::Class6
return new self::Class6::•(field1, field2: field2, field3: field3);
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.outline.expect
index daea2b6..830da60 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.outline.expect
@@ -35,7 +35,7 @@
}
class Class4 extends core::Object {
final field core::int? field;
- constructor _([core::int? field]) → self::Class4
+ constructor _([core::int? field = null]) → self::Class4
;
static method _#_#tearOff([core::int? field]) → self::Class4
return new self::Class4::_(field);
@@ -47,7 +47,7 @@
class Class5 extends core::Object {
final field core::int field1;
final field core::int? field2;
- constructor _(core::int field1, [core::int? field2]) → self::Class5
+ constructor _(core::int field1, [core::int? field2 = null]) → self::Class5
;
static method _#_#tearOff(core::int field1, [core::int? field2]) → self::Class5
return new self::Class5::_(field1, field2);
@@ -60,7 +60,7 @@
final field core::int field1;
final field core::int? field2;
final field core::int field3;
- constructor _(core::int field1, {core::int? field2, required core::int field3}) → self::Class6
+ constructor _(core::int field1, {core::int? field2 = null, required core::int field3 = null}) → self::Class6
;
static method _#_#tearOff(core::int field1, {core::int? field2, required core::int field3}) → self::Class6
return new self::Class6::_(field1, field2: field2, field3: field3);
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/redirecting_factory_tear_off.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/redirecting_factory_tear_off.dart.weak.outline.expect
index 146ad99..d38cf02 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/redirecting_factory_tear_off.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/redirecting_factory_tear_off.dart.weak.outline.expect
@@ -43,7 +43,7 @@
class Class4 extends core::Object {
final field core::int? field;
static final field dynamic _redirecting# = <dynamic>[self::Class4::•]/*isLegacy*/;
- constructor _([core::int? field]) → self::Class4
+ constructor _([core::int? field = null]) → self::Class4
;
static method _#_#tearOff([core::int? field]) → self::Class4
return new self::Class4::_(field);
@@ -56,7 +56,7 @@
final field core::int field1;
final field core::int? field2;
static final field dynamic _redirecting# = <dynamic>[self::Class5::•]/*isLegacy*/;
- constructor _(core::int field1, [core::int? field2]) → self::Class5
+ constructor _(core::int field1, [core::int? field2 = null]) → self::Class5
;
static method _#_#tearOff(core::int field1, [core::int? field2]) → self::Class5
return new self::Class5::_(field1, field2);
@@ -70,7 +70,7 @@
final field core::int? field2;
final field core::int field3;
static final field dynamic _redirecting# = <dynamic>[self::Class6::•]/*isLegacy*/;
- constructor _(core::int field1, {core::int? field2, required core::int field3}) → self::Class6
+ constructor _(core::int field1, {core::int? field2 = null, required core::int field3 = null}) → self::Class6
;
static method _#_#tearOff(core::int field1, {core::int? field2, required core::int field3}) → self::Class6
return new self::Class6::_(field1, field2: field2, field3: field3);
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from.dart.weak.outline.expect
index 451d45b..b5be0c4 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from.dart.weak.outline.expect
@@ -10,7 +10,7 @@
static final field dynamic _redirecting# = <dynamic>[self::Class::redirect]/*isLegacy*/;
constructor •(self::Class::S% a, self::Class::T% b) → self::Class<self::Class::S%, self::Class::T%>
;
- constructor named(self::Class::S% a, [self::Class::T? b, core::int c = 42]) → self::Class<self::Class::S%, self::Class::T%>
+ constructor named(self::Class::S% a, [self::Class::T? b = null, core::int c = 42]) → self::Class<self::Class::S%, self::Class::T%>
;
static method _#new#tearOff<S extends core::Object? = dynamic, T extends core::Object? = dynamic>(self::Class::_#new#tearOff::S% a, self::Class::_#new#tearOff::T% b) → self::Class<self::Class::_#new#tearOff::S%, self::Class::_#new#tearOff::T%>
return new self::Class::•<self::Class::_#new#tearOff::S%, self::Class::_#new#tearOff::T%>(a, b);
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.weak.modular.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.weak.modular.expect
index 53cbd09..b458764 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.weak.modular.expect
@@ -74,7 +74,7 @@
return mai::A::_#redirect#tearOff<self::_#H#redirect#tearOff::Y%>();
static method /* from org-dartlang-testcase:///main_lib.dart */ _#H#new#tearOff<unrelated X extends core::Object? = dynamic, Y extends core::Object? = dynamic>() → mai::A<self::_#H#new#tearOff::Y%>
return new mai::A::•<self::_#H#new#tearOff::Y%>();
-static method /* from org-dartlang-testcase:///main_lib.dart */ _#H#named#tearOff<unrelated X extends core::Object? = dynamic, Y extends core::Object? = dynamic>(self::_#H#named#tearOff::Y% a, [core::int? b]) → mai::A<self::_#H#named#tearOff::Y%>
+static method /* from org-dartlang-testcase:///main_lib.dart */ _#H#named#tearOff<unrelated X extends core::Object? = dynamic, Y extends core::Object? = dynamic>(self::_#H#named#tearOff::Y% a, [core::int? b = #C9]) → mai::A<self::_#H#named#tearOff::Y%>
return new mai::A::named<self::_#H#named#tearOff::Y%>(a, b);
constants {
@@ -86,4 +86,5 @@
#C6 = static-tearoff mai::_#F#named#tearOff
#C7 = static-tearoff mai::_#F#fact#tearOff
#C8 = static-tearoff mai::_#F#redirect#tearOff
+ #C9 = null
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.weak.outline.expect
index fdfd1c3..829a8ce 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.weak.outline.expect
@@ -37,7 +37,7 @@
static final field dynamic _redirecting# = <dynamic>[#C1]/*isLegacy*/;
constructor •() → mai::A<mai::A::T%>
;
- constructor named(mai::A::T% a, [core::int? b]) → mai::A<mai::A::T%>
+ constructor named(mai::A::T% a, [core::int? b = #C2]) → mai::A<mai::A::T%>
;
static method _#new#tearOff<T extends core::Object? = dynamic>() → mai::A<mai::A::_#new#tearOff::T%>
return new mai::A::•<mai::A::_#new#tearOff::T%>();
@@ -79,4 +79,5 @@
constants {
#C1 = constructor-tearoff mai::A::redirect
+ #C2 = null
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_identical.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_identical.dart.weak.outline.expect
index 26c6cb7..6a47350 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_identical.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_identical.dart.weak.outline.expect
@@ -37,7 +37,7 @@
static final field dynamic _redirecting# = <dynamic>[typ::A::redirect]/*isLegacy*/;
constructor •() → typ::A<typ::A::T%>
;
- constructor named(typ::A::T% a, [core::int? b]) → typ::A<typ::A::T%>
+ constructor named(typ::A::T% a, [core::int? b = null]) → typ::A<typ::A::T%>
;
static method _#new#tearOff<T extends core::Object? = dynamic>() → typ::A<typ::A::_#new#tearOff::T%>
return new typ::A::•<typ::A::_#new#tearOff::T%>();
diff --git a/pkg/front_end/testcases/constructor_tearoffs/redirecting_factory_tear_off.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/redirecting_factory_tear_off.dart.weak.outline.expect
index bae6873..23dbb32 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/redirecting_factory_tear_off.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/redirecting_factory_tear_off.dart.weak.outline.expect
@@ -29,7 +29,7 @@
class Class4 extends core::Object {
final field core::int? field;
static final field dynamic _redirecting# = <dynamic>[self::Class4::•]/*isLegacy*/;
- constructor _([core::int? field]) → self::Class4
+ constructor _([core::int? field = null]) → self::Class4
;
static factory •([core::int? field]) → self::Class4
return new self::Class4::_(field);
@@ -38,7 +38,7 @@
final field core::int field1;
final field core::int? field2;
static final field dynamic _redirecting# = <dynamic>[self::Class5::•]/*isLegacy*/;
- constructor _(core::int field1, [core::int? field2]) → self::Class5
+ constructor _(core::int field1, [core::int? field2 = null]) → self::Class5
;
static factory •(core::int field1, [core::int? field2]) → self::Class5
return new self::Class5::_(field1, field2);
@@ -48,7 +48,7 @@
final field core::int? field2;
final field core::int field3;
static final field dynamic _redirecting# = <dynamic>[self::Class6::•]/*isLegacy*/;
- constructor _(core::int field1, {core::int? field2, required core::int field3}) → self::Class6
+ constructor _(core::int field1, {core::int? field2 = null, required core::int field3 = null}) → self::Class6
;
static factory •(core::int field1, {core::int? field2, required core::int field3}) → self::Class6
return new self::Class6::_(field1, field2: field2, field3: field3);
diff --git a/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.weak.outline.expect b/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.weak.outline.expect
index 927a4e3..839811b 100644
--- a/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.weak.outline.expect
@@ -8,7 +8,7 @@
final field core::int bar;
static const field self::E0 one = const self::E0::•(0, "one", 1, bar: 1);
static const field self::E0 two = const self::E0::•(1, "two", 2, bar: 2);
- const constructor •(core::int index, core::String name, core::int foo, {required core::int bar}) → self::E0
+ const constructor •(core::int index, core::String name, core::int foo, {required core::int bar = null}) → self::E0
: self::E0::foo = foo, self::E0::bar = bar, super core::_Enum::•(index, name)
;
method toString() → core::String
@@ -19,7 +19,7 @@
final field self::E1::X% foo;
static const field self::E1<core::String> one = const self::E1::•<core::String>(0, "one", foo: "1");
static const field self::E1<core::int> two = const self::E1::•<core::int>(1, "two", foo: 2);
- const constructor •(core::int index, core::String name, {required self::E1::X% foo}) → self::E1<self::E1::X%>
+ const constructor •(core::int index, core::String name, {required self::E1::X% foo = null}) → self::E1<self::E1::X%>
: self::E1::foo = foo, super core::_Enum::•(index, name)
;
method toString() → core::String
@@ -33,7 +33,7 @@
static const field self::E2<core::int, core::String, core::double> one = const self::E2::•<core::int, core::String, core::double>(0, "one", 1, bar: "1", baz: 3.14);
static const field self::E2<core::String, core::int, core::double> two = const self::E2::•<core::String, core::int, core::double>(1, "two", "2", baz: 3.14, bar: 2);
static const field self::E2<core::double, core::bool, dynamic> three = const self::E2::•<core::double, core::bool, dynamic>(2, "three", 3.0, bar: false);
- const constructor •(core::int index, core::String name, self::E2::X% foo, {required self::E2::Y% bar, has-declared-initializer self::E2::Z? baz = null}) → self::E2<self::E2::X%, self::E2::Y%, self::E2::Z%>
+ const constructor •(core::int index, core::String name, self::E2::X% foo, {required self::E2::Y% bar = null, has-declared-initializer self::E2::Z? baz = null}) → self::E2<self::E2::X%, self::E2::Y%, self::E2::Z%>
: self::E2::foo = foo, self::E2::bar = bar, self::E2::baz = baz, super core::_Enum::•(index, name)
;
method toString() → core::String
diff --git a/pkg/front_end/testcases/general/abstract_overrides_concrete.dart.weak.outline.expect b/pkg/front_end/testcases/general/abstract_overrides_concrete.dart.weak.outline.expect
index 670f664..9119e8f 100644
--- a/pkg/front_end/testcases/general/abstract_overrides_concrete.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/abstract_overrides_concrete.dart.weak.outline.expect
@@ -44,12 +44,12 @@
abstract class I extends core::Object {
synthetic constructor •() → self::I
;
- abstract method foo([dynamic a]) → void;
+ abstract method foo([dynamic a = null]) → void;
}
abstract class B extends self::A {
synthetic constructor •() → self::B
;
- abstract method foo([dynamic a]) → void;
+ abstract method foo([dynamic a = null]) → void;
}
class C extends self::B {
synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/general/annotation_variable_declaration.dart.weak.outline.expect b/pkg/front_end/testcases/general/annotation_variable_declaration.dart.weak.outline.expect
index 2ca5306..8bd0275 100644
--- a/pkg/front_end/testcases/general/annotation_variable_declaration.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/annotation_variable_declaration.dart.weak.outline.expect
@@ -16,9 +16,9 @@
;
static factory bazFactory(dynamic factoryFormal) → self::Baz
;
- method fisk(dynamic formal1, dynamic formal2, dynamic formal3, dynamic formal4, [dynamic optional]) → dynamic
+ method fisk(dynamic formal1, dynamic formal2, dynamic formal3, dynamic formal4, [dynamic optional = null]) → dynamic
;
- method hest({dynamic named}) → dynamic
+ method hest({dynamic named = null}) → dynamic
;
}
static const field core::int foo = 42;
diff --git a/pkg/front_end/testcases/general/async_nested.dart.weak.outline.expect b/pkg/front_end/testcases/general/async_nested.dart.weak.outline.expect
index 60f8e3e..39e35eb 100644
--- a/pkg/front_end/testcases/general/async_nested.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/async_nested.dart.weak.outline.expect
@@ -7,7 +7,7 @@
class Node extends core::Object {
final field core::List<self::Node>? nested;
final field core::String name;
- constructor •(core::String name, [core::List<self::Node>? nested]) → self::Node
+ constructor •(core::String name, [core::List<self::Node>? nested = null]) → self::Node
;
method toString() → core::String
;
diff --git a/pkg/front_end/testcases/general/bug32426.dart.weak.outline.expect b/pkg/front_end/testcases/general/bug32426.dart.weak.outline.expect
index 4da5082..1f233dd 100644
--- a/pkg/front_end/testcases/general/bug32426.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/bug32426.dart.weak.outline.expect
@@ -20,7 +20,7 @@
class C extends core::Object implements self::I {
synthetic constructor •() → self::C*
;
- method call([core::int* x]) → void
+ method call([core::int* x = null]) → void
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/constants/const_collections.dart.weak.outline.expect b/pkg/front_end/testcases/general/constants/const_collections.dart.weak.outline.expect
index d73794e..c83eee4 100644
--- a/pkg/front_end/testcases/general/constants/const_collections.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/constants/const_collections.dart.weak.outline.expect
@@ -125,7 +125,7 @@
@core::override
method removeWhere((core::String, core::String) → core::bool predicate) → void
;
- method update(covariant-by-class core::String key, covariant-by-class (core::String) → core::String update, {covariant-by-class () →? core::String ifAbsent}) → core::String
+ method update(covariant-by-class core::String key, covariant-by-class (core::String) → core::String update, {covariant-by-class () →? core::String ifAbsent = null}) → core::String
;
method map<K2 extends core::Object? = dynamic, V2 extends core::Object? = dynamic>((core::String, core::String) → core::MapEntry<self::CustomMap::map::K2%, self::CustomMap::map::V2%> f) → core::Map<self::CustomMap::map::K2%, self::CustomMap::map::V2%>
;
diff --git a/pkg/front_end/testcases/general/forwarding_semi_stub.dart.weak.outline.expect b/pkg/front_end/testcases/general/forwarding_semi_stub.dart.weak.outline.expect
index 413db05..d738bdb 100644
--- a/pkg/front_end/testcases/general/forwarding_semi_stub.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/forwarding_semi_stub.dart.weak.outline.expect
@@ -7,27 +7,27 @@
;
method method1(core::int a) → void
;
- method method2({core::int? a}) → void
+ method method2({core::int? a = null}) → void
;
method method3(core::int a) → void
;
method method4(core::num a) → void
;
- method method5({core::int? a}) → void
+ method method5({core::int? a = null}) → void
;
- method method6({core::num? a}) → void
+ method method6({core::num? a = null}) → void
;
method method7(covariant-by-class core::List<self::Super::T%> a) → void
;
- method method8({covariant-by-class core::List<self::Super::T%>? a}) → void
+ method method8({covariant-by-class core::List<self::Super::T%>? a = null}) → void
;
method method9(covariant-by-class core::List<self::Super::T%> a) → void
;
method method10(covariant-by-class core::Iterable<self::Super::T%> a) → void
;
- method method11({covariant-by-class core::List<self::Super::T%>? a}) → void
+ method method11({covariant-by-class core::List<self::Super::T%>? a = null}) → void
;
- method method12({covariant-by-class core::Iterable<self::Super::T%>? a}) → void
+ method method12({covariant-by-class core::Iterable<self::Super::T%>? a = null}) → void
;
set setter1(core::int a) → void
;
@@ -43,11 +43,11 @@
;
method method1(covariant-by-declaration core::num a) → void
;
- method method2({covariant-by-declaration core::num? a}) → void
+ method method2({covariant-by-declaration core::num? a = null}) → void
;
method method7(covariant-by-declaration covariant-by-class core::Iterable<self::Interface::T%> a) → void
;
- method method8({covariant-by-declaration covariant-by-class core::Iterable<self::Interface::T%>? a}) → void
+ method method8({covariant-by-declaration covariant-by-class core::Iterable<self::Interface::T%>? a = null}) → void
;
set setter1(covariant-by-declaration core::num a) → void
;
@@ -61,17 +61,17 @@
return super.{self::Super::method3}(a);
forwarding-stub forwarding-semi-stub method /* signature-type: (core::int) → void */ method4(covariant-by-declaration core::num a) → void
return super.{self::Super::method4}(a);
- forwarding-stub forwarding-semi-stub method /* signature-type: ({a: core::num?}) → void */ method5({covariant-by-declaration core::int? a}) → void
+ forwarding-stub forwarding-semi-stub method /* signature-type: ({a: core::num?}) → void */ method5({covariant-by-declaration core::int? a = null}) → void
return super.{self::Super::method5}(a: a);
- forwarding-stub forwarding-semi-stub method /* signature-type: ({a: core::int?}) → void */ method6({covariant-by-declaration core::num? a}) → void
+ forwarding-stub forwarding-semi-stub method /* signature-type: ({a: core::int?}) → void */ method6({covariant-by-declaration core::num? a = null}) → void
return super.{self::Super::method6}(a: a);
forwarding-stub forwarding-semi-stub method /* signature-type: (core::Iterable<self::Class::T%>) → void */ method9(covariant-by-declaration covariant-by-class core::List<self::Class::T%> a) → void
return super.{self::Super::method9}(a);
forwarding-stub forwarding-semi-stub method /* signature-type: (core::List<self::Class::T%>) → void */ method10(covariant-by-declaration covariant-by-class core::Iterable<self::Class::T%> a) → void
return super.{self::Super::method10}(a);
- forwarding-stub forwarding-semi-stub method /* signature-type: ({a: core::Iterable<self::Class::T%>?}) → void */ method11({covariant-by-declaration covariant-by-class core::List<self::Class::T%>? a}) → void
+ forwarding-stub forwarding-semi-stub method /* signature-type: ({a: core::Iterable<self::Class::T%>?}) → void */ method11({covariant-by-declaration covariant-by-class core::List<self::Class::T%>? a = null}) → void
return super.{self::Super::method11}(a: a);
- forwarding-stub forwarding-semi-stub method /* signature-type: ({a: core::List<self::Class::T%>?}) → void */ method12({covariant-by-declaration covariant-by-class core::Iterable<self::Class::T%>? a}) → void
+ forwarding-stub forwarding-semi-stub method /* signature-type: ({a: core::List<self::Class::T%>?}) → void */ method12({covariant-by-declaration covariant-by-class core::Iterable<self::Class::T%>? a = null}) → void
return super.{self::Super::method12}(a: a);
forwarding-stub forwarding-semi-stub set /* signature-type: (core::int) → void */ setter2(covariant-by-declaration core::num a) → void
return super.{self::Super::setter2} = a;
@@ -95,27 +95,27 @@
;
method method1(covariant-by-declaration core::num a) → void
;
- method method2({covariant-by-declaration core::num? a}) → void
+ method method2({covariant-by-declaration core::num? a = null}) → void
;
method method3(covariant-by-declaration core::num a) → void
;
method method4(covariant-by-declaration core::num a) → void
;
- method method5({covariant-by-declaration core::num? a}) → void
+ method method5({covariant-by-declaration core::num? a = null}) → void
;
- method method6({covariant-by-declaration core::num? a}) → void
+ method method6({covariant-by-declaration core::num? a = null}) → void
;
method method7(covariant-by-declaration covariant-by-class core::Iterable<self::Subclass::T%> a) → void
;
- method method8({covariant-by-declaration covariant-by-class core::Iterable<self::Subclass::T%>? a}) → void
+ method method8({covariant-by-declaration covariant-by-class core::Iterable<self::Subclass::T%>? a = null}) → void
;
method method9(covariant-by-declaration covariant-by-class core::Iterable<self::Subclass::T%> a) → void
;
method method10(covariant-by-declaration covariant-by-class core::Iterable<self::Subclass::T%> a) → void
;
- method method11({covariant-by-declaration covariant-by-class core::Iterable<self::Subclass::T%>? a}) → void
+ method method11({covariant-by-declaration covariant-by-class core::Iterable<self::Subclass::T%>? a = null}) → void
;
- method method12({covariant-by-declaration covariant-by-class core::Iterable<self::Subclass::T%>? a}) → void
+ method method12({covariant-by-declaration covariant-by-class core::Iterable<self::Subclass::T%>? a = null}) → void
;
set setter1(covariant-by-declaration core::num a) → void
;
diff --git a/pkg/front_end/testcases/general/implement_semi_stub.dart.weak.outline.expect b/pkg/front_end/testcases/general/implement_semi_stub.dart.weak.outline.expect
index a5176a6..4e28f66 100644
--- a/pkg/front_end/testcases/general/implement_semi_stub.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/implement_semi_stub.dart.weak.outline.expect
@@ -140,9 +140,9 @@
;
method method3(core::num a, core::int b) → void
;
- method method4({required core::num a}) → void
+ method method4({required core::num a = null}) → void
;
- method method5({required core::int b}) → void
+ method method5({required core::int b = null}) → void
;
method method7(covariant-by-class core::Iterable<self::Super::T%> a) → void
;
@@ -150,9 +150,9 @@
;
method method9(covariant-by-class core::Iterable<self::Super::T%> a, covariant-by-class core::List<self::Super::T%> b) → void
;
- method method10({required covariant-by-class core::Iterable<self::Super::T%> a}) → void
+ method method10({required covariant-by-class core::Iterable<self::Super::T%> a = null}) → void
;
- method method11({required covariant-by-class core::List<self::Super::T%> b}) → void
+ method method11({required covariant-by-class core::List<self::Super::T%> b = null}) → void
;
set setter1(core::num a) → void
;
@@ -166,13 +166,13 @@
;
method method3(core::num a, covariant-by-declaration core::num b) → void
;
- method method5({required core::int b}) → void
+ method method5({required core::int b = null}) → void
;
method method8(covariant-by-declaration covariant-by-class core::Iterable<self::Interface::T%> b) → void
;
method method9(covariant-by-class core::Iterable<self::Interface::T%> a, covariant-by-declaration covariant-by-class core::Iterable<self::Interface::T%> b) → void
;
- method method11({required covariant-by-class core::List<self::Interface::T%> b}) → void
+ method method11({required covariant-by-class core::List<self::Interface::T%> b = null}) → void
;
}
class Class<T extends core::Object? = dynamic> extends self::Super<self::Class::T%> implements self::Interface<self::Class::T%> {
@@ -204,9 +204,9 @@
;
method method3(covariant-by-declaration core::double a, covariant-by-declaration core::double b) → void
;
- method method4({required core::double a}) → void
+ method method4({required core::double a = null}) → void
;
- method method5({required core::double b}) → void
+ method method5({required core::double b = null}) → void
;
method method7(covariant-by-declaration covariant-by-class core::Set<self::Class1::T%> a) → void
;
@@ -214,9 +214,9 @@
;
method method9(covariant-by-declaration covariant-by-class core::Set<self::Class1::T%> a, covariant-by-declaration covariant-by-class core::Set<self::Class1::T%> b) → void
;
- method method10({required covariant-by-class core::Set<self::Class1::T%> a}) → void
+ method method10({required covariant-by-class core::Set<self::Class1::T%> a = null}) → void
;
- method method11({required covariant-by-class core::Set<self::Class1::T%> b}) → void
+ method method11({required covariant-by-class core::Set<self::Class1::T%> b = null}) → void
;
set setter1(covariant-by-declaration core::double a) → void
;
diff --git a/pkg/front_end/testcases/general/implicit_super_call.dart.weak.outline.expect b/pkg/front_end/testcases/general/implicit_super_call.dart.weak.outline.expect
index 3f03f7a..9ec5019 100644
--- a/pkg/front_end/testcases/general/implicit_super_call.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/implicit_super_call.dart.weak.outline.expect
@@ -17,7 +17,7 @@
class Super2 extends core::Object {
synthetic constructor •() → self::Super2
;
- method call(core::int a, [core::int? b]) → core::int
+ method call(core::int a, [core::int? b = null]) → core::int
;
}
class Class2 extends self::Super2 {
@@ -29,7 +29,7 @@
class Super3 extends core::Object {
synthetic constructor •() → self::Super3
;
- method call(core::int a, {core::int? b, core::int? c}) → core::int
+ method call(core::int a, {core::int? b = null, core::int? c = null}) → core::int
;
}
class Class3 extends self::Super3 {
diff --git a/pkg/front_end/testcases/general/invalid_operator.dart.weak.outline.expect b/pkg/front_end/testcases/general/invalid_operator.dart.weak.outline.expect
index 839e7f4..92c304b 100644
--- a/pkg/front_end/testcases/general/invalid_operator.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/invalid_operator.dart.weak.outline.expect
@@ -686,167 +686,167 @@
;
operator ==([core::Object a = 0]) → core::bool
;
- operator <([dynamic a]) → dynamic
+ operator <([dynamic a = null]) → dynamic
;
- operator >([dynamic a]) → dynamic
+ operator >([dynamic a = null]) → dynamic
;
- operator <=([dynamic a]) → dynamic
+ operator <=([dynamic a = null]) → dynamic
;
- operator >=([dynamic a]) → dynamic
+ operator >=([dynamic a = null]) → dynamic
;
- operator -([dynamic a]) → dynamic
+ operator -([dynamic a = null]) → dynamic
;
- operator +([dynamic a]) → dynamic
+ operator +([dynamic a = null]) → dynamic
;
- operator /([dynamic a]) → dynamic
+ operator /([dynamic a = null]) → dynamic
;
- operator ~/([dynamic a]) → dynamic
+ operator ~/([dynamic a = null]) → dynamic
;
- operator *([dynamic a]) → dynamic
+ operator *([dynamic a = null]) → dynamic
;
- operator %([dynamic a]) → dynamic
+ operator %([dynamic a = null]) → dynamic
;
- operator |([dynamic a]) → dynamic
+ operator |([dynamic a = null]) → dynamic
;
- operator ^([dynamic a]) → dynamic
+ operator ^([dynamic a = null]) → dynamic
;
- operator &([dynamic a]) → dynamic
+ operator &([dynamic a = null]) → dynamic
;
- operator <<([dynamic a]) → dynamic
+ operator <<([dynamic a = null]) → dynamic
;
- operator >>([dynamic a]) → dynamic
+ operator >>([dynamic a = null]) → dynamic
;
- operator []=([dynamic a, dynamic b]) → void
+ operator []=([dynamic a = null, dynamic b = null]) → void
;
- operator []([dynamic a]) → dynamic
+ operator []([dynamic a = null]) → dynamic
;
- operator ~([dynamic a]) → dynamic
+ operator ~([dynamic a = null]) → dynamic
;
}
class Operators4 extends core::Object {
synthetic constructor •() → self::Operators4
;
- operator ==({dynamic a}) → core::bool
+ operator ==({dynamic a = null}) → core::bool
;
- operator <({dynamic a}) → dynamic
+ operator <({dynamic a = null}) → dynamic
;
- operator >({dynamic a}) → dynamic
+ operator >({dynamic a = null}) → dynamic
;
- operator <=({dynamic a}) → dynamic
+ operator <=({dynamic a = null}) → dynamic
;
- operator >=({dynamic a}) → dynamic
+ operator >=({dynamic a = null}) → dynamic
;
- operator -({dynamic a}) → dynamic
+ operator -({dynamic a = null}) → dynamic
;
- operator +({dynamic a}) → dynamic
+ operator +({dynamic a = null}) → dynamic
;
- operator /({dynamic a}) → dynamic
+ operator /({dynamic a = null}) → dynamic
;
- operator ~/({dynamic a}) → dynamic
+ operator ~/({dynamic a = null}) → dynamic
;
- operator *({dynamic a}) → dynamic
+ operator *({dynamic a = null}) → dynamic
;
- operator %({dynamic a}) → dynamic
+ operator %({dynamic a = null}) → dynamic
;
- operator |({dynamic a}) → dynamic
+ operator |({dynamic a = null}) → dynamic
;
- operator ^({dynamic a}) → dynamic
+ operator ^({dynamic a = null}) → dynamic
;
- operator &({dynamic a}) → dynamic
+ operator &({dynamic a = null}) → dynamic
;
- operator <<({dynamic a}) → dynamic
+ operator <<({dynamic a = null}) → dynamic
;
- operator >>({dynamic a}) → dynamic
+ operator >>({dynamic a = null}) → dynamic
;
- operator []=({dynamic a, dynamic b}) → void
+ operator []=({dynamic a = null, dynamic b = null}) → void
;
- operator []({dynamic a}) → dynamic
+ operator []({dynamic a = null}) → dynamic
;
- operator ~({dynamic a}) → dynamic
+ operator ~({dynamic a = null}) → dynamic
;
}
class Operators5 extends core::Object {
synthetic constructor •() → self::Operators5
;
- operator ==(core::Object a, [dynamic b]) → core::bool
+ operator ==(core::Object a, [dynamic b = null]) → core::bool
;
- operator <(dynamic a, [dynamic b]) → dynamic
+ operator <(dynamic a, [dynamic b = null]) → dynamic
;
- operator >(dynamic a, [dynamic b]) → dynamic
+ operator >(dynamic a, [dynamic b = null]) → dynamic
;
- operator <=(dynamic a, [dynamic b]) → dynamic
+ operator <=(dynamic a, [dynamic b = null]) → dynamic
;
- operator >=(dynamic a, [dynamic b]) → dynamic
+ operator >=(dynamic a, [dynamic b = null]) → dynamic
;
- operator -(dynamic a, [dynamic b]) → dynamic
+ operator -(dynamic a, [dynamic b = null]) → dynamic
;
- operator +(dynamic a, [dynamic b]) → dynamic
+ operator +(dynamic a, [dynamic b = null]) → dynamic
;
- operator /(dynamic a, [dynamic b]) → dynamic
+ operator /(dynamic a, [dynamic b = null]) → dynamic
;
- operator ~/(dynamic a, [dynamic b]) → dynamic
+ operator ~/(dynamic a, [dynamic b = null]) → dynamic
;
- operator *(dynamic a, [dynamic b]) → dynamic
+ operator *(dynamic a, [dynamic b = null]) → dynamic
;
- operator %(dynamic a, [dynamic b]) → dynamic
+ operator %(dynamic a, [dynamic b = null]) → dynamic
;
- operator |(dynamic a, [dynamic b]) → dynamic
+ operator |(dynamic a, [dynamic b = null]) → dynamic
;
- operator ^(dynamic a, [dynamic b]) → dynamic
+ operator ^(dynamic a, [dynamic b = null]) → dynamic
;
- operator &(dynamic a, [dynamic b]) → dynamic
+ operator &(dynamic a, [dynamic b = null]) → dynamic
;
- operator <<(dynamic a, [dynamic b]) → dynamic
+ operator <<(dynamic a, [dynamic b = null]) → dynamic
;
- operator >>(dynamic a, [dynamic b]) → dynamic
+ operator >>(dynamic a, [dynamic b = null]) → dynamic
;
- operator []=(dynamic a, dynamic b, [dynamic c]) → void
+ operator []=(dynamic a, dynamic b, [dynamic c = null]) → void
;
- operator [](dynamic a, [dynamic b]) → dynamic
+ operator [](dynamic a, [dynamic b = null]) → dynamic
;
- operator ~(dynamic a, [dynamic b]) → dynamic
+ operator ~(dynamic a, [dynamic b = null]) → dynamic
;
}
class Operators6 extends core::Object {
synthetic constructor •() → self::Operators6
;
- operator ==(core::Object a, {dynamic b}) → core::bool
+ operator ==(core::Object a, {dynamic b = null}) → core::bool
;
- operator <(dynamic a, {dynamic b}) → dynamic
+ operator <(dynamic a, {dynamic b = null}) → dynamic
;
- operator >(dynamic a, {dynamic b}) → dynamic
+ operator >(dynamic a, {dynamic b = null}) → dynamic
;
- operator <=(dynamic a, {dynamic b}) → dynamic
+ operator <=(dynamic a, {dynamic b = null}) → dynamic
;
- operator >=(dynamic a, {dynamic b}) → dynamic
+ operator >=(dynamic a, {dynamic b = null}) → dynamic
;
- operator -(dynamic a, {dynamic b}) → dynamic
+ operator -(dynamic a, {dynamic b = null}) → dynamic
;
- operator +(dynamic a, {dynamic b}) → dynamic
+ operator +(dynamic a, {dynamic b = null}) → dynamic
;
- operator /(dynamic a, {dynamic b}) → dynamic
+ operator /(dynamic a, {dynamic b = null}) → dynamic
;
- operator ~/(dynamic a, {dynamic b}) → dynamic
+ operator ~/(dynamic a, {dynamic b = null}) → dynamic
;
- operator *(dynamic a, {dynamic b}) → dynamic
+ operator *(dynamic a, {dynamic b = null}) → dynamic
;
- operator %(dynamic a, {dynamic b}) → dynamic
+ operator %(dynamic a, {dynamic b = null}) → dynamic
;
- operator |(dynamic a, {dynamic b}) → dynamic
+ operator |(dynamic a, {dynamic b = null}) → dynamic
;
- operator ^(dynamic a, {dynamic b}) → dynamic
+ operator ^(dynamic a, {dynamic b = null}) → dynamic
;
- operator &(dynamic a, {dynamic b}) → dynamic
+ operator &(dynamic a, {dynamic b = null}) → dynamic
;
- operator <<(dynamic a, {dynamic b}) → dynamic
+ operator <<(dynamic a, {dynamic b = null}) → dynamic
;
- operator >>(dynamic a, {dynamic b}) → dynamic
+ operator >>(dynamic a, {dynamic b = null}) → dynamic
;
- operator []=(dynamic a, dynamic b, {dynamic c}) → void
+ operator []=(dynamic a, dynamic b, {dynamic c = null}) → void
;
- operator [](dynamic a, {dynamic b}) → dynamic
+ operator [](dynamic a, {dynamic b = null}) → dynamic
;
- operator ~(dynamic a, {dynamic b}) → dynamic
+ operator ~(dynamic a, {dynamic b = null}) → dynamic
;
}
class Operators7 extends core::Object {
diff --git a/pkg/front_end/testcases/general/issue42615.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue42615.dart.weak.outline.expect
index 1cd32a4..d0547dd 100644
--- a/pkg/front_end/testcases/general/issue42615.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue42615.dart.weak.outline.expect
@@ -5,7 +5,7 @@
import "dart:async";
class Class<T extends core::Object* = dynamic> extends core::Object {
- constructor •({() →* FutureOr<core::List<self::Class::T*>*>* a}) → self::Class<self::Class::T*>*
+ constructor •({() →* FutureOr<core::List<self::Class::T*>*>* a = null}) → self::Class<self::Class::T*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/issue46389.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue46389.dart.weak.outline.expect
index 8ff791a..bb955ac 100644
--- a/pkg/front_end/testcases/general/issue46389.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue46389.dart.weak.outline.expect
@@ -8,7 +8,7 @@
;
method foo(core::int n) → core::num
;
- method bar({required core::int x}) → core::num
+ method bar({required core::int x = null}) → core::num
;
set baz(core::int x) → void
;
@@ -17,7 +17,7 @@
synthetic constructor •() → self::B<self::B::X%>
;
abstract method foo(covariant-by-class self::B::X% x) → self::B::X%;
- abstract method bar({required covariant-by-class self::B::X% x}) → self::B::X%;
+ abstract method bar({required covariant-by-class self::B::X% x = null}) → self::B::X%;
abstract set baz(covariant-by-class self::B::X% x) → void;
abstract set boz(covariant-by-class self::B::X% x) → void;
}
diff --git a/pkg/front_end/testcases/general/issue47036.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue47036.dart.weak.outline.expect
index bad6433..f84d0ad 100644
--- a/pkg/front_end/testcases/general/issue47036.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue47036.dart.weak.outline.expect
@@ -10,7 +10,7 @@
}
class Settings extends core::Object {
static final field dynamic _redirecting# = <dynamic>[self::Settings::•]/*isLegacy*/;
- static factory •({self::Sidebar sidebar}) → self::Settings
+ static factory •({self::Sidebar sidebar = null}) → self::Settings
return self::_SSettings::•(sidebar: sidebar);
}
class Sidebar extends core::Object {
@@ -20,7 +20,7 @@
}
abstract class _SSettings extends core::Object implements self::Settings {
static final field dynamic _redirecting# = <dynamic>[self::_SSettings::•]/*isLegacy*/;
- static factory •({self::Sidebar sidebar}) → self::_SSettings
+ static factory •({self::Sidebar sidebar = null}) → self::_SSettings
return new self::_$_SSettings::•(sidebar: sidebar);
}
class _$_SSettings extends core::Object implements self::_SSettings /*hasConstConstructor*/ {
diff --git a/pkg/front_end/testcases/general/issue47994a.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue47994a.dart.weak.outline.expect
index 0347e2e..4e6414d 100644
--- a/pkg/front_end/testcases/general/issue47994a.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue47994a.dart.weak.outline.expect
@@ -8,7 +8,7 @@
;
}
class BuildAssert extends core::Object /*hasConstConstructor*/ {
- const constructor •(core::bool condition, [core::Object? message]) → self::BuildAssert
+ const constructor •(core::bool condition, [core::Object? message = null]) → self::BuildAssert
: assert(condition, message), super core::Object::•()
;
}
diff --git a/pkg/front_end/testcases/general/issue48242.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue48242.dart.weak.outline.expect
index fe420e8..e400a72 100644
--- a/pkg/front_end/testcases/general/issue48242.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue48242.dart.weak.outline.expect
@@ -8,7 +8,7 @@
}
abstract class TestFailure<A extends core::Object? = dynamic> extends self::Base /*isMixinDeclaration*/ {
@core::override
- abstract method methodWithDefaultImpl({covariant-by-class self::TestFailure::A? nameParam}) → core::Object?;
+ abstract method methodWithDefaultImpl({covariant-by-class self::TestFailure::A? nameParam = null}) → core::Object?;
}
static method main() → void
;
diff --git a/pkg/front_end/testcases/general/mixin_application_override.dart.weak.outline.expect b/pkg/front_end/testcases/general/mixin_application_override.dart.weak.outline.expect
index a0a1070..b5bf4ad 100644
--- a/pkg/front_end/testcases/general/mixin_application_override.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/mixin_application_override.dart.weak.outline.expect
@@ -128,7 +128,7 @@
class S extends core::Object {
synthetic constructor •() → self::S
;
- method foo([dynamic x]) → dynamic
+ method foo([dynamic x = null]) → dynamic
;
}
class M extends core::Object {
diff --git a/pkg/front_end/testcases/general/mixin_covariant.dart.weak.outline.expect b/pkg/front_end/testcases/general/mixin_covariant.dart.weak.outline.expect
index 40e7e6a..27daeeb 100644
--- a/pkg/front_end/testcases/general/mixin_covariant.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/mixin_covariant.dart.weak.outline.expect
@@ -44,9 +44,9 @@
;
method positional(covariant-by-declaration core::int? a, core::int? b, covariant-by-declaration core::int? c, core::int? d, core::int? e) → void
;
- method optional([covariant-by-declaration core::int? a, core::int? b, covariant-by-declaration core::int? c, core::int? d]) → void
+ method optional([covariant-by-declaration core::int? a = null, core::int? b = null, covariant-by-declaration core::int? c = null, core::int? d = null]) → void
;
- method named({covariant-by-declaration core::int? a, core::int? b, covariant-by-declaration core::int? c, core::int? d}) → void
+ method named({covariant-by-declaration core::int? a = null, core::int? b = null, covariant-by-declaration core::int? c = null, core::int? d = null}) → void
;
}
class Inherited extends self::Direct {
diff --git a/pkg/front_end/testcases/general/named_parameters.dart.weak.outline.expect b/pkg/front_end/testcases/general/named_parameters.dart.weak.outline.expect
index a660886..9f54111 100644
--- a/pkg/front_end/testcases/general/named_parameters.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/named_parameters.dart.weak.outline.expect
@@ -5,9 +5,9 @@
class Superclass extends core::Object {
synthetic constructor •() → self::Superclass
;
- method foo({dynamic alpha, dynamic beta}) → dynamic
+ method foo({dynamic alpha = null, dynamic beta = null}) → dynamic
;
- method bar({dynamic beta, dynamic alpha}) → dynamic
+ method bar({dynamic beta = null, dynamic alpha = null}) → dynamic
;
method namedCallback(({alpha: core::String, beta: core::int}) → dynamic callback) → dynamic
;
@@ -15,9 +15,9 @@
class Subclass extends self::Superclass {
synthetic constructor •() → self::Subclass
;
- method foo({dynamic beta, dynamic alpha}) → dynamic
+ method foo({dynamic beta = null, dynamic alpha = null}) → dynamic
;
- method bar({dynamic alpha, dynamic beta}) → dynamic
+ method bar({dynamic alpha = null, dynamic beta = null}) → dynamic
;
method namedCallback(({alpha: core::String, beta: core::int}) → dynamic callback) → dynamic
;
diff --git a/pkg/front_end/testcases/general/nsm_covariance.dart.weak.outline.expect b/pkg/front_end/testcases/general/nsm_covariance.dart.weak.outline.expect
index 6ab71bf..6a88f7b 100644
--- a/pkg/front_end/testcases/general/nsm_covariance.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/nsm_covariance.dart.weak.outline.expect
@@ -62,17 +62,17 @@
synthetic constructor •() → nsm::A<nsm::A::T%>
;
abstract method _method1(core::int a, core::int b, covariant-by-class nsm::A::T% c, covariant-by-class nsm::A::T% d) → void;
- abstract method _method2({core::int a, core::int b, covariant-by-class nsm::A::T% c, covariant-by-class nsm::A::T% d}) → void;
+ abstract method _method2({core::int a = null, core::int b = null, covariant-by-class nsm::A::T% c = null, covariant-by-class nsm::A::T% d = null}) → void;
abstract method _method3(core::int a, covariant-by-class nsm::A::T% b) → void;
- abstract method _method4({core::int a, covariant-by-class nsm::A::T% b}) → void;
+ abstract method _method4({core::int a = null, covariant-by-class nsm::A::T% b = null}) → void;
}
abstract class B extends core::Object {
synthetic constructor •() → nsm::B
;
abstract method _method1(core::int x, covariant-by-declaration core::int y, core::int z, covariant-by-declaration core::int w) → void;
- abstract method _method2({core::int a, covariant-by-declaration core::int b, core::int c, covariant-by-declaration core::int d}) → void;
+ abstract method _method2({core::int a = null, covariant-by-declaration core::int b = null, core::int c = null, covariant-by-declaration core::int d = null}) → void;
abstract method _method3(covariant-by-declaration core::int x, core::int y) → void;
- abstract method _method4({covariant-by-declaration core::int a, core::int b}) → void;
+ abstract method _method4({covariant-by-declaration core::int a = null, core::int b = null}) → void;
}
abstract class C1 extends core::Object implements nsm::A<core::int>, nsm::B {
synthetic constructor •() → nsm::C1
diff --git a/pkg/front_end/testcases/general/optional.dart.weak.outline.expect b/pkg/front_end/testcases/general/optional.dart.weak.outline.expect
index 0d055ce..39abe43 100644
--- a/pkg/front_end/testcases/general/optional.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/optional.dart.weak.outline.expect
@@ -5,36 +5,36 @@
class Foo extends core::Object {
synthetic constructor •() → self::Foo
;
- method method(dynamic x, [dynamic y, dynamic z]) → dynamic
+ method method(dynamic x, [dynamic y = null, dynamic z = null]) → dynamic
;
}
abstract class External extends core::Object {
synthetic constructor •() → self::External
;
- abstract method externalMethod(core::int x, [core::int y, core::int z]) → core::String;
+ abstract method externalMethod(core::int x, [core::int y = null, core::int z = null]) → core::String;
abstract method listen(self::Listener listener) → void;
}
abstract class Listener extends core::Object {
synthetic constructor •() → self::Listener
;
- abstract method event(core::String input, [core::int? x, core::int? y]) → void;
+ abstract method event(core::String input, [core::int? x = null, core::int? y = null]) → void;
}
class TestListener extends self::Listener {
synthetic constructor •() → self::TestListener
;
- method event(core::String input, [core::int? x, core::int? y]) → void
+ method event(core::String input, [core::int? x = null, core::int? y = null]) → void
;
}
class ExtendedListener extends self::Listener {
synthetic constructor •() → self::ExtendedListener
;
- method event(core::String input, [core::int? x, core::int? y, dynamic z]) → void
+ method event(core::String input, [core::int? x = null, core::int? y = null, dynamic z = null]) → void
;
}
class InvalidListener extends core::Object {
synthetic constructor •() → self::InvalidListener
;
- method event(dynamic input, [dynamic x]) → void
+ method event(dynamic input, [dynamic x = null]) → void
;
}
external static method createExternal() → self::External;
diff --git a/pkg/front_end/testcases/general/override_check_basic.dart.weak.outline.expect b/pkg/front_end/testcases/general/override_check_basic.dart.weak.outline.expect
index 50f0b43..85c382b 100644
--- a/pkg/front_end/testcases/general/override_check_basic.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/override_check_basic.dart.weak.outline.expect
@@ -58,9 +58,9 @@
;
method f1(self::A x) → void
;
- method f2([self::A? x]) → void
+ method f2([self::A? x = null]) → void
;
- method f3({self::A? x}) → void
+ method f3({self::A? x = null}) → void
;
method f4() → self::A?
;
@@ -70,9 +70,9 @@
;
method f1(core::Object x) → void
;
- method f2([core::Object? x]) → void
+ method f2([core::Object? x = null]) → void
;
- method f3({core::Object? x}) → void
+ method f3({core::Object? x = null}) → void
;
method f4() → self::B?
;
@@ -82,9 +82,9 @@
;
method f1(self::B x) → void
;
- method f2([self::B? x]) → void
+ method f2([self::B? x = null]) → void
;
- method f3({self::B? x}) → void
+ method f3({self::B? x = null}) → void
;
method f4() → core::Object?
;
diff --git a/pkg/front_end/testcases/general/override_inference_named_parameters_ordering.dart.weak.outline.expect b/pkg/front_end/testcases/general/override_inference_named_parameters_ordering.dart.weak.outline.expect
index 17f1de7..beb4abd 100644
--- a/pkg/front_end/testcases/general/override_inference_named_parameters_ordering.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/override_inference_named_parameters_ordering.dart.weak.outline.expect
@@ -5,37 +5,37 @@
class A extends core::Object {
synthetic constructor •() → self::A
;
- method foo({core::bool? c = true, core::bool? a}) → dynamic
+ method foo({core::bool? c = true, core::bool? a = null}) → dynamic
;
}
class B extends self::A {
synthetic constructor •() → self::B
;
- method foo({core::bool? c = true, core::bool? a}) → dynamic
+ method foo({core::bool? c = true, core::bool? a = null}) → dynamic
;
}
class C extends self::B {
synthetic constructor •() → self::C
;
- method foo({core::bool? c = true, core::bool? a}) → dynamic
+ method foo({core::bool? c = true, core::bool? a = null}) → dynamic
;
}
class A1 extends core::Object {
synthetic constructor •() → self::A1
;
- method foo({core::bool? a = true, core::bool? c}) → dynamic
+ method foo({core::bool? a = true, core::bool? c = null}) → dynamic
;
}
class B1 extends self::A1 {
synthetic constructor •() → self::B1
;
- method foo({core::bool? a = true, core::bool? c}) → dynamic
+ method foo({core::bool? a = true, core::bool? c = null}) → dynamic
;
}
class C1 extends self::B1 {
synthetic constructor •() → self::C1
;
- method foo({core::bool? a = true, core::bool? c}) → dynamic
+ method foo({core::bool? a = true, core::bool? c = null}) → dynamic
;
}
static method main() → dynamic
diff --git a/pkg/front_end/testcases/general/redirecting_factory_invocation_in_invalid.dart.weak.outline.expect b/pkg/front_end/testcases/general/redirecting_factory_invocation_in_invalid.dart.weak.outline.expect
index 70bc2cc..a663626 100644
--- a/pkg/front_end/testcases/general/redirecting_factory_invocation_in_invalid.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/redirecting_factory_invocation_in_invalid.dart.weak.outline.expect
@@ -16,7 +16,7 @@
final field self::Class2 _c2;
constructor •(self::Class2 _c2) → self::Class2
;
- method method({dynamic a}) → dynamic
+ method method({dynamic a = null}) → dynamic
;
get call() → core::int
;
diff --git a/pkg/front_end/testcases/general/redirecting_factory_invocation_metadata.dart.weak.outline.expect b/pkg/front_end/testcases/general/redirecting_factory_invocation_metadata.dart.weak.outline.expect
index ac02ea3..d242338 100644
--- a/pkg/front_end/testcases/general/redirecting_factory_invocation_metadata.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/redirecting_factory_invocation_metadata.dart.weak.outline.expect
@@ -31,10 +31,10 @@
constructor •() → self::Class<self::Class::T%>
;
@self::Const::internal()
- method method1<@self::Const::internal() T extends core::Object? = dynamic>(dynamic o1, [dynamic o2]) → dynamic
+ method method1<@self::Const::internal() T extends core::Object? = dynamic>(dynamic o1, [dynamic o2 = null]) → dynamic
;
@self::Const::internal()
- method method2<@self::Const::internal() T extends core::Object? = dynamic>(dynamic o1, {dynamic o2}) → dynamic
+ method method2<@self::Const::internal() T extends core::Object? = dynamic>(dynamic o1, {dynamic o2 = null}) → dynamic
;
}
@self::Const::internal()
diff --git a/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable2.dart.weak.outline.expect b/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable2.dart.weak.outline.expect
index 8972be7..95eee3f 100644
--- a/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable2.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
constructor fromT(self::Foo::T _init) → self::Foo<self::Foo::T>
;
- constructor _internal({required self::Foo::T x}) → self::Foo<self::Foo::T>
+ constructor _internal({required self::Foo::T x = null}) → self::Foo<self::Foo::T>
;
}
static method main() → void
diff --git a/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.outline.expect b/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.outline.expect
index 9c7ccb9..3aac044 100644
--- a/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.outline.expect
@@ -22,7 +22,7 @@
;
constructor fromT(self::Foo::T* _init) → self::Foo<self::Foo::T*>*
;
- constructor _internal({self::Foo::T* x}) → self::Foo<self::Foo::T*>*
+ constructor _internal({self::Foo::T* x = null}) → self::Foo<self::Foo::T*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.outline.expect b/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.outline.expect
index 5e288fa..d0557a9 100644
--- a/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.outline.expect
@@ -6,7 +6,7 @@
covariant-by-class field self::Foo::T% x;
constructor from(core::String _init) → self::Foo<self::Foo::T%>
;
- constructor _internal({required self::Foo::T% x}) → self::Foo<self::Foo::T%>
+ constructor _internal({required self::Foo::T% x = null}) → self::Foo<self::Foo::T%>
;
}
static method main() → void
diff --git a/pkg/front_end/testcases/general/trailing_comma1.dart.weak.outline.expect b/pkg/front_end/testcases/general/trailing_comma1.dart.weak.outline.expect
index 5048b8e..ed37270 100644
--- a/pkg/front_end/testcases/general/trailing_comma1.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/trailing_comma1.dart.weak.outline.expect
@@ -5,9 +5,9 @@
class C extends core::Object {
synthetic constructor •() → self::C
;
- method instance1({dynamic z}) → void
+ method instance1({dynamic z = null}) → void
;
- method instance2(dynamic a, {dynamic z}) → void
+ method instance2(dynamic a, {dynamic z = null}) → void
;
}
class Bad extends core::Object {
diff --git a/pkg/front_end/testcases/incremental/const_to_string.yaml b/pkg/front_end/testcases/incremental/const_to_string.yaml
new file mode 100644
index 0000000..d97feb7
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/const_to_string.yaml
@@ -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.md file.
+
+# Importing a package also via file uri gives two libraries with the same
+# file uri --- that shouldn't crash experimental invalidation though.
+
+type: newworld
+worlds:
+ - entry: main.dart
+ experiments: const-functions
+ sources:
+ main.dart: |
+ import "a.dart";
+ import "b.dart";
+ const String s1 = const A().toString();
+ const String s2 = const B<List<int>>().toString();
+ main() {
+ print(s1);
+ print(s2);
+ }
+ a.dart: |
+ class A {
+ const A();
+ }
+ b.dart: |
+ class B<E> {
+ const B();
+ }
+ expectedLibraryCount: 3
+
+ - entry: main.dart
+ experiments: const-functions
+ worldType: updated
+ expectInitializeFromDill: false
+ invalidate:
+ - main.dart
+ expectedLibraryCount: 3
diff --git a/pkg/front_end/testcases/incremental/const_to_string.yaml.world.1.expect b/pkg/front_end/testcases/incremental/const_to_string.yaml.world.1.expect
new file mode 100644
index 0000000..f842a13
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/const_to_string.yaml.world.1.expect
@@ -0,0 +1,33 @@
+main = main::main;
+library from "org-dartlang-test:///a.dart" as a {
+
+ class A extends dart.core::Object /*hasConstConstructor*/ {
+ const constructor •() → a::A
+ : super dart.core::Object::•()
+ ;
+ }
+}
+library from "org-dartlang-test:///b.dart" as b {
+
+ class B<E extends dart.core::Object? = dynamic> extends dart.core::Object /*hasConstConstructor*/ {
+ const constructor •() → b::B<b::B::E%>
+ : super dart.core::Object::•()
+ ;
+ }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+ import "org-dartlang-test:///a.dart";
+ import "org-dartlang-test:///b.dart";
+
+ static const field dart.core::String s1 = #C1;
+ static const field dart.core::String s2 = #C2;
+ static method main() → dynamic {
+ dart.core::print(#C1);
+ dart.core::print(#C2);
+ }
+}
+constants {
+ #C1 = "Instance of 'A'"
+ #C2 = "Instance of 'B'"
+}
diff --git a/pkg/front_end/testcases/incremental/const_to_string.yaml.world.2.expect b/pkg/front_end/testcases/incremental/const_to_string.yaml.world.2.expect
new file mode 100644
index 0000000..f842a13
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/const_to_string.yaml.world.2.expect
@@ -0,0 +1,33 @@
+main = main::main;
+library from "org-dartlang-test:///a.dart" as a {
+
+ class A extends dart.core::Object /*hasConstConstructor*/ {
+ const constructor •() → a::A
+ : super dart.core::Object::•()
+ ;
+ }
+}
+library from "org-dartlang-test:///b.dart" as b {
+
+ class B<E extends dart.core::Object? = dynamic> extends dart.core::Object /*hasConstConstructor*/ {
+ const constructor •() → b::B<b::B::E%>
+ : super dart.core::Object::•()
+ ;
+ }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+ import "org-dartlang-test:///a.dart";
+ import "org-dartlang-test:///b.dart";
+
+ static const field dart.core::String s1 = #C1;
+ static const field dart.core::String s2 = #C2;
+ static method main() → dynamic {
+ dart.core::print(#C1);
+ dart.core::print(#C2);
+ }
+}
+constants {
+ #C1 = "Instance of 'A'"
+ #C2 = "Instance of 'B'"
+}
diff --git a/pkg/front_end/testcases/incremental/initializer_implicit_null.yaml b/pkg/front_end/testcases/incremental/initializer_implicit_null.yaml
new file mode 100644
index 0000000..e60bc44
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/initializer_implicit_null.yaml
@@ -0,0 +1,29 @@
+# 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.md file.
+
+# Recompiling with no change shouldn't change the initializer - even from
+# null to Constant(null).
+
+type: newworld
+worlds:
+ - entry: main.dart
+ sources:
+ main.dart: |
+ import "lib.dart";
+ class B {}
+ class C = A with B;
+ lib.dart: |
+ class A {
+ final int? a;
+ A([this.a]);
+ }
+ expectedLibraryCount: 2
+
+ - entry: main.dart
+ worldType: updated
+ compareToPrevious: true
+ expectInitializeFromDill: false
+ invalidate:
+ - main.dart
+ expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental/initializer_implicit_null.yaml.world.1.expect b/pkg/front_end/testcases/incremental/initializer_implicit_null.yaml.world.1.expect
new file mode 100644
index 0000000..8290d7d
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/initializer_implicit_null.yaml.world.1.expect
@@ -0,0 +1,28 @@
+main = <No Member>;
+library from "org-dartlang-test:///lib.dart" as lib {
+
+ class A extends dart.core::Object {
+ final field dart.core::int? a;
+ constructor •([dart.core::int? a = #C1]) → lib::A
+ : lib::A::a = a, super dart.core::Object::•()
+ ;
+ }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+ import "org-dartlang-test:///lib.dart";
+
+ class B extends dart.core::Object {
+ synthetic constructor •() → main::B
+ : super dart.core::Object::•()
+ ;
+ }
+ class C extends lib::A implements main::B /*isEliminatedMixin*/ {
+ synthetic constructor •([dart.core::int? a = #C1]) → main::C
+ : super lib::A::•(a)
+ ;
+ }
+}
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/incremental/initializer_implicit_null.yaml.world.2.expect b/pkg/front_end/testcases/incremental/initializer_implicit_null.yaml.world.2.expect
new file mode 100644
index 0000000..8290d7d
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/initializer_implicit_null.yaml.world.2.expect
@@ -0,0 +1,28 @@
+main = <No Member>;
+library from "org-dartlang-test:///lib.dart" as lib {
+
+ class A extends dart.core::Object {
+ final field dart.core::int? a;
+ constructor •([dart.core::int? a = #C1]) → lib::A
+ : lib::A::a = a, super dart.core::Object::•()
+ ;
+ }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+ import "org-dartlang-test:///lib.dart";
+
+ class B extends dart.core::Object {
+ synthetic constructor •() → main::B
+ : super dart.core::Object::•()
+ ;
+ }
+ class C extends lib::A implements main::B /*isEliminatedMixin*/ {
+ synthetic constructor •([dart.core::int? a = #C1]) → main::C
+ : super lib::A::•(a)
+ ;
+ }
+}
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/inference/bug30624.dart.weak.outline.expect b/pkg/front_end/testcases/inference/bug30624.dart.weak.outline.expect
index 7b44ed7..2d19b55 100644
--- a/pkg/front_end/testcases/inference/bug30624.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/bug30624.dart.weak.outline.expect
@@ -5,17 +5,17 @@
class C<E extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::C<self::C::E*>*
;
- method barA([(self::C::E*, self::C::E*) →* core::int* cmp]) → void
+ method barA([(self::C::E*, self::C::E*) →* core::int* cmp = null]) → void
;
- method barB([(self::C::E*, self::C::E*) →* core::int* cmp]) → void
+ method barB([(self::C::E*, self::C::E*) →* core::int* cmp = null]) → void
;
- method barC([(self::C::E*, self::C::E*) →* core::int* cmp]) → void
+ method barC([(self::C::E*, self::C::E*) →* core::int* cmp = null]) → void
;
- method barD([(self::C::E*, self::C::E*) →* core::int* cmp]) → void
+ method barD([(self::C::E*, self::C::E*) →* core::int* cmp = null]) → void
;
- method barE([(self::C::E*, self::C::E*) →* core::int* cmp]) → void
+ method barE([(self::C::E*, self::C::E*) →* core::int* cmp = null]) → void
;
- method barF([(self::C::E*, self::C::E*) →* core::int* cmp]) → void
+ method barF([(self::C::E*, self::C::E*) →* core::int* cmp = null]) → void
;
static method _default(dynamic a, dynamic b) → core::int*
;
diff --git a/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.outline.expect b/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.outline.expect
index 79e8640..0e0f2e4 100644
--- a/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.outline.expect
@@ -5,7 +5,7 @@
class ActionDispatcher<P extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::ActionDispatcher<self::ActionDispatcher::P*>*
;
- method call([covariant-by-class self::ActionDispatcher::P* value]) → void
+ method call([covariant-by-class self::ActionDispatcher::P* value = null]) → void
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_constructor_arguments_infer_downwards.dart.weak.outline.expect b/pkg/front_end/testcases/inference/downwards_inference_on_constructor_arguments_infer_downwards.dart.weak.outline.expect
index b4bd378..f77a3ad 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_constructor_arguments_infer_downwards.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_constructor_arguments_infer_downwards.dart.weak.outline.expect
@@ -17,7 +17,7 @@
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class F1 extends core::Object {
- constructor •({core::List<core::int*>* a}) → self::F1*
+ constructor •({core::List<core::int*>* a = null}) → self::F1*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -59,7 +59,7 @@
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class F4 extends core::Object {
- constructor •({core::Iterable<core::Iterable<core::int*>*>* a}) → self::F4*
+ constructor •({core::Iterable<core::Iterable<core::int*>*>* a = null}) → self::F4*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_empty_list.dart.weak.outline.expect b/pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_empty_list.dart.weak.outline.expect
index 0a9290c..568d09d 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_empty_list.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_empty_list.dart.weak.outline.expect
@@ -17,7 +17,7 @@
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class F4<T extends core::Object* = dynamic> extends core::Object {
- constructor •({core::Iterable<core::Iterable<self::F4::T*>*>* a}) → self::F4<self::F4::T*>*
+ constructor •({core::Iterable<core::Iterable<self::F4::T*>*>* a = null}) → self::F4<self::F4::T*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart.weak.outline.expect b/pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart.weak.outline.expect
index 6ad323d..bc46cfe 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_infer_downwards.dart.weak.outline.expect
@@ -17,7 +17,7 @@
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class F1<T extends core::Object* = dynamic> extends core::Object {
- constructor •({core::List<self::F1::T*>* a}) → self::F1<self::F1::T*>*
+ constructor •({core::List<self::F1::T*>* a = null}) → self::F1<self::F1::T*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -59,7 +59,7 @@
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class F4<T extends core::Object* = dynamic> extends core::Object {
- constructor •({core::Iterable<core::Iterable<self::F4::T*>*>* a}) → self::F4<self::F4::T*>*
+ constructor •({core::Iterable<core::Iterable<self::F4::T*>*>* a = null}) → self::F4<self::F4::T*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.outline.expect b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.outline.expect
index 6b90f7f..a2ec85f 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.outline.expect
@@ -43,9 +43,9 @@
;
}
class F<S extends core::Object* = dynamic, T extends core::Object* = dynamic> extends self::A<self::F::S*, self::F::T*> {
- constructor •(self::F::S* x, self::F::T* y, {core::List<self::F::S*>* a, core::List<self::F::T*>* b}) → self::F<self::F::S*, self::F::T*>*
+ constructor •(self::F::S* x, self::F::T* y, {core::List<self::F::S*>* a = null, core::List<self::F::T*>* b = null}) → self::F<self::F::S*, self::F::T*>*
;
- constructor named(self::F::S* x, self::F::T* y, [self::F::S* a, self::F::T* b]) → self::F<self::F::S*, self::F::T*>*
+ constructor named(self::F::S* x, self::F::T* y, [self::F::S* a = null, self::F::T* b = null]) → self::F<self::F::S*, self::F::T*>*
;
}
static method test() → void
diff --git a/pkg/front_end/testcases/inference/future_then.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then.dart.weak.outline.expect
index 1e5bf1d..9492fb2 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_2.dart.weak.outline.expect
index 65c689a..6bf7851 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_3.dart.weak.outline.expect
index dec6dfa..d8325ea 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_4.dart.weak.outline.expect
index 716cde4..bd648b9 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_5.dart.weak.outline.expect
index b9060d8..bdf2de4 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_6.dart.weak.outline.expect
index f7c82fa..6308c69 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.outline.expect
index 3a661d0..c6f1986 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.outline.expect
index 68bc085..c076dc4 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.outline.expect
index bb3f357..9969d8c 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.outline.expect
index c9869bc..242640b 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.outline.expect
index c2dff99..072b257 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.outline.expect
index 4bf3e0c..78864f5 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.outline.expect
index 3719c43..174999b 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.outline.expect
index 0838a5b..2f7fa11 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.outline.expect
index 244190b..d1dd603 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.outline.expect
index 0096c45..1d10649 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.outline.expect
index 45d1408..41c31af 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.outline.expect
index 6e0c9a1..0b1b385 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.outline.expect
@@ -12,7 +12,7 @@
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.outline.expect
index 53ccca1..871785f 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.outline.expect
@@ -8,11 +8,11 @@
class MyFuture<T extends core::Object* = dynamic> extends core::Object implements asy::Future<self::MyFuture::T*> {
constructor •() → self::MyFuture<self::MyFuture::T*>*
;
- constructor value([dynamic x]) → self::MyFuture<self::MyFuture::T*>*
+ constructor value([dynamic x = null]) → self::MyFuture<self::MyFuture::T*>*
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.outline.expect
index f4f33bc..cec3e52 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.outline.expect
@@ -8,11 +8,11 @@
class MyFuture<T extends core::Object* = dynamic> extends core::Object implements asy::Future<self::MyFuture::T*> {
constructor •() → self::MyFuture<self::MyFuture::T*>*
;
- constructor value([dynamic x]) → self::MyFuture<self::MyFuture::T*>*
+ constructor value([dynamic x = null]) → self::MyFuture<self::MyFuture::T*>*
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.outline.expect
index cd98612..2ba5919 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.outline.expect
@@ -8,11 +8,11 @@
class MyFuture<T extends core::Object* = dynamic> extends core::Object implements asy::Future<self::MyFuture::T*> {
constructor •() → self::MyFuture<self::MyFuture::T*>*
;
- constructor value([dynamic x]) → self::MyFuture<self::MyFuture::T*>*
+ constructor value([dynamic x = null]) → self::MyFuture<self::MyFuture::T*>*
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.outline.expect
index 57e4893..a8d85df 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.outline.expect
@@ -8,11 +8,11 @@
class MyFuture<T extends core::Object* = dynamic> extends core::Object implements asy::Future<self::MyFuture::T*> {
constructor •() → self::MyFuture<self::MyFuture::T*>*
;
- constructor value([dynamic x]) → self::MyFuture<self::MyFuture::T*>*
+ constructor value([dynamic x = null]) → self::MyFuture<self::MyFuture::T*>*
;
method noSuchMethod(core::Invocation* invocation) → dynamic
;
- method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError}) → self::MyFuture<self::MyFuture::then::S*>*
+ method then<S extends core::Object* = dynamic>((self::MyFuture::T*) →* FutureOr<self::MyFuture::then::S*>* f, {core::Function* onError = null}) → self::MyFuture<self::MyFuture::then::S*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.outline.expect b/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.outline.expect
index 3603daa..d909d15 100644
--- a/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.outline.expect
@@ -5,7 +5,7 @@
abstract class C<E extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::C<self::C::E*>*
;
- method sort([(self::C::E*, self::C::E*) →* core::int* compare]) → void
+ method sort([(self::C::E*, self::C::E*) →* core::int* compare = null]) → void
;
static method _compareAny(dynamic a, dynamic b) → core::int*
;
diff --git a/pkg/front_end/testcases/inference/inconsistent_overrides.dart.weak.outline.expect b/pkg/front_end/testcases/inference/inconsistent_overrides.dart.weak.outline.expect
index 6756bd4..66062f6 100644
--- a/pkg/front_end/testcases/inference/inconsistent_overrides.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/inconsistent_overrides.dart.weak.outline.expect
@@ -41,11 +41,11 @@
class A extends core::Object {
synthetic constructor •() → self::A*
;
- method f(self::A* x, {self::A* y}) → self::A*
+ method f(self::A* x, {self::A* y = null}) → self::A*
;
- method g(self::A* x, {self::A* y}) → self::A*
+ method g(self::A* x, {self::A* y = null}) → self::A*
;
- method h(self::A* x, {self::A* y}) → self::A*
+ method h(self::A* x, {self::A* y = null}) → self::A*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -61,21 +61,21 @@
class B extends self::A implements self::I {
synthetic constructor •() → self::B*
;
- method f(invalid-type x, {invalid-type y}) → invalid-type
+ method f(invalid-type x, {invalid-type y = null}) → invalid-type
;
- method g(invalid-type x, {invalid-type y}) → invalid-type
+ method g(invalid-type x, {invalid-type y = null}) → invalid-type
;
- method h(invalid-type x, {invalid-type y}) → invalid-type
+ method h(invalid-type x, {invalid-type y = null}) → invalid-type
;
}
class I extends core::Object {
synthetic constructor •() → self::I*
;
- method f(self::I* x, {self::I* y}) → self::I*
+ method f(self::I* x, {self::I* y = null}) → self::I*
;
- method g(self::I* x, {self::I* y}) → self::A*
+ method g(self::I* x, {self::I* y = null}) → self::A*
;
- method h(self::A* x, {self::I* y}) → self::A*
+ method h(self::A* x, {self::I* y = null}) → self::A*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/infer_generic_method_type_named.dart.weak.outline.expect b/pkg/front_end/testcases/inference/infer_generic_method_type_named.dart.weak.outline.expect
index 3588046..01a5825 100644
--- a/pkg/front_end/testcases/inference/infer_generic_method_type_named.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_generic_method_type_named.dart.weak.outline.expect
@@ -5,7 +5,7 @@
class C extends core::Object {
synthetic constructor •() → self::C*
;
- method m<T extends core::Object* = dynamic>(core::int* a, {core::String* b, self::C::m::T* c}) → self::C::m::T*
+ method m<T extends core::Object* = dynamic>(core::int* a, {core::String* b = null, self::C::m::T* c = null}) → self::C::m::T*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/infer_generic_method_type_positional.dart.weak.outline.expect b/pkg/front_end/testcases/inference/infer_generic_method_type_positional.dart.weak.outline.expect
index 7cd51f6..5e7e617 100644
--- a/pkg/front_end/testcases/inference/infer_generic_method_type_positional.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_generic_method_type_positional.dart.weak.outline.expect
@@ -5,7 +5,7 @@
class C extends core::Object {
synthetic constructor •() → self::C*
;
- method m<T extends core::Object* = dynamic>(core::int* a, [self::C::m::T* b]) → self::C::m::T*
+ method m<T extends core::Object* = dynamic>(core::int* a, [self::C::m::T* b = null]) → self::C::m::T*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/infer_generic_method_type_positional2.dart.weak.outline.expect b/pkg/front_end/testcases/inference/infer_generic_method_type_positional2.dart.weak.outline.expect
index bc24a94..0ed9a74 100644
--- a/pkg/front_end/testcases/inference/infer_generic_method_type_positional2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_generic_method_type_positional2.dart.weak.outline.expect
@@ -5,7 +5,7 @@
class C extends core::Object {
synthetic constructor •() → self::C*
;
- method m<T extends core::Object* = dynamic>(core::int* a, [core::String* b, self::C::m::T* c]) → self::C::m::T*
+ method m<T extends core::Object* = dynamic>(core::int* a, [core::String* b = null, self::C::m::T* c = null]) → self::C::m::T*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.weak.outline.expect b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.weak.outline.expect
index bacc059..a063f88 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.weak.outline.expect
@@ -38,9 +38,9 @@
synthetic constructor •() → self::A*
;
abstract method f(core::int* x, core::int* y) → core::int*;
- abstract method g(core::int* x, [core::int* y]) → core::int*;
- abstract method h(core::int* x, {core::int* y}) → core::int*;
- abstract method i(core::int* x, {core::int* y}) → core::int*;
+ abstract method g(core::int* x, [core::int* y = null]) → core::int*;
+ abstract method h(core::int* x, {core::int* y = null}) → core::int*;
+ abstract method i(core::int* x, {core::int* y = null}) → core::int*;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -58,7 +58,7 @@
abstract method f(core::int* x) → core::int*;
abstract method g(core::int* x) → core::int*;
abstract method h(core::int* x) → core::int*;
- abstract method i(core::int* x, {core::int* z}) → core::int*;
+ abstract method i(core::int* x, {core::int* z = null}) → core::int*;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -74,9 +74,9 @@
synthetic constructor •() → self::C*
;
abstract method f(invalid-type x, invalid-type y) → invalid-type;
- abstract method g(core::int* x, [core::int* y]) → core::int*;
- abstract method h(core::int* x, {core::int* y}) → core::int*;
- abstract method i(invalid-type x, {invalid-type y, invalid-type z}) → invalid-type;
+ abstract method g(core::int* x, [core::int* y = null]) → core::int*;
+ abstract method h(core::int* x, {core::int* y = null}) → core::int*;
+ abstract method i(invalid-type x, {invalid-type y = null, invalid-type z = null}) → invalid-type;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.outline.expect b/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.outline.expect
index ab7f834..ad8cba6 100644
--- a/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.outline.expect
@@ -5,7 +5,7 @@
abstract class A<X extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::A<self::A::X*>*
;
- abstract method foo({covariant-by-class core::Iterable<self::A::X*>* x}) → void;
+ abstract method foo({covariant-by-class core::Iterable<self::A::X*>* x = null}) → void;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -20,7 +20,7 @@
class B<Y extends core::Object* = dynamic> extends core::Object implements self::A<self::B::Y*> {
synthetic constructor •() → self::B<self::B::Y*>*
;
- method foo({covariant-by-class core::Iterable<self::B::Y*>* x}) → void
+ method foo({covariant-by-class core::Iterable<self::B::Y*>* x = null}) → void
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/instantiate_to_bound/inference_gives_input.dart.weak.outline.expect b/pkg/front_end/testcases/instantiate_to_bound/inference_gives_input.dart.weak.outline.expect
index 933cc07..0cf94f7 100644
--- a/pkg/front_end/testcases/instantiate_to_bound/inference_gives_input.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/instantiate_to_bound/inference_gives_input.dart.weak.outline.expect
@@ -17,7 +17,7 @@
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class B<T extends core::num*, S extends core::List<self::B::T*>* = core::List<core::num*>*> extends self::A<self::B::T*> {
- constructor •([self::B::T* x]) → self::B<self::B::T*, self::B::S*>*
+ constructor •([self::B::T* x = null]) → self::B<self::B::T*, self::B::S*>*
;
}
static method main() → dynamic
diff --git a/pkg/front_end/testcases/named_arguments_anywhere/all_kinds.dart.weak.outline.expect b/pkg/front_end/testcases/named_arguments_anywhere/all_kinds.dart.weak.outline.expect
index 23ee911..74d3bdb 100644
--- a/pkg/front_end/testcases/named_arguments_anywhere/all_kinds.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/named_arguments_anywhere/all_kinds.dart.weak.outline.expect
@@ -4,13 +4,13 @@
typedef B = self::A;
class A extends core::Object {
- constructor •(core::int x, core::int y, {required core::int z}) → self::A
+ constructor •(core::int x, core::int y, {required core::int z = null}) → self::A
;
static factory foo(core::int x, core::int y, {required core::int z}) → self::A
;
get property() → (core::int, core::int, {required z: core::int}) → void
;
- method bar(core::int x, core::int y, {required core::int z}) → void
+ method bar(core::int x, core::int y, {required core::int z = null}) → void
;
}
class Test extends self::A {
diff --git a/pkg/front_end/testcases/named_arguments_anywhere/redirecting_constructor_initializers.dart.weak.outline.expect b/pkg/front_end/testcases/named_arguments_anywhere/redirecting_constructor_initializers.dart.weak.outline.expect
index ccf5a7c..48bc7c5 100644
--- a/pkg/front_end/testcases/named_arguments_anywhere/redirecting_constructor_initializers.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/named_arguments_anywhere/redirecting_constructor_initializers.dart.weak.outline.expect
@@ -4,7 +4,7 @@
class A extends core::Object {
static final field dynamic _redirecting# = <dynamic>[self::A::bar]/*isLegacy*/;
- constructor •(core::int x, core::bool y, {required core::String z}) → self::A
+ constructor •(core::int x, core::bool y, {required core::String z = null}) → self::A
;
constructor foo() → self::A
;
diff --git a/pkg/front_end/testcases/named_arguments_anywhere/trailing_comma1.dart.weak.outline.expect b/pkg/front_end/testcases/named_arguments_anywhere/trailing_comma1.dart.weak.outline.expect
index 5048b8e..ed37270 100644
--- a/pkg/front_end/testcases/named_arguments_anywhere/trailing_comma1.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/named_arguments_anywhere/trailing_comma1.dart.weak.outline.expect
@@ -5,9 +5,9 @@
class C extends core::Object {
synthetic constructor •() → self::C
;
- method instance1({dynamic z}) → void
+ method instance1({dynamic z = null}) → void
;
- method instance2(dynamic a, {dynamic z}) → void
+ method instance2(dynamic a, {dynamic z = null}) → void
;
}
class Bad extends core::Object {
diff --git a/pkg/front_end/testcases/nnbd/combined_required.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/combined_required.dart.weak.outline.expect
index 1b3a496..a58937a 100644
--- a/pkg/front_end/testcases/nnbd/combined_required.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/combined_required.dart.weak.outline.expect
@@ -5,17 +5,17 @@
class A extends core::Object {
synthetic constructor •() → self::A
;
- method method1({required core::int a}) → void
+ method method1({required core::int a = null}) → void
;
- method method2({core::int? a, required core::int b}) → void
+ method method2({core::int? a = null, required core::int b = null}) → void
;
}
class B extends core::Object {
synthetic constructor •() → self::B
;
- method method1({required covariant-by-declaration core::int a}) → void
+ method method1({required covariant-by-declaration core::int a = null}) → void
;
- method method2({covariant-by-declaration core::int? a, required core::int b}) → void
+ method method2({covariant-by-declaration core::int? a = null, required core::int b = null}) → void
;
}
class C extends self::A implements self::B {
@@ -29,9 +29,9 @@
class D extends self::C {
synthetic constructor •() → self::D
;
- method method1({required covariant-by-declaration core::int a}) → void
+ method method1({required covariant-by-declaration core::int a = null}) → void
;
- method method2({covariant-by-declaration core::int? a, required core::int b}) → void
+ method method2({covariant-by-declaration core::int? a = null, required core::int b = null}) → void
;
}
static method main() → dynamic
diff --git a/pkg/front_end/testcases/nnbd/future_or_variables.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/future_or_variables.dart.weak.outline.expect
index 920efc0..4a18759 100644
--- a/pkg/front_end/testcases/nnbd/future_or_variables.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/future_or_variables.dart.weak.outline.expect
@@ -13,9 +13,9 @@
static field FutureOr<FutureOr<dynamic>>staticField3;
synthetic constructor •() → self::Class1
;
- method instanceMethod1([FutureOr<dynamic>parameter1, FutureOr<core::int?>parameter2, FutureOr<FutureOr<dynamic>>parameter3]) → void
+ method instanceMethod1([FutureOr<dynamic>parameter1 = null, FutureOr<core::int?>parameter2 = null, FutureOr<FutureOr<dynamic>>parameter3 = null]) → void
;
- method instanceMethod2({FutureOr<dynamic>parameter1, FutureOr<core::int?>parameter2, FutureOr<FutureOr<dynamic>>parameter3}) → void
+ method instanceMethod2({FutureOr<dynamic>parameter1 = null, FutureOr<core::int?>parameter2 = null, FutureOr<FutureOr<dynamic>>parameter3 = null}) → void
;
static method staticMethod1([FutureOr<dynamic>parameter1, FutureOr<core::int?>parameter2, FutureOr<FutureOr<dynamic>>parameter3]) → void
;
diff --git a/pkg/front_end/testcases/nnbd/issue40600.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue40600.dart.weak.outline.expect
index 36bd369..d9e0522 100644
--- a/pkg/front_end/testcases/nnbd/issue40600.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue40600.dart.weak.outline.expect
@@ -14,7 +14,7 @@
covariant-by-class final field self::B<self::A::X%> b;
synthetic constructor •() → self::A<self::A::X%>
;
- method foo([covariant-by-class FutureOr<self::A::X%>? x]) → dynamic
+ method foo([covariant-by-class FutureOr<self::A::X%>? x = null]) → dynamic
;
}
class C<T extends core::Object? = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/nnbd/issue40954.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue40954.dart.weak.outline.expect
index 35e6233..2869359 100644
--- a/pkg/front_end/testcases/nnbd/issue40954.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue40954.dart.weak.outline.expect
@@ -52,9 +52,9 @@
;
static method test2(dynamic v, {self::A a}) → void
;
- method test11(dynamic v, [self::A a]) → void
+ method test11(dynamic v, [self::A a = null]) → void
;
- method test22(dynamic v, {self::A a}) → void
+ method test22(dynamic v, {self::A a = null}) → void
;
}
static method test1(dynamic v, [self::A a]) → void
diff --git a/pkg/front_end/testcases/nnbd/issue42362.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue42362.dart.weak.outline.expect
index 48dab81..1ca1edd 100644
--- a/pkg/front_end/testcases/nnbd/issue42362.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue42362.dart.weak.outline.expect
@@ -88,23 +88,23 @@
class A extends core::Object {
final field core::int i;
static final field dynamic _redirecting# = <dynamic>[self::A::factory3, self::A::factory4, self::A::factory5, self::A::factory6, self::A::factory7]/*isLegacy*/;
- constructor constructor1([core::int i]) → self::A
+ constructor constructor1([core::int i = null]) → self::A
;
- constructor constructor2({core::int i}) → self::A
+ constructor constructor2({core::int i = null}) → self::A
;
- constructor constructor3([core::int i]) → self::A
+ constructor constructor3([core::int i = null]) → self::A
;
- constructor constructor4({core::int i}) → self::A
+ constructor constructor4({core::int i = null}) → self::A
;
- constructor constructor5([core::int? i]) → self::A
+ constructor constructor5([core::int? i = null]) → self::A
;
- constructor constructor6({core::int? i}) → self::A
+ constructor constructor6({core::int? i = null}) → self::A
;
- constructor constructor7({required core::int i}) → self::A
+ constructor constructor7({required core::int i = null}) → self::A
;
- external constructor constructor8([core::int i]) → self::A
+ external constructor constructor8([core::int i = null]) → self::A
;
- external constructor constructor9({core::int i}) → self::A
+ external constructor constructor9({core::int i = null}) → self::A
;
static factory factory3([core::int i]) → self::A
return new self::A::constructor3(i);
@@ -120,45 +120,45 @@
;
static factory factory9({core::int i}) → self::A
;
- method method3([core::int i]) → dynamic
+ method method3([core::int i = null]) → dynamic
;
- method method4({core::int i}) → dynamic
+ method method4({core::int i = null}) → dynamic
;
- method method5([core::int? i]) → dynamic
+ method method5([core::int? i = null]) → dynamic
;
- method method6({core::int? i}) → dynamic
+ method method6({core::int? i = null}) → dynamic
;
- method method7({required core::int i}) → dynamic
+ method method7({required core::int i = null}) → dynamic
;
- external method method8([core::int i]) → dynamic;
- external method method9({core::int i}) → dynamic;
+ external method method8([core::int i = null]) → dynamic;
+ external method method9({core::int i = null}) → dynamic;
}
abstract class B extends core::Object {
field core::int i;
synthetic constructor •() → self::B
;
- abstract method method3([core::int i]) → dynamic;
- abstract method method4({core::int i}) → dynamic;
- abstract method method5([core::int? i]) → dynamic;
- abstract method method6({core::int? i}) → dynamic;
- abstract method method7({required core::int i}) → dynamic;
+ abstract method method3([core::int i = null]) → dynamic;
+ abstract method method4({core::int i = null}) → dynamic;
+ abstract method method5([core::int? i = null]) → dynamic;
+ abstract method method6({core::int? i = null}) → dynamic;
+ abstract method method7({required core::int i = null}) → dynamic;
}
class C extends core::Object implements self::B {
field core::int i;
static final field dynamic _redirecting# = <dynamic>[self::C::factory3, self::C::factory4, self::C::factory5, self::C::factory6, self::C::factory7]/*isLegacy*/;
- constructor constructor1([core::int i]) → self::C
+ constructor constructor1([core::int i = null]) → self::C
;
- constructor constructor2({core::int i}) → self::C
+ constructor constructor2({core::int i = null}) → self::C
;
- constructor constructor3([core::int i]) → self::C
+ constructor constructor3([core::int i = null]) → self::C
;
- constructor constructor4({core::int i}) → self::C
+ constructor constructor4({core::int i = null}) → self::C
;
- constructor constructor5([core::int? i]) → self::C
+ constructor constructor5([core::int? i = null]) → self::C
;
- constructor constructor6({core::int? i}) → self::C
+ constructor constructor6({core::int? i = null}) → self::C
;
- constructor constructor7({required core::int i}) → self::C
+ constructor constructor7({required core::int i = null}) → self::C
;
static factory factory3([core::int i]) → self::C
return new self::C::constructor3(i);
@@ -174,15 +174,15 @@
;
static factory factory9({core::int i}) → self::C
;
- method method3([core::int i]) → dynamic
+ method method3([core::int i = null]) → dynamic
;
- method method4({core::int i}) → dynamic
+ method method4({core::int i = null}) → dynamic
;
- method method5([core::int? i]) → dynamic
+ method method5([core::int? i = null]) → dynamic
;
- method method6({core::int? i}) → dynamic
+ method method6({core::int? i = null}) → dynamic
;
- method method7({required core::int i}) → dynamic
+ method method7({required core::int i = null}) → dynamic
;
}
static method main() → void
diff --git a/pkg/front_end/testcases/nnbd/issue43276.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue43276.dart.weak.outline.expect
index 110f141..62b1633 100644
--- a/pkg/front_end/testcases/nnbd/issue43276.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue43276.dart.weak.outline.expect
@@ -17,7 +17,7 @@
class C extends core::Object {
static final field dynamic _redirecting# = <dynamic>[self::C::redirect]/*isLegacy*/;
- constructor gen({core::int i}) → self::C
+ constructor gen({core::int i = null}) → self::C
;
static factory fact({core::int i}) → self::C
;
diff --git a/pkg/front_end/testcases/nnbd/missing_required_named_parameter.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/missing_required_named_parameter.dart.weak.outline.expect
index e04c31a..b6d9901 100644
--- a/pkg/front_end/testcases/nnbd/missing_required_named_parameter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/missing_required_named_parameter.dart.weak.outline.expect
@@ -4,9 +4,9 @@
class A extends core::Object {
field ({required s: core::String}) → void f;
- constructor •({required core::int x}) → self::A
+ constructor •({required core::int x = null}) → self::A
;
- method foo({required core::int y}) → dynamic
+ method foo({required core::int y = null}) → dynamic
;
}
static field ({required s: core::String}) → void g;
diff --git a/pkg/front_end/testcases/nnbd/null_aware_chain.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/null_aware_chain.dart.weak.outline.expect
index 1570628..4e356a4 100644
--- a/pkg/front_end/testcases/nnbd/null_aware_chain.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/null_aware_chain.dart.weak.outline.expect
@@ -4,7 +4,7 @@
class Class extends core::Object {
field self::Class? field;
- constructor •([self::Class? field]) → self::Class
+ constructor •([self::Class? field = null]) → self::Class
;
get getter1() → self::Class
;
diff --git a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.outline.expect
index 3b7cf09..ede32af 100644
--- a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.outline.expect
@@ -20,7 +20,7 @@
return super.{core::Object::noSuchMethod}(invocation);
forwarding-stub forwarding-semi-stub operator /* signature-type: (self::Class) → core::bool */ ==(covariant-by-declaration core::Object o) → core::bool
return super.{core::Object::==}(o);
- abstract method toString({core::Object o}) → core::String;
+ abstract method toString({core::Object o = null}) → core::String;
}
static method main() → dynamic
;
diff --git a/pkg/front_end/testcases/nnbd/override_inference.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/override_inference.dart.weak.outline.expect
index 1dcea19..fcc5fcb 100644
--- a/pkg/front_end/testcases/nnbd/override_inference.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/override_inference.dart.weak.outline.expect
@@ -155,9 +155,9 @@
abstract method method4b<AT4b extends core::Object? = dynamic>(self::A::method4b::AT4b% x, covariant-by-class self::A::AT% y) → void;
abstract method method5a(core::int x, core::num y) → void;
abstract method method5b(core::int x, core::num y) → void;
- abstract method method6a({core::int x, core::num y}) → void;
- abstract method method6b({core::num y, core::int x}) → void;
- method method7a(core::Object? o, {core::Object? named}) → core::Object?
+ abstract method method6a({core::int x = null, core::num y = null}) → void;
+ abstract method method6b({core::num y = null, core::int x = null}) → void;
+ method method7a(core::Object? o, {core::Object? named = null}) → core::Object?
;
abstract get getter1a() → core::Object;
abstract get getter1b() → core::String;
@@ -202,9 +202,9 @@
abstract method method4b<BT4b extends core::Object? = dynamic>(self::B::method4b::BT4b% x, covariant-by-class self::B::BT% y) → void;
abstract method method5a(core::num x, core::int y) → void;
abstract method method5b(core::num x, core::int y) → void;
- abstract method method6a({core::Object x, core::num y}) → void;
- abstract method method6b({core::int x, core::Object y}) → void;
- abstract method method7a(FutureOr<dynamic>o, {FutureOr<dynamic>named}) → FutureOr<dynamic>;
+ abstract method method6a({core::Object x = null, core::num y = null}) → void;
+ abstract method method6b({core::int x = null, core::Object y = null}) → void;
+ abstract method method7a(FutureOr<dynamic>o, {FutureOr<dynamic>named = null}) → FutureOr<dynamic>;
abstract get getter1a() → core::String;
abstract get getter1b() → core::Object;
abstract get getter1c() → core::int;
@@ -254,14 +254,14 @@
abstract method method2a(core::Object? x) → void;
abstract method method2b(core::Object? x) → void;
abstract method method3a<CT3a extends core::Object? = dynamic>(self::C::method3a::CT3a% x) → void;
- abstract method method3b<CT3b extends core::Object? = dynamic>(self::C::method3b::CT3b% x, [dynamic y]) → void;
+ abstract method method3b<CT3b extends core::Object? = dynamic>(self::C::method3b::CT3b% x, [dynamic y = null]) → void;
abstract method method4a<CT4a extends core::Object? = dynamic>(self::C::method4a::CT4a% x, covariant-by-class core::num y) → void;
- abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, covariant-by-class core::num y, [dynamic z]) → void;
+ abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, covariant-by-class core::num y, [dynamic z = null]) → void;
abstract method method5a(invalid-type x, invalid-type y) → void;
- abstract method method5b(core::num x, core::num y, [invalid-type z]) → void;
- abstract method method6a({core::Object x, core::num y}) → void;
- abstract method method6b({core::int x, core::Object y, dynamic z}) → void;
- abstract method method7a(core::Object? o, {core::Object? named}) → core::Object?;
+ abstract method method5b(core::num x, core::num y, [invalid-type z = null]) → void;
+ abstract method method6a({core::Object x = null, core::num y = null}) → void;
+ abstract method method6b({core::int x = null, core::Object y = null, dynamic z = null}) → void;
+ abstract method method7a(core::Object? o, {core::Object? named = null}) → core::Object?;
abstract get getter1a() → core::String;
abstract get getter1b() → core::String;
abstract get getter1c() → invalid-type;
diff --git a/pkg/front_end/testcases/nnbd/platform_optional_parameters/main.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/platform_optional_parameters/main.dart.weak.outline.expect
index 1a1e26d..ede4192 100644
--- a/pkg/front_end/testcases/nnbd/platform_optional_parameters/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/platform_optional_parameters/main.dart.weak.outline.expect
@@ -50,11 +50,11 @@
class Class extends core::Object {
synthetic constructor •() → self2::Class
;
- method method([core::int i]) → void
+ method method([core::int i = null]) → void
;
@_in::patch
- external method patchedMethod([core::int i]) → void;
- method /* from org-dartlang-testcase:///patch_lib.dart */ _injectedMethod([core::int i]) → void
+ external method patchedMethod([core::int i = null]) → void;
+ method /* from org-dartlang-testcase:///patch_lib.dart */ _injectedMethod([core::int i = null]) → void
;
}
static method method([core::int i]) → void
diff --git a/pkg/front_end/testcases/nnbd/required.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/required.dart.weak.outline.expect
index 91153eb..d2d1598 100644
--- a/pkg/front_end/testcases/nnbd/required.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/required.dart.weak.outline.expect
@@ -15,18 +15,18 @@
class Class extends core::Object {
synthetic constructor •() → self::Class
;
- method method({core::int a = 42, required core::int b, required final core::int c, required covariant-by-declaration final core::int d}) → dynamic
+ method method({core::int a = 42, required core::int b = null, required final core::int c = null, required covariant-by-declaration final core::int d = null}) → dynamic
;
}
abstract class A extends core::Object {
synthetic constructor •() → self::A
;
- abstract method foo({core::int x}) → dynamic;
+ abstract method foo({core::int x = null}) → dynamic;
}
class B extends self::A {
synthetic constructor •() → self::B
;
- method foo({core::int x}) → dynamic
+ method foo({core::int x = null}) → dynamic
;
}
class C extends self::A {
diff --git a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.outline.expect
index 02e531b..245c869 100644
--- a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.outline.expect
@@ -5,7 +5,7 @@
class A extends core::Object {
field core::int zero;
field core::int? zeroOrNull;
- constructor •(core::int zero, [core::int? zeroOrNull]) → self::A
+ constructor •(core::int zero, [core::int? zeroOrNull = null]) → self::A
;
}
class Foo extends core::Object {
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_dill_out_in/in_out_in.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_dill_out_in/in_out_in.dart.weak.outline.expect
index cdeab6f..b48701e 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_dill_out_in/in_out_in.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_dill_out_in/in_out_in.dart.weak.outline.expect
@@ -149,7 +149,7 @@
class Super extends core::Object {
synthetic constructor •() → in_2::Super
;
- method nullabilityMethod(core::int i, {required core::int j}) → core::int
+ method nullabilityMethod(core::int i, {required core::int j = #C1}) → core::int
;
get nullabilityGetter() → core::int
;
@@ -161,13 +161,13 @@
abstract class SuperExtra extends core::Object {
synthetic constructor •() → in_2::SuperExtra
;
- method optionalArgumentsMethod(core::int i, [core::int? j]) → core::int
+ method optionalArgumentsMethod(core::int i, [core::int? j = #C1]) → core::int
;
}
abstract class SuperQ extends core::Object {
synthetic constructor •() → in_2::SuperQ
;
- method nullabilityMethod(core::int? i, {core::int? j}) → core::int?
+ method nullabilityMethod(core::int? i, {core::int? j = #C1}) → core::int?
;
get nullabilityGetter() → core::int?
;
@@ -224,7 +224,7 @@
const synthetic constructor •() → in_::_LegacyMixedIn&Object&Super*
: super core::Object::•()
;
- method /*isNonNullableByDefault, from org-dartlang-testcase:///in_out_in_lib1.dart */ nullabilityMethod(core::int i, {required core::int j}) → core::int
+ method /*isNonNullableByDefault, from org-dartlang-testcase:///in_out_in_lib1.dart */ nullabilityMethod(core::int i, {required core::int j = #C1}) → core::int
;
get /*isNonNullableByDefault, from org-dartlang-testcase:///in_out_in_lib1.dart */ nullabilityGetter() → core::int
;
@@ -252,7 +252,7 @@
const synthetic constructor •() → in_::_LegacyMixedInQ&Object&SuperQ*
: super core::Object::•()
;
- method /*isNonNullableByDefault, from org-dartlang-testcase:///in_out_in_lib1.dart */ nullabilityMethod(core::int? i, {core::int? j}) → core::int?
+ method /*isNonNullableByDefault, from org-dartlang-testcase:///in_out_in_lib1.dart */ nullabilityMethod(core::int? i, {core::int? j = #C1}) → core::int?
;
get /*isNonNullableByDefault, from org-dartlang-testcase:///in_out_in_lib1.dart */ nullabilityGetter() → core::int?
;
@@ -276,3 +276,7 @@
;
abstract member-signature method optionalArgumentsMethod(core::int* i, [core::int* j]) → core::int*; -> in_2::SuperExtra::optionalArgumentsMethod
}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_dill_in/in_out_in.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_dill_in/in_out_in.dart.weak.modular.expect
index 1f01c40..b620e23 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_dill_in/in_out_in.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_dill_in/in_out_in.dart.weak.modular.expect
@@ -221,9 +221,9 @@
synthetic constructor •() → in_::LegacyClass*
: super in_2::Super::•()
;
- abstract member-signature method nullabilityMethod(core::int* i, {core::int* j}) → core::int*; -> in_2::Super::nullabilityMethod
+ abstract member-signature method nullabilityMethod(core::int* i, {core::int* j = #C1}) → core::int*; -> in_2::Super::nullabilityMethod
abstract member-signature get nullabilityGetter() → core::int*; -> in_2::Super::nullabilityGetter
- abstract member-signature method optionalArgumentsMethod(core::int* i, [core::int* j]) → core::int*; -> in_2::SuperExtra::optionalArgumentsMethod
+ abstract member-signature method optionalArgumentsMethod(core::int* i, [core::int* j = #C1]) → core::int*; -> in_2::SuperExtra::optionalArgumentsMethod
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -240,9 +240,9 @@
synthetic constructor •() → in_::LegacyClassQ*
: super in_2::SuperQ::•()
;
- abstract member-signature method nullabilityMethod(core::int* i, {core::int* j}) → core::int*; -> in_2::SuperQ::nullabilityMethod
+ abstract member-signature method nullabilityMethod(core::int* i, {core::int* j = #C1}) → core::int*; -> in_2::SuperQ::nullabilityMethod
abstract member-signature get nullabilityGetter() → core::int*; -> in_2::SuperQ::nullabilityGetter
- abstract member-signature method optionalArgumentsMethod(core::int* i, [core::int* j]) → core::int*; -> in_2::SuperExtra::optionalArgumentsMethod
+ abstract member-signature method optionalArgumentsMethod(core::int* i, [core::int* j = #C1]) → core::int*; -> in_2::SuperExtra::optionalArgumentsMethod
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -259,7 +259,7 @@
const synthetic constructor •() → in_::_LegacyMixedIn&Object&Super*
: super core::Object::•()
;
- mixin-super-stub method nullabilityMethod(core::int* i, {core::int* j}) → core::int*
+ mixin-super-stub method nullabilityMethod(core::int* i, {core::int* j = #C1}) → core::int*
return super.{in_2::Super::nullabilityMethod}(i, j: j);
mixin-super-stub get nullabilityGetter() → core::int*
return super.{in_2::Super::nullabilityGetter};
@@ -282,13 +282,13 @@
synthetic constructor •() → in_::LegacyMixedIn*
: super in_::_LegacyMixedIn&Object&Super::•()
;
- abstract member-signature method optionalArgumentsMethod(core::int* i, [core::int* j]) → core::int*; -> in_2::SuperExtra::optionalArgumentsMethod
+ abstract member-signature method optionalArgumentsMethod(core::int* i, [core::int* j = #C1]) → core::int*; -> in_2::SuperExtra::optionalArgumentsMethod
}
abstract class _LegacyMixedInQ&Object&SuperQ = core::Object with in_2::SuperQ /*isAnonymousMixin,hasConstConstructor*/ {
const synthetic constructor •() → in_::_LegacyMixedInQ&Object&SuperQ*
: super core::Object::•()
;
- mixin-super-stub method nullabilityMethod(core::int* i, {core::int* j}) → core::int*
+ mixin-super-stub method nullabilityMethod(core::int* i, {core::int* j = #C1}) → core::int*
return super.{in_2::SuperQ::nullabilityMethod}(i, j: j);
mixin-super-stub get nullabilityGetter() → core::int*
return super.{in_2::SuperQ::nullabilityGetter};
@@ -311,5 +311,9 @@
synthetic constructor •() → in_::LegacyMixedInQ*
: super in_::_LegacyMixedInQ&Object&SuperQ::•()
;
- abstract member-signature method optionalArgumentsMethod(core::int* i, [core::int* j]) → core::int*; -> in_2::SuperExtra::optionalArgumentsMethod
+ abstract member-signature method optionalArgumentsMethod(core::int* i, [core::int* j = #C1]) → core::int*; -> in_2::SuperExtra::optionalArgumentsMethod
+}
+
+constants {
+ #C1 = null
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_dill_in/in_out_in.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_dill_in/in_out_in.dart.weak.outline.expect
index 386b09f..fbbade0 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_dill_in/in_out_in.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_dill_in/in_out_in.dart.weak.outline.expect
@@ -230,7 +230,7 @@
class Super extends core::Object {
synthetic constructor •() → in_2::Super
;
- method nullabilityMethod(core::int i, {required core::int j}) → core::int
+ method nullabilityMethod(core::int i, {required core::int j = #C1}) → core::int
;
get nullabilityGetter() → core::int
;
@@ -242,13 +242,13 @@
abstract class SuperExtra extends core::Object {
synthetic constructor •() → in_2::SuperExtra
;
- method optionalArgumentsMethod(core::int i, [core::int? j]) → core::int
+ method optionalArgumentsMethod(core::int i, [core::int? j = #C1]) → core::int
;
}
abstract class SuperQ extends core::Object {
synthetic constructor •() → in_2::SuperQ
;
- method nullabilityMethod(core::int? i, {core::int? j}) → core::int?
+ method nullabilityMethod(core::int? i, {core::int? j = #C1}) → core::int?
;
get nullabilityGetter() → core::int?
;
@@ -257,3 +257,7 @@
method optionalArgumentsMethod(core::int? i) → core::int?
;
}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_in.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_in.dart.weak.outline.expect
index 7e98c01..2ea0668 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_in.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/in_out_in.dart.weak.outline.expect
@@ -144,7 +144,7 @@
abstract class SuperExtra extends core::Object {
synthetic constructor •() → in_2::SuperExtra
;
- method optionalArgumentsMethod(core::int i, [core::int? j]) → core::int
+ method optionalArgumentsMethod(core::int i, [core::int? j = null]) → core::int
;
}
abstract class SuperQ extends core::Object {
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.outline.expect
index 8ed2bcc..a036c93 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.outline.expect
@@ -46,7 +46,7 @@
final field iss::Iterable::E% element;
constructor •(iss::Iterable::E% element) → iss::Iterable<iss::Iterable::E%>
;
- method singleWhere((iss::Iterable::E%) → core::bool test, {covariant-by-class () →? iss::Iterable::E% orElse}) → iss::Iterable::E%
+ method singleWhere((iss::Iterable::E%) → core::bool test, {covariant-by-class () →? iss::Iterable::E% orElse = null}) → iss::Iterable::E%
;
}
static method foo(() → iss::Map<core::String, core::String> f) → void
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.modular.expect
index 35340a8..dbabb6a 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.modular.expect
@@ -14,7 +14,7 @@
synthetic constructor •() → self::_TestSchedulerBinding&BindingBase&SchedulerBinding*
: super fou::BindingBase::•()
;
- abstract member-signature method registerSignalServiceExtension({core::String* name, () →* asy::Future<Null>* callback}) → void; -> fou::BindingBase::registerSignalServiceExtension
+ abstract member-signature method registerSignalServiceExtension({core::String* name = #C1, () →* asy::Future<Null>* callback = #C1}) → void; -> fou::BindingBase::registerSignalServiceExtension
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -37,3 +37,7 @@
;
}
static method main() → dynamic {}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.outline.expect
index 135d07e..6bee12f 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.outline.expect
@@ -54,7 +54,7 @@
abstract class BindingBase extends core::Object {
synthetic constructor •() → fou::BindingBase
;
- method registerSignalServiceExtension({required core::String name, required () → asy::Future<Null> callback}) → void
+ method registerSignalServiceExtension({required core::String name = #C1, required () → asy::Future<Null> callback = #C1}) → void
;
}
@@ -133,3 +133,8 @@
additionalExports = (ser::ServicesBinding)
export "org-dartlang-testcase:///services_binding_lib.dart";
+
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.modular.expect
index e31e167..25f2899 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.modular.expect
@@ -110,10 +110,11 @@
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
- abstract forwarding-stub method method2([covariant-by-declaration core::String* a, core::num* b]) → dynamic;
+ abstract forwarding-stub method method2([covariant-by-declaration core::String* a = #C2, core::num* b = #C2]) → dynamic;
}
static method main() → dynamic {}
constants {
#C1 = "hello"
+ #C2 = null
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.outline.expect
index 794d06d..7f95ece 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.outline.expect
@@ -147,7 +147,7 @@
abstract class C2 extends core::Object {
synthetic constructor •() → mai::C2
;
- abstract method method2([core::String a]) → dynamic;
+ abstract method method2([core::String a = #C2]) → dynamic;
}
abstract class C3 extends core::Object implements mai::C1, mai::C2 {
synthetic constructor •() → mai::C3
@@ -157,7 +157,7 @@
abstract class C4 extends core::Object {
synthetic constructor •() → mai::C4
;
- abstract method method2([covariant-by-declaration core::String a]) → dynamic;
+ abstract method method2([covariant-by-declaration core::String a = #C2]) → dynamic;
}
abstract class C5 extends mai::C3 implements mai::C4 {
synthetic constructor •() → mai::C5
@@ -167,9 +167,10 @@
abstract class C7 extends core::Object {
synthetic constructor •() → mai::C7
;
- abstract method method2([core::String a, core::num b]) → dynamic;
+ abstract method method2([core::String a = #C2, core::num b = #C2]) → dynamic;
}
constants {
#C1 = "hello"
+ #C2 = null
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.outline.expect
index 4e1eec5..e07fd30 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.outline.expect
@@ -147,7 +147,7 @@
abstract class C2 extends core::Object {
synthetic constructor •() → mai::C2
;
- abstract method method2([core::String a]) → dynamic;
+ abstract method method2([core::String a = null]) → dynamic;
}
abstract class C3 extends core::Object implements mai::C1, mai::C2 {
synthetic constructor •() → mai::C3
@@ -157,7 +157,7 @@
abstract class C4 extends core::Object {
synthetic constructor •() → mai::C4
;
- abstract method method2([covariant-by-declaration core::String a]) → dynamic;
+ abstract method method2([covariant-by-declaration core::String a = null]) → dynamic;
}
abstract class C5 extends mai::C3 implements mai::C4 {
synthetic constructor •() → mai::C5
@@ -167,5 +167,5 @@
abstract class C7 extends core::Object {
synthetic constructor •() → mai::C7
;
- abstract method method2([core::String a, core::num b]) → dynamic;
+ abstract method method2([core::String a = null, core::num b = null]) → dynamic;
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.outline.expect
index e706863..09e5ea1 100644
--- a/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.outline.expect
@@ -18,17 +18,17 @@
;
method method6a(core::int* a, core::int* b) → core::int*
;
- method method6b(core::int* a, [core::int* b]) → core::int*
+ method method6b(core::int* a, [core::int* b = null]) → core::int*
;
- method method6c([core::int* a, core::int* b]) → core::int*
+ method method6c([core::int* a = null, core::int* b = null]) → core::int*
;
method method8a(core::int* a, {core::int* b = 0}) → core::int*
;
- method method8b({core::int* a, core::int* b = 0}) → core::int*
+ method method8b({core::int* a = null, core::int* b = 0}) → core::int*
;
- method method10a(core::int* a, {core::int* b}) → core::int*
+ method method10a(core::int* a, {core::int* b = null}) → core::int*
;
- method method10b({core::int* a, core::int* b}) → core::int*
+ method method10b({core::int* a = null, core::int* b = null}) → core::int*
;
get getter3() → core::int*
;
@@ -101,19 +101,19 @@
abstract method method3() → core::int;
abstract method method4() → core::int?;
abstract method method5a(core::int a, core::int? b) → core::int;
- abstract method method5b(core::int a, [core::int? b]) → core::int;
- abstract method method5c([core::int a = 0, core::int? b]) → core::int;
+ abstract method method5b(core::int a, [core::int? b = null]) → core::int;
+ abstract method method5c([core::int a = 0, core::int? b = null]) → core::int;
abstract method method6a(core::int? a, core::int b) → core::int?;
abstract method method6b(core::int? a, [core::int b = 0]) → core::int?;
- abstract method method6c([core::int? a, core::int b = 0]) → core::int?;
- abstract method method7a(core::int a, {core::int? b}) → core::int;
- abstract method method7b({core::int a = 0, core::int? b}) → core::int;
+ abstract method method6c([core::int? a = null, core::int b = 0]) → core::int?;
+ abstract method method7a(core::int a, {core::int? b = null}) → core::int;
+ abstract method method7b({core::int a = 0, core::int? b = null}) → core::int;
abstract method method8a(core::int? a, {core::int b = 0}) → core::int?;
- abstract method method8b({core::int? a, core::int b = 0}) → core::int?;
- abstract method method9a(core::int a, {required core::int? b}) → core::int;
- abstract method method9b({required core::int a, required core::int? b}) → core::int;
- abstract method method10a(core::int? a, {required core::int b}) → core::int?;
- abstract method method10b({required core::int? a, required core::int b}) → core::int?;
+ abstract method method8b({core::int? a = null, core::int b = 0}) → core::int?;
+ abstract method method9a(core::int a, {required core::int? b = null}) → core::int;
+ abstract method method9b({required core::int a = null, required core::int? b = null}) → core::int;
+ abstract method method10a(core::int? a, {required core::int b = null}) → core::int?;
+ abstract method method10b({required core::int? a = null, required core::int b = null}) → core::int?;
abstract get getter1() → core::int?;
abstract get getter2() → core::int;
abstract get getter3() → core::int;
@@ -152,17 +152,17 @@
;
method method5a(core::int a, core::int? b) → core::int
;
- method method5b(core::int a, [core::int? b]) → core::int
+ method method5b(core::int a, [core::int? b = null]) → core::int
;
- method method5c([core::int a = 0, core::int? b]) → core::int
+ method method5c([core::int a = 0, core::int? b = null]) → core::int
;
- method method7a(core::int a, {core::int? b}) → core::int
+ method method7a(core::int a, {core::int? b = null}) → core::int
;
- method method7b({core::int a = 0, core::int? b}) → core::int
+ method method7b({core::int a = 0, core::int? b = null}) → core::int
;
- method method9a(core::int a, {required core::int? b}) → core::int
+ method method9a(core::int a, {required core::int? b = null}) → core::int
;
- method method9b({required core::int a, required core::int? b}) → core::int
+ method method9b({required core::int a = null, required core::int? b = null}) → core::int
;
get getter1() → core::int
;
diff --git a/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.outline.expect
index 01c1893..9ef4cfb 100644
--- a/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.outline.expect
@@ -15,17 +15,17 @@
abstract method method1() → core::int;
abstract method method2() → core::int?;
abstract method method3a(core::int a, core::int b) → core::int;
- abstract method method3b(core::int a, [core::int b]) → core::int;
- abstract method method3c([core::int a, core::int b]) → core::int;
+ abstract method method3b(core::int a, [core::int b = null]) → core::int;
+ abstract method method3c([core::int a = null, core::int b = null]) → core::int;
abstract method method4a(core::int? a, core::int? b) → core::int?;
- abstract method method4b(core::int? a, [core::int? b]) → core::int?;
- abstract method method4c([core::int? a, core::int? b]) → core::int?;
+ abstract method method4b(core::int? a, [core::int? b = null]) → core::int?;
+ abstract method method4c([core::int? a = null, core::int? b = null]) → core::int?;
abstract method method5a(core::int a, {core::int b = 0}) → core::int;
abstract method method5b({core::int a = 0, core::int b = 0}) → core::int;
- abstract method method5c({required core::int a, required core::int b}) → core::int;
- abstract method method6a(core::int? a, {core::int? b}) → core::int?;
- abstract method method6b({core::int? a, core::int? b}) → core::int?;
- abstract method method6c({required core::int? a, required core::int? b}) → core::int?;
+ abstract method method5c({required core::int a = null, required core::int b = null}) → core::int;
+ abstract method method6a(core::int? a, {core::int? b = null}) → core::int?;
+ abstract method method6b({core::int? a = null, core::int? b = null}) → core::int?;
+ abstract method method6c({required core::int? a = null, required core::int? b = null}) → core::int?;
abstract get getter1() → core::int;
abstract get getter2() → core::int?;
abstract set setter1(core::int value) → void;
@@ -107,21 +107,21 @@
;
method method4a(core::int? a, core::int? b) → core::int?
;
- method method4b(core::int? a, [core::int? b]) → core::int?
+ method method4b(core::int? a, [core::int? b = null]) → core::int?
;
- method method4c([core::int? a, core::int? b]) → core::int?
+ method method4c([core::int? a = null, core::int? b = null]) → core::int?
;
method method5a(core::int a, {core::int b = 0}) → core::int
;
method method5b({core::int a = 0, core::int b = 0}) → core::int
;
- method method5c({required core::int a, required core::int b}) → core::int
+ method method5c({required core::int a = null, required core::int b = null}) → core::int
;
- method method6a(core::int? a, {core::int? b}) → core::int?
+ method method6a(core::int? a, {core::int? b = null}) → core::int?
;
- method method6b({core::int? a, core::int? b}) → core::int?
+ method method6b({core::int? a = null, core::int? b = null}) → core::int?
;
- method method6c({required core::int? a, required core::int? b}) → core::int?
+ method method6c({required core::int? a = null, required core::int? b = null}) → core::int?
;
get getter1() → core::int
;
@@ -189,27 +189,27 @@
;
method method3a(core::int* a, core::int* b) → core::int*
;
- method method3b(core::int* a, [core::int* b]) → core::int*
+ method method3b(core::int* a, [core::int* b = null]) → core::int*
;
- method method3c([core::int* a, core::int* b]) → core::int*
+ method method3c([core::int* a = null, core::int* b = null]) → core::int*
;
method method4a(core::int* a, core::int* b) → core::int*
;
- method method4b(core::int* a, [core::int* b]) → core::int*
+ method method4b(core::int* a, [core::int* b = null]) → core::int*
;
- method method4c([core::int* a, core::int* b]) → core::int*
+ method method4c([core::int* a = null, core::int* b = null]) → core::int*
;
- method method5a(core::int* a, {core::int* b}) → core::int*
+ method method5a(core::int* a, {core::int* b = null}) → core::int*
;
- method method5b({core::int* a, core::int* b}) → core::int*
+ method method5b({core::int* a = null, core::int* b = null}) → core::int*
;
- method method5c({core::int* a, core::int* b}) → core::int*
+ method method5c({core::int* a = null, core::int* b = null}) → core::int*
;
- method method6a(core::int* a, {core::int* b}) → core::int*
+ method method6a(core::int* a, {core::int* b = null}) → core::int*
;
- method method6b({core::int* a, core::int* b}) → core::int*
+ method method6b({core::int* a = null, core::int* b = null}) → core::int*
;
- method method6c({core::int* a, core::int* b}) → core::int*
+ method method6c({core::int* a = null, core::int* b = null}) → core::int*
;
get getter1() → core::int*
;
diff --git a/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.modular.expect
index f168a4e..e52566f 100644
--- a/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.modular.expect
@@ -11,7 +11,7 @@
synthetic constructor •() → self::_RenderAnimatedOpacity&RenderProxyBox&RenderProxyBoxMixin
: super mai::RenderProxyBox::•()
;
- mixin-super-stub method hitTestChildren(mai::BoxHitTestResult result, {required mai::Offset position}) → core::bool
+ mixin-super-stub method hitTestChildren(mai::BoxHitTestResult result, {required mai::Offset position = #C1}) → core::bool
return super.{mai::RenderProxyBoxMixin::hitTestChildren}(result, position: position);
}
abstract class _RenderAnimatedOpacity&RenderProxyBox&RenderProxyBoxMixin&RenderAnimatedOpacityMixin = self::_RenderAnimatedOpacity&RenderProxyBox&RenderProxyBoxMixin with self::RenderAnimatedOpacityMixin<mai::RenderBox> /*isAnonymousMixin*/ {
@@ -27,3 +27,7 @@
static method main() → dynamic {
new self::RenderAnimatedOpacity::•();
}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.outline.expect
index c282428..1d90524 100644
--- a/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.outline.expect
@@ -64,9 +64,9 @@
abstract class RenderBox extends mai::RenderObject {
synthetic constructor •() → mai::RenderBox
;
- method hitTest(mai::BoxHitTestResult result, {required mai::Offset position}) → core::bool
+ method hitTest(mai::BoxHitTestResult result, {required mai::Offset position = #C1}) → core::bool
;
- method hitTestChildren(mai::BoxHitTestResult result, {required mai::Offset position}) → core::bool
+ method hitTestChildren(mai::BoxHitTestResult result, {required mai::Offset position = #C1}) → core::bool
;
}
abstract class RenderObjectWithChildMixin<ChildType extends mai::RenderObject> extends mai::RenderObject /*isMixinDeclaration*/ {
@@ -79,8 +79,8 @@
;
}
abstract class RenderProxyBoxMixin<T extends mai::RenderBox> extends mai::_RenderProxyBoxMixin&RenderBox&RenderObjectWithChildMixin<mai::RenderProxyBoxMixin::T> /*isMixinDeclaration*/ {
- @#C1
- method hitTestChildren(mai::BoxHitTestResult result, {required mai::Offset position}) → core::bool
+ @#C2
+ method hitTestChildren(mai::BoxHitTestResult result, {required mai::Offset position = #C1}) → core::bool
;
}
abstract class _RenderProxyBox&RenderBox&RenderObjectWithChildMixin extends mai::RenderBox implements mai::RenderObjectWithChildMixin<mai::RenderBox> /*isAnonymousMixin,isEliminatedMixin*/ {
@@ -95,8 +95,8 @@
synthetic constructor •() → mai::_RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin
: super mai::_RenderProxyBox&RenderBox&RenderObjectWithChildMixin::•()
;
- @#C1
- method hitTestChildren(mai::BoxHitTestResult result, {required mai::Offset position}) → core::bool
+ @#C2
+ method hitTestChildren(mai::BoxHitTestResult result, {required mai::Offset position = #C1}) → core::bool
;
}
class RenderProxyBox extends mai::_RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin {
@@ -105,5 +105,6 @@
}
constants {
- #C1 = core::_Override {}
+ #C1 = null
+ #C2 = core::_Override {}
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/nsm_from_opt_in.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/nsm_from_opt_in.dart.weak.outline.expect
index d463ddf..a0aeef1 100644
--- a/pkg/front_end/testcases/nnbd_mixed/nsm_from_opt_in.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/nsm_from_opt_in.dart.weak.outline.expect
@@ -48,7 +48,7 @@
abstract class C2 extends core::Object {
synthetic constructor •() → self::C2*
;
- abstract method method(core::int* i, {dynamic optional}) → core::int*;
+ abstract method method(core::int* i, {dynamic optional = null}) → core::int*;
abstract method genericMethod1<T extends core::Object* = dynamic>(self::C2::genericMethod1::T* t) → self::C2::genericMethod1::T*;
abstract method genericMethod2<T extends core::Object*>(self::C2::genericMethod2::T* t) → self::C2::genericMethod2::T*;
abstract method genericMethod3<T extends core::Object*>(self::C2::genericMethod3::T* t) → self::C2::genericMethod3::T*;
@@ -93,7 +93,7 @@
abstract class C1 extends core::Object {
synthetic constructor •() → nsm::C1
;
- abstract method method(core::int? i, {dynamic optional}) → core::int;
+ abstract method method(core::int? i, {dynamic optional = null}) → core::int;
abstract method genericMethod1<T extends core::Object? = dynamic>(nsm::C1::genericMethod1::T% t) → nsm::C1::genericMethod1::T%;
abstract method genericMethod2<T extends core::Object?>(nsm::C1::genericMethod2::T% t) → nsm::C1::genericMethod2::T%;
abstract method genericMethod3<T extends core::Object>(nsm::C1::genericMethod3::T t) → nsm::C1::genericMethod3::T;
diff --git a/pkg/front_end/testcases/nnbd_mixed/required_name_override.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/required_name_override.dart.weak.outline.expect
index 0817c84..327d98f 100644
--- a/pkg/front_end/testcases/nnbd_mixed/required_name_override.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/required_name_override.dart.weak.outline.expect
@@ -25,7 +25,7 @@
class B extends core::Object {
synthetic constructor •() → self::B
;
- method test_default({core::int? i}) → void
+ method test_default({core::int? i = null}) → void
;
method test_nondefault({core::int? i = 1}) → void
;
@@ -33,11 +33,11 @@
class A extends self::B implements req::C {
synthetic constructor •() → self::A
;
- method test_default({required core::int? i}) → void
+ method test_default({required core::int? i = null}) → void
;
- method test_nondefault({required core::int? i}) → void
+ method test_nondefault({required core::int? i = null}) → void
;
- method test_legacy({required core::int? i}) → void
+ method test_legacy({required core::int? i = null}) → void
;
abstract member-signature operator /*isLegacy*/ ==(dynamic other) → core::bool*; -> core::Object::==
}
@@ -51,7 +51,7 @@
class C extends core::Object {
synthetic constructor •() → req::C*
;
- method test_legacy({core::int* i}) → void
+ method test_legacy({core::int* i = null}) → void
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.outline.expect
index 1e8de64..a448ffc 100644
--- a/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.outline.expect
@@ -8,7 +8,7 @@
class Super extends core::Object {
synthetic constructor •() → self::Super
;
- method method({required covariant-by-declaration core::int named}) → void
+ method method({required covariant-by-declaration core::int named = null}) → void
;
}
abstract class _Class&Super&Mixin = self::Super with req::Mixin /*isAnonymousMixin*/ {
@@ -26,7 +26,7 @@
class SubClass extends self::Class {
synthetic constructor •() → self::SubClass
;
- method method({required covariant-by-declaration core::int named}) → void
+ method method({required covariant-by-declaration core::int named = null}) → void
;
}
static method main() → dynamic
@@ -37,7 +37,7 @@
import "dart:core" as core;
abstract class Mixin extends core::Object /*isMixinDeclaration*/ {
- method method({core::int* named}) → void
+ method method({core::int* named = null}) → void
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.outline.expect
index d7affcd..344c08e 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.outline.expect
@@ -43,7 +43,7 @@
class MockCat3 extends self::MockCat2 implements self::Cat {
synthetic constructor •() → self::MockCat3*
;
- no-such-method-forwarder method eatFood(core::String* food, {core::double* amount}) → core::bool*
+ no-such-method-forwarder method eatFood(core::String* food, {core::double* amount = null}) → core::bool*
return this.{self::MockCat2::noSuchMethod}(new core::_InvocationMirror::_withType(#eatFood, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[food]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#amount: amount}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
}
class MockCat4 extends self::MockCat2 implements self::HungryCat {
@@ -55,7 +55,7 @@
abstract class HungryCat extends core::Object {
synthetic constructor •() → self::HungryCat*
;
- abstract method eatFood(core::String* food, {core::double* amount, core::double* yetAnother}) → core::bool*;
+ abstract method eatFood(core::String* food, {core::double* amount = null, core::double* yetAnother = null}) → core::bool*;
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.outline.expect
index 595f2f9..8be6aa2 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.outline.expect
@@ -10,7 +10,7 @@
;
abstract set foo(core::int* value) → void;
abstract get bar() → core::int*;
- abstract method baz(core::int* x, {core::String* y, core::double* z}) → void;
+ abstract method baz(core::int* x, {core::String* y = null, core::double* z = null}) → void;
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/regress/issue_32660.dart.weak.outline.expect b/pkg/front_end/testcases/regress/issue_32660.dart.weak.outline.expect
index d282494..d6cfde1 100644
--- a/pkg/front_end/testcases/regress/issue_32660.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/regress/issue_32660.dart.weak.outline.expect
@@ -44,7 +44,7 @@
class B extends core::Object {
synthetic constructor •() → self::B*
;
- method foo(core::int* x, {core::int* y}) → dynamic
+ method foo(core::int* x, {core::int* y = null}) → dynamic
;
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -83,7 +83,7 @@
class E extends self::D {
synthetic constructor •() → self::E*
;
- abstract method foo(core::int* x, {core::int* y}) → dynamic;
+ abstract method foo(core::int* x, {core::int* y = null}) → dynamic;
method noSuchMethod(core::Invocation* i) → dynamic
;
}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.outline.expect
index d5ecfdf..f427dbb 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.outline.expect
@@ -23,7 +23,7 @@
;
method f1(covariant-by-class core::int* x) → void
;
- method f2(covariant-by-class core::int* x, [covariant-by-class self::C::U* y]) → void
+ method f2(covariant-by-class core::int* x, [covariant-by-class self::C::U* y = null]) → void
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -41,7 +41,7 @@
;
method f1(covariant-by-class core::int* x) → void
;
- method f2(covariant-by-class core::int* x, [covariant-by-class self::D::U* y]) → void
+ method f2(covariant-by-class core::int* x, [covariant-by-class self::D::U* y = null]) → void
;
}
static method g1(self::C<core::num*>* c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.outline.expect
index 2528b84..232826f 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.outline.expect
@@ -26,8 +26,8 @@
abstract class I<T extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::I<self::I::T*>*
;
- abstract method f([covariant-by-class self::I::T* x]) → void;
- abstract method g({covariant-by-class self::I::T* x}) → void;
+ abstract method f([covariant-by-class self::I::T* x = null]) → void;
+ abstract method g({covariant-by-class self::I::T* x = null}) → void;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.outline.expect
index 06e1b40..3139116 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.outline.expect
@@ -7,7 +7,7 @@
;
method f(covariant-by-class self::B::T* x) → void
;
- method g({covariant-by-class self::B::T* x}) → void
+ method g({covariant-by-class self::B::T* x = null}) → void
;
method h<covariant-by-class U extends self::B::T*>() → void
;
diff --git a/pkg/front_end/testcases/super_parameters/default_values.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/default_values.dart.weak.outline.expect
index fd3f672..e490058 100644
--- a/pkg/front_end/testcases/super_parameters/default_values.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/super_parameters/default_values.dart.weak.outline.expect
@@ -67,7 +67,7 @@
;
}
class C5 extends self::S5 {
- constructor •([core::int x]) → self::C5
+ constructor •([core::int x = null]) → self::C5
;
}
class S6 extends core::Object {
@@ -77,11 +77,11 @@
}
class C6 extends self::S6 {
field core::int? b;
- constructor •([core::int? x]) → self::C6
+ constructor •([core::int? x = null]) → self::C6
;
}
class D6 extends self::C6 {
- constructor •([core::int x]) → self::D6
+ constructor •([core::int x = null]) → self::D6
;
}
class S7 extends core::Object {
@@ -134,7 +134,7 @@
;
}
class Bp extends self::Ap {
- constructor •([core::int x]) → self::Bp
+ constructor •([core::int x = null]) → self::Bp
;
constructor req(core::int x) → self::Bp
;
@@ -144,9 +144,9 @@
;
}
class Bn extends self::An {
- constructor •({core::int x}) → self::Bn
+ constructor •({core::int x = null}) → self::Bn
;
- constructor req({required core::int x}) → self::Bn
+ constructor req({required core::int x = null}) → self::Bn
;
}
static method main() → dynamic
diff --git a/pkg/front_end/testcases/super_parameters/issue48142.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/issue48142.dart.weak.outline.expect
index 00d1860..c9f3c12 100644
--- a/pkg/front_end/testcases/super_parameters/issue48142.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/super_parameters/issue48142.dart.weak.outline.expect
@@ -20,15 +20,15 @@
;
}
class C21 extends self::S2 {
- constructor •({dynamic foo, core::String one = "1", dynamic bar, dynamic baz, core::int three = 3, core::num five = 3.14}) → self::C21
+ constructor •({dynamic foo = null, core::String one = "1", dynamic bar = null, dynamic baz = null, core::int three = 3, core::num five = 3.14}) → self::C21
;
}
class C22 extends self::S2 {
- constructor •({dynamic foo, core::List<core::String> six = const <core::String>["six"], dynamic bar, dynamic baz, core::double four = 4.0, core::bool two = false}) → self::C22
+ constructor •({dynamic foo = null, core::List<core::String> six = const <core::String>["six"], dynamic bar = null, dynamic baz = null, core::double four = 4.0, core::bool two = false}) → self::C22
;
}
class C23 extends self::S2 {
- constructor •({core::int three = 3, dynamic foo, core::String one = "1", core::double four = 4.0, dynamic bar, core::bool two = false, dynamic baz}) → self::C23
+ constructor •({core::int three = 3, dynamic foo = null, core::String one = "1", core::double four = 4.0, dynamic bar = null, core::bool two = false, dynamic baz = null}) → self::C23
;
}
static method main() → dynamic
diff --git a/pkg/front_end/testcases/super_parameters/issue48642.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/issue48642.dart.weak.outline.expect
index 0c84a13..e395e95 100644
--- a/pkg/front_end/testcases/super_parameters/issue48642.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/super_parameters/issue48642.dart.weak.outline.expect
@@ -51,17 +51,17 @@
;
}
class A1 extends core::Object {
- constructor •({dynamic x, dynamic y}) → self::A1
+ constructor •({dynamic x = null, dynamic y = null}) → self::A1
;
}
class B1 extends self::A1 {
- constructor foo({dynamic x}) → self::B1
+ constructor foo({dynamic x = null}) → self::B1
;
- constructor bar({dynamic x}) → self::B1
+ constructor bar({dynamic x = null}) → self::B1
;
}
class A2 extends core::Object {
- constructor •(dynamic x, {dynamic y}) → self::A2
+ constructor •(dynamic x, {dynamic y = null}) → self::A2
;
}
class B2 extends self::A2 {
@@ -71,28 +71,28 @@
;
}
class A3 extends core::Object {
- constructor •(dynamic x, {dynamic y}) → self::A3
+ constructor •(dynamic x, {dynamic y = null}) → self::A3
;
}
class B3 extends self::A3 {
- constructor foo({dynamic y}) → self::B3
+ constructor foo({dynamic y = null}) → self::B3
;
- constructor bar({dynamic y}) → self::B3
+ constructor bar({dynamic y = null}) → self::B3
;
}
class A4 extends core::Object /*hasConstConstructor*/ {
- const constructor •({dynamic x, dynamic y}) → self::A4
+ const constructor •({dynamic x = null, dynamic y = null}) → self::A4
: super core::Object::•()
;
}
class B4 extends self::A4 {
- constructor foo({dynamic x}) → self::B4
+ constructor foo({dynamic x = null}) → self::B4
;
- constructor bar({dynamic x}) → self::B4
+ constructor bar({dynamic x = null}) → self::B4
;
}
class A5 extends core::Object /*hasConstConstructor*/ {
- const constructor •(dynamic x, {dynamic y}) → self::A5
+ const constructor •(dynamic x, {dynamic y = null}) → self::A5
: super core::Object::•()
;
}
@@ -103,26 +103,26 @@
;
}
class A6 extends core::Object /*hasConstConstructor*/ {
- const constructor •(dynamic x, {dynamic y}) → self::A6
+ const constructor •(dynamic x, {dynamic y = null}) → self::A6
: super core::Object::•()
;
}
class B6 extends self::A6 {
- constructor foo({dynamic y}) → self::B6
+ constructor foo({dynamic y = null}) → self::B6
;
- constructor bar({dynamic y}) → self::B6
+ constructor bar({dynamic y = null}) → self::B6
;
}
class A7 extends core::Object /*hasConstConstructor*/ {
- const constructor •({dynamic x, dynamic y}) → self::A7
+ const constructor •({dynamic x = null, dynamic y = null}) → self::A7
: super core::Object::•()
;
}
class B7 extends self::A7 /*hasConstConstructor*/ {
- const constructor foo({dynamic x}) → self::B7
+ const constructor foo({dynamic x = null}) → self::B7
: super self::A7::•(y: new self::Test::foo(), x: x)
;
- const constructor bar({dynamic x}) → self::B7
+ const constructor bar({dynamic x = null}) → self::B7
: super self::A7::•(y: invalid-expression "pkg/front_end/testcases/super_parameters/issue48642.dart:70:42: Error: Cannot invoke a non-'const' factory where a const expression is expected.
Try using a constructor or factory that is 'const'.
const B7.bar({super.x}) : super(y: new Test.bar()); // Error.
@@ -130,7 +130,7 @@
;
}
class A8 extends core::Object /*hasConstConstructor*/ {
- const constructor •(dynamic x, {dynamic y}) → self::A8
+ const constructor •(dynamic x, {dynamic y = null}) → self::A8
: super core::Object::•()
;
}
@@ -146,15 +146,15 @@
;
}
class A9 extends core::Object /*hasConstConstructor*/ {
- const constructor •(dynamic x, {dynamic y}) → self::A9
+ const constructor •(dynamic x, {dynamic y = null}) → self::A9
: super core::Object::•()
;
}
class B9 extends self::A9 /*hasConstConstructor*/ {
- const constructor foo({dynamic y}) → self::B9
+ const constructor foo({dynamic y = null}) → self::B9
: super self::A9::•(new self::Test::foo(), y: y)
;
- const constructor bar({dynamic y}) → self::B9
+ const constructor bar({dynamic y = null}) → self::B9
: super self::A9::•(invalid-expression "pkg/front_end/testcases/super_parameters/issue48642.dart:88:39: Error: Cannot invoke a non-'const' factory where a const expression is expected.
Try using a constructor or factory that is 'const'.
const B9.bar({super.y}) : super(new Test.bar()); // Error.
diff --git a/pkg/front_end/testcases/super_parameters/issue48708.dart.strong.expect b/pkg/front_end/testcases/super_parameters/issue48708.dart.strong.expect
index bbbaeed..05ade25 100644
--- a/pkg/front_end/testcases/super_parameters/issue48708.dart.strong.expect
+++ b/pkg/front_end/testcases/super_parameters/issue48708.dart.strong.expect
@@ -19,7 +19,7 @@
;
}
abstract class _C&B&Mixin = self::B<self::A> with self::Mixin /*isAnonymousMixin*/ {
- synthetic constructor •({self::A field}) → self::_C&B&Mixin
+ synthetic constructor •({self::A field = #C1}) → self::_C&B&Mixin
: super self::B::•(field: field)
;
}
diff --git a/pkg/front_end/testcases/super_parameters/issue48708.dart.strong.transformed.expect b/pkg/front_end/testcases/super_parameters/issue48708.dart.strong.transformed.expect
index 1acdeb6..f71d862 100644
--- a/pkg/front_end/testcases/super_parameters/issue48708.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/super_parameters/issue48708.dart.strong.transformed.expect
@@ -19,7 +19,7 @@
;
}
abstract class _C&B&Mixin extends self::B<self::A> implements self::Mixin /*isAnonymousMixin,isEliminatedMixin*/ {
- synthetic constructor •({self::A field}) → self::_C&B&Mixin
+ synthetic constructor •({self::A field = #C1}) → self::_C&B&Mixin
: super self::B::•(field: field)
;
}
diff --git a/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.expect b/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.expect
index bbbaeed..05ade25 100644
--- a/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.expect
+++ b/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.expect
@@ -19,7 +19,7 @@
;
}
abstract class _C&B&Mixin = self::B<self::A> with self::Mixin /*isAnonymousMixin*/ {
- synthetic constructor •({self::A field}) → self::_C&B&Mixin
+ synthetic constructor •({self::A field = #C1}) → self::_C&B&Mixin
: super self::B::•(field: field)
;
}
diff --git a/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.modular.expect b/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.modular.expect
index bbbaeed..05ade25 100644
--- a/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.modular.expect
@@ -19,7 +19,7 @@
;
}
abstract class _C&B&Mixin = self::B<self::A> with self::Mixin /*isAnonymousMixin*/ {
- synthetic constructor •({self::A field}) → self::_C&B&Mixin
+ synthetic constructor •({self::A field = #C1}) → self::_C&B&Mixin
: super self::B::•(field: field)
;
}
diff --git a/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.outline.expect
index 4a28ead1..3450f1e 100644
--- a/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.outline.expect
@@ -12,16 +12,16 @@
}
abstract class B<D extends core::Object? = dynamic> extends core::Object {
final field self::B::D% field;
- constructor •({required self::B::D% field}) → self::B<self::B::D%>
+ constructor •({required self::B::D% field = null}) → self::B<self::B::D%>
;
}
abstract class _C&B&Mixin = self::B<self::A> with self::Mixin /*isAnonymousMixin*/ {
- synthetic constructor •({self::A field}) → self::_C&B&Mixin
+ synthetic constructor •({self::A field = null}) → self::_C&B&Mixin
: super self::B::•(field: field)
;
}
class C extends self::_C&B&Mixin {
- constructor •({required self::A field}) → self::C
+ constructor •({required self::A field = null}) → self::C
;
}
static method main() → dynamic
diff --git a/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.transformed.expect b/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.transformed.expect
index 1acdeb6..f71d862 100644
--- a/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/super_parameters/issue48708.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
;
}
abstract class _C&B&Mixin extends self::B<self::A> implements self::Mixin /*isAnonymousMixin,isEliminatedMixin*/ {
- synthetic constructor •({self::A field}) → self::_C&B&Mixin
+ synthetic constructor •({self::A field = #C1}) → self::_C&B&Mixin
: super self::B::•(field: field)
;
}
diff --git a/pkg/front_end/testcases/super_parameters/no_coercions.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/no_coercions.dart.weak.outline.expect
index 7a8c89a..2882ba7 100644
--- a/pkg/front_end/testcases/super_parameters/no_coercions.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/super_parameters/no_coercions.dart.weak.outline.expect
@@ -13,13 +13,13 @@
;
}
class A2 extends core::Object {
- constructor •({required core::String x}) → self::A2
+ constructor •({required core::String x = null}) → self::A2
;
}
class B2 extends self::A2 {
- constructor one({required dynamic x}) → self::B2
+ constructor one({required dynamic x = null}) → self::B2
;
- constructor two({required dynamic x}) → self::B2
+ constructor two({required dynamic x = null}) → self::B2
;
}
class A3 extends core::Object {
@@ -33,13 +33,13 @@
;
}
class A4 extends core::Object {
- constructor •({required (core::double) → core::num f}) → self::A4
+ constructor •({required (core::double) → core::num f = null}) → self::A4
;
}
class B4 extends self::A4 {
- constructor one({required <X extends core::Object? = dynamic>(core::double) → X% f}) → self::B4
+ constructor one({required <X extends core::Object? = dynamic>(core::double) → X% f = null}) → self::B4
;
- constructor two({required <X extends core::Object? = dynamic>(core::double) → X% f}) → self::B4
+ constructor two({required <X extends core::Object? = dynamic>(core::double) → X% f = null}) → self::B4
;
}
abstract class C5 extends core::Object {
@@ -58,21 +58,21 @@
;
}
class A6 extends core::Object {
- constructor •({required (core::int, core::num) → core::String f}) → self::A6
+ constructor •({required (core::int, core::num) → core::String f = null}) → self::A6
;
}
class B6 extends self::A6 {
- constructor one({required self::C5 f}) → self::B6
+ constructor one({required self::C5 f = null}) → self::B6
;
- constructor two({required self::C5 f}) → self::B6
+ constructor two({required self::C5 f = null}) → self::B6
;
}
class A7 extends core::Object {
- constructor •({required core::int x1, required core::int x2, required (core::Object) → core::bool f1, required (core::Object) → core::bool f2, required (dynamic) → void g1, required (dynamic) → void g2}) → self::A7
+ constructor •({required core::int x1 = null, required core::int x2 = null, required (core::Object) → core::bool f1 = null, required (core::Object) → core::bool f2 = null, required (dynamic) → void g1 = null, required (dynamic) → void g2 = null}) → self::A7
;
}
class B7 extends self::A7 {
- constructor •({required dynamic x1, required dynamic x2, required <X extends core::Object? = dynamic>(core::Object) → X% f1, required <X extends core::Object? = dynamic>(core::Object) → X% f2, required <X extends core::Object? = dynamic>(X%) → void g1, required <X extends core::Object? = dynamic>(X%) → void g2}) → self::B7
+ constructor •({required dynamic x1 = null, required dynamic x2 = null, required <X extends core::Object? = dynamic>(core::Object) → X% f1 = null, required <X extends core::Object? = dynamic>(core::Object) → X% f2 = null, required <X extends core::Object? = dynamic>(X%) → void g1 = null, required <X extends core::Object? = dynamic>(X%) → void g2 = null}) → self::B7
;
}
static method main() → dynamic
diff --git a/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.outline.expect
index 3d11aa3..407250c 100644
--- a/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.outline.expect
@@ -10,7 +10,7 @@
;
constructor named2(core::int foo) → self::A1
;
- constructor named3({required core::int foo}) → self::A1
+ constructor named3({required core::int foo = null}) → self::A1
;
}
class B1 extends self::A1 {
@@ -20,17 +20,17 @@
;
constructor named2(core::int foo) → self::B1
;
- constructor named3({required core::int foo}) → self::B1
+ constructor named3({required core::int foo = null}) → self::B1
;
}
class A2 extends core::Object {
final field core::int foo;
final field core::String bar;
- constructor •({required core::int foo, required core::String bar}) → self::A2
+ constructor •({required core::int foo = null, required core::String bar = null}) → self::A2
;
}
class B2 extends self::A2 {
- constructor •({required core::String bar, required core::int foo}) → self::B2
+ constructor •({required core::String bar = null, required core::int foo = null}) → self::B2
;
}
static method main() → dynamic
diff --git a/pkg/front_end/testcases/super_parameters/simple_named_super_parameters.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/simple_named_super_parameters.dart.weak.outline.expect
index 99e1ef3..e8c6dc4 100644
--- a/pkg/front_end/testcases/super_parameters/simple_named_super_parameters.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/super_parameters/simple_named_super_parameters.dart.weak.outline.expect
@@ -4,21 +4,21 @@
class A1 extends core::Object {
final field core::int foo;
- constructor •({required core::int foo}) → self::A1
+ constructor •({required core::int foo = null}) → self::A1
;
}
class B1 extends self::A1 {
- constructor •({required core::int foo}) → self::B1
+ constructor •({required core::int foo = null}) → self::B1
;
}
class C1 extends self::A1 {
- constructor •({required core::int foo}) → self::C1
+ constructor •({required core::int foo = null}) → self::C1
;
}
class A2 extends core::Object {
final field core::int foo;
final field core::String bar;
- constructor •({required core::int foo, required core::String bar}) → self::A2
+ constructor •({required core::int foo = null, required core::String bar = null}) → self::A2
;
}
class B2 extends self::A2 {
@@ -26,9 +26,9 @@
;
}
class C2 extends self::A2 {
- constructor •({required core::int foo}) → self::C2
+ constructor •({required core::int foo = null}) → self::C2
;
- constructor other({required core::int foo}) → self::C2
+ constructor other({required core::int foo = null}) → self::C2
;
}
static method main() → dynamic
diff --git a/pkg/front_end/testcases/super_parameters/super_key/main.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/super_key/main.dart.weak.outline.expect
index 76d37eb..5b4efe7 100644
--- a/pkg/front_end/testcases/super_parameters/super_key/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/super_parameters/super_key/main.dart.weak.outline.expect
@@ -5,7 +5,7 @@
import "org-dartlang-testcase:///main_lib.dart";
class GalleryApp extends mai::StatefulWidget /*hasConstConstructor*/ {
- const constructor •({mai::Key? key}) → self::GalleryApp
+ const constructor •({mai::Key? key = #C1}) → self::GalleryApp
: super mai::StatefulWidget::•(key: key)
;
}
@@ -22,7 +22,11 @@
}
class StatefulWidget extends core::Object /*hasConstConstructor*/ {
final field mai::Key? key;
- const constructor •({mai::Key? key}) → mai::StatefulWidget
+ const constructor •({mai::Key? key = #C1}) → mai::StatefulWidget
: mai::StatefulWidget::key = key, super core::Object::•()
;
}
+
+constants {
+ #C1 = null
+}
diff --git a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.strong.expect b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.strong.expect
index c1a5b49..1d3e740 100644
--- a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.strong.expect
+++ b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.strong.expect
@@ -161,7 +161,7 @@
;
}
class C9 = syn::A9 with self::B9 {
- synthetic constructor •([core::int? a]) → self::C9
+ synthetic constructor •([core::int? a = #C3]) → self::C9
: super syn::A9::•(a)
;
}
@@ -210,7 +210,7 @@
;
}
class C8 = syn::A8 with syn::B8 {
- synthetic constructor •({core::int? a}) → syn::C8
+ synthetic constructor •({core::int? a = #C3}) → syn::C8
: super syn::A8::•(a: a)
;
}
diff --git a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.strong.transformed.expect b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.strong.transformed.expect
index 782b4ee..8995764 100644
--- a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.strong.transformed.expect
@@ -161,7 +161,7 @@
;
}
class C9 extends syn::A9 implements self::B9 /*isEliminatedMixin*/ {
- synthetic constructor •([core::int? a]) → self::C9
+ synthetic constructor •([core::int? a = #C3]) → self::C9
: super syn::A9::•(a)
;
}
@@ -210,7 +210,7 @@
;
}
class C8 extends syn::A8 implements syn::B8 /*isEliminatedMixin*/ {
- synthetic constructor •({core::int? a}) → syn::C8
+ synthetic constructor •({core::int? a = #C3}) → syn::C8
: super syn::A8::•(a: a)
;
}
diff --git a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.expect b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.expect
index c1a5b49..1d3e740 100644
--- a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.expect
+++ b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.expect
@@ -161,7 +161,7 @@
;
}
class C9 = syn::A9 with self::B9 {
- synthetic constructor •([core::int? a]) → self::C9
+ synthetic constructor •([core::int? a = #C3]) → self::C9
: super syn::A9::•(a)
;
}
@@ -210,7 +210,7 @@
;
}
class C8 = syn::A8 with syn::B8 {
- synthetic constructor •({core::int? a}) → syn::C8
+ synthetic constructor •({core::int? a = #C3}) → syn::C8
: super syn::A8::•(a: a)
;
}
diff --git a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.modular.expect b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.modular.expect
index c1a5b49..1d3e740 100644
--- a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.modular.expect
@@ -161,7 +161,7 @@
;
}
class C9 = syn::A9 with self::B9 {
- synthetic constructor •([core::int? a]) → self::C9
+ synthetic constructor •([core::int? a = #C3]) → self::C9
: super syn::A9::•(a)
;
}
@@ -210,7 +210,7 @@
;
}
class C8 = syn::A8 with syn::B8 {
- synthetic constructor •({core::int? a}) → syn::C8
+ synthetic constructor •({core::int? a = #C3}) → syn::C8
: super syn::A8::•(a: a)
;
}
diff --git a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.outline.expect
index 8e802f7..8752d3d 100644
--- a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.outline.expect
@@ -131,7 +131,7 @@
;
}
class D8 extends syn::C8 {
- constructor •({core::int? a}) → self::D8
+ constructor •({core::int? a = null}) → self::D8
;
}
class B9 extends core::Object {
@@ -139,12 +139,12 @@
;
}
class C9 = syn::A9 with self::B9 {
- synthetic constructor •([core::int? a]) → self::C9
+ synthetic constructor •([core::int? a = null]) → self::C9
: super syn::A9::•(a)
;
}
class D9 extends self::C9 {
- constructor •([core::int? a]) → self::D9
+ constructor •([core::int? a = null]) → self::D9
;
}
static method main() → dynamic
@@ -175,7 +175,7 @@
}
class A8 extends core::Object {
final field core::int? a;
- constructor •({core::int? a}) → syn::A8
+ constructor •({core::int? a = null}) → syn::A8
;
}
class B8 extends core::Object {
@@ -183,12 +183,12 @@
;
}
class C8 = syn::A8 with syn::B8 {
- synthetic constructor •({core::int? a}) → syn::C8
+ synthetic constructor •({core::int? a = null}) → syn::C8
: super syn::A8::•(a: a)
;
}
class A9 extends core::Object {
final field core::int? a;
- constructor •([core::int? a]) → syn::A9
+ constructor •([core::int? a = null]) → syn::A9
;
}
diff --git a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.transformed.expect b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.transformed.expect
index 782b4ee..8995764 100644
--- a/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/super_parameters/synthesized_super_constructor_with_parameters.dart.weak.transformed.expect
@@ -161,7 +161,7 @@
;
}
class C9 extends syn::A9 implements self::B9 /*isEliminatedMixin*/ {
- synthetic constructor •([core::int? a]) → self::C9
+ synthetic constructor •([core::int? a = #C3]) → self::C9
: super syn::A9::•(a)
;
}
@@ -210,7 +210,7 @@
;
}
class C8 extends syn::A8 implements syn::B8 /*isEliminatedMixin*/ {
- synthetic constructor •({core::int? a}) → syn::C8
+ synthetic constructor •({core::int? a = #C3}) → syn::C8
: super syn::A8::•(a: a)
;
}
diff --git a/pkg/front_end/testcases/triple_shift/invalid_operator.dart.weak.outline.expect b/pkg/front_end/testcases/triple_shift/invalid_operator.dart.weak.outline.expect
index 34eccb8..dbf9eec 100644
--- a/pkg/front_end/testcases/triple_shift/invalid_operator.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/triple_shift/invalid_operator.dart.weak.outline.expect
@@ -49,25 +49,25 @@
class Operators3 extends core::Object {
synthetic constructor •() → self::Operators3
;
- operator >>>([dynamic a]) → dynamic
+ operator >>>([dynamic a = null]) → dynamic
;
}
class Operators4 extends core::Object {
synthetic constructor •() → self::Operators4
;
- operator >>>({dynamic a}) → dynamic
+ operator >>>({dynamic a = null}) → dynamic
;
}
class Operators5 extends core::Object {
synthetic constructor •() → self::Operators5
;
- operator >>>(dynamic a, [dynamic b]) → dynamic
+ operator >>>(dynamic a, [dynamic b = null]) → dynamic
;
}
class Operators6 extends core::Object {
synthetic constructor •() → self::Operators6
;
- operator >>>(dynamic a, {dynamic b}) → dynamic
+ operator >>>(dynamic a, {dynamic b = null}) → dynamic
;
}
class Operators7 extends core::Object {
diff --git a/pkg/front_end/testcases/value_class/copy_with_call_sites.dart.weak.outline.expect b/pkg/front_end/testcases/value_class/copy_with_call_sites.dart.weak.outline.expect
index f6aa033..71cd6f2 100644
--- a/pkg/front_end/testcases/value_class/copy_with_call_sites.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/value_class/copy_with_call_sites.dart.weak.outline.expect
@@ -20,7 +20,7 @@
class Animal extends core::Object {
final field core::int? numberOfLegs;
- constructor •({required core::int? numberOfLegs}) → self::Animal
+ constructor •({required core::int? numberOfLegs = null}) → self::Animal
;
}
@val::valueClass
@@ -32,9 +32,9 @@
class Foo extends core::Object {
field core::int? bar;
field core::int? bar2;
- constructor •({core::int? bar, core::int? bar2}) → self::Foo
+ constructor •({core::int? bar = null, core::int? bar2 = null}) → self::Foo
;
- method copyWith({core::int bar, core::int bar2}) → self::Foo
+ method copyWith({core::int bar = null, core::int bar2 = null}) → self::Foo
;
}
@val::valueClass
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.outline.expect b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.outline.expect
index 6b5a117..6584a35 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.outline.expect
@@ -7,7 +7,7 @@
class Animal extends core::Object {
final field core::int numberOfLegs;
- constructor •({required core::int numberOfLegs}) → self::Animal
+ constructor •({required core::int numberOfLegs = null}) → self::Animal
;
}
@val::valueClass
diff --git a/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.outline.expect b/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.outline.expect
index cd364ee..ce7effd 100644
--- a/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.outline.expect
@@ -18,7 +18,7 @@
;
method method(self::A::T% t, (self::A::U%) → void u, covariant-by-class self::A::V% v) → void
;
- method method2(self::A::T% x, [self::A::T? y]) → void
+ method method2(self::A::T% x, [self::A::T? y = null]) → void
;
set x(self::A::T% t) → void
;
@@ -44,7 +44,7 @@
final field (self::C::T%) →? void field;
synthetic constructor •() → self::C<self::C::T%>
;
- method method(self::C::T% x, [self::C::T? y]) → void
+ method method(self::C::T% x, [self::C::T? y = null]) → void
;
set x(self::C::T% t) → void
;
diff --git a/pkg/kernel/lib/canonical_name.dart b/pkg/kernel/lib/canonical_name.dart
index 651c2d6..0549ea4 100644
--- a/pkg/kernel/lib/canonical_name.dart
+++ b/pkg/kernel/lib/canonical_name.dart
@@ -5,6 +5,7 @@
library kernel.canonical_name;
import 'ast.dart';
+import 'src/printer.dart' show AstPrinter, AstTextStrategy;
/// A string sequence that identifies a library, class, or member.
///
@@ -284,6 +285,16 @@
return "${parent!.toStringInternal()}::$name";
}
+ String toText(AstTextStrategy strategy) {
+ AstPrinter printer = new AstPrinter(strategy);
+ toTextInternal(printer);
+ return printer.getText();
+ }
+
+ void toTextInternal(AstPrinter printer) {
+ printer.writeQualifiedCanonicalNameToString(this);
+ }
+
Reference get reference {
return _reference ??= (new Reference()..canonicalName = this);
}
@@ -462,6 +473,21 @@
return "Reference to ${toStringInternal()}";
}
+ String toText(AstTextStrategy strategy) {
+ AstPrinter printer = new AstPrinter(strategy);
+ toTextInternal(printer);
+ return printer.getText();
+ }
+
+ void toTextInternal(AstPrinter printer) {
+ if (node != null) {
+ return node!.toTextInternal(printer);
+ }
+ if (canonicalName != null) {
+ return canonicalName!.toTextInternal(printer);
+ }
+ }
+
String toStringInternal() {
if (canonicalName != null) {
return '${canonicalName!.toStringInternal()}';
diff --git a/pkg/kernel/lib/src/printer.dart b/pkg/kernel/lib/src/printer.dart
index fc81e9c..89f763c 100644
--- a/pkg/kernel/lib/src/printer.dart
+++ b/pkg/kernel/lib/src/printer.dart
@@ -112,6 +112,12 @@
includeLibraryName: _strategy.includeLibraryNamesInMembers));
}
+ void writeQualifiedCanonicalNameToString(CanonicalName canonicalName) {
+ _sb.write(qualifiedCanonicalNameToString(canonicalName,
+ includeLibraryName: _strategy.includeLibraryNamesInMembers,
+ includeLibraryNamesInTypes: _strategy.includeLibraryNamesInTypes));
+ }
+
void writeMemberName(Reference? reference) {
_sb.write(qualifiedMemberNameToStringByReference(reference,
includeLibraryName: _strategy.includeLibraryNamesInMembers));
diff --git a/pkg/kernel/lib/src/text_util.dart b/pkg/kernel/lib/src/text_util.dart
index ac95aac..fdc2a10 100644
--- a/pkg/kernel/lib/src/text_util.dart
+++ b/pkg/kernel/lib/src/text_util.dart
@@ -42,22 +42,50 @@
}
String qualifiedCanonicalNameToString(CanonicalName canonicalName,
- {bool includeLibraryName: false}) {
+ {bool includeLibraryName: false, bool includeLibraryNamesInTypes: false}) {
if (canonicalName.isRoot) {
return '<root>';
} else if (canonicalName.parent!.isRoot) {
- return canonicalName.name;
+ // Library.
+ return 'library ${canonicalName.name}';
} else if (canonicalName.parent!.parent!.isRoot) {
+ // Class or extension.
if (!includeLibraryName) {
return canonicalName.name;
}
String parentName = qualifiedCanonicalNameToString(canonicalName.parent!,
- includeLibraryName: includeLibraryName);
+ includeLibraryName: includeLibraryName,
+ includeLibraryNamesInTypes: includeLibraryNamesInTypes);
return '$parentName::${canonicalName.name}';
} else {
- String parentName = qualifiedCanonicalNameToString(canonicalName.parent!,
- includeLibraryName: includeLibraryName);
- return '$parentName.${canonicalName.name}';
+ // Constructor, field, procedure (factory, getter, setter etc), typedef;
+ // but we could technically be anywhere in the "hierarchy" --- at the
+ // @typedef for instance, or at the uri of a library for a private name.
+ CanonicalName parentNotPrivateUri = canonicalName.parent!;
+ if (canonicalName.name.startsWith("_")) {
+ parentNotPrivateUri = parentNotPrivateUri.parent!;
+ }
+ if (parentNotPrivateUri.name == CanonicalName.typedefsName) {
+ includeLibraryName = includeLibraryNamesInTypes;
+ }
+ if (parentNotPrivateUri.parent!.parent!.parent?.isRoot == true) {
+ // Parent is class (or extension).
+ String parentName = qualifiedCanonicalNameToString(
+ parentNotPrivateUri.parent!,
+ includeLibraryName: includeLibraryName,
+ includeLibraryNamesInTypes: includeLibraryNamesInTypes);
+ return "$parentName.${canonicalName.name}";
+ } else {
+ // Parent is library.
+ if (!includeLibraryName) {
+ return canonicalName.name;
+ }
+ String parentName = qualifiedCanonicalNameToString(
+ parentNotPrivateUri.parent!,
+ includeLibraryName: includeLibraryName,
+ includeLibraryNamesInTypes: includeLibraryNamesInTypes);
+ return '$parentName::${canonicalName.name}';
+ }
}
}
diff --git a/pkg/kernel/test/text_util_test.dart b/pkg/kernel/test/text_util_test.dart
new file mode 100644
index 0000000..3ec48d2
--- /dev/null
+++ b/pkg/kernel/test/text_util_test.dart
@@ -0,0 +1,62 @@
+// 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 'package:kernel/ast.dart';
+import 'package:kernel/src/printer.dart';
+
+import "reference_name_test.dart" show createComponent;
+
+void main() {
+ testQualifiedCanonicalNameToString();
+}
+
+void testQualifiedCanonicalNameToString() {
+ Component component = createComponent();
+ component.computeCanonicalNames();
+ NamedNodeCollector namedNodeCollector = new NamedNodeCollector();
+ component.accept(namedNodeCollector);
+
+ bool foundMismatch = false;
+
+ for (NamedNode namedNode in namedNodeCollector.namedNodes) {
+ for (AstTextStrategy strategy in [
+ const AstTextStrategy(
+ includeLibraryNamesInMembers: false,
+ includeLibraryNamesInTypes: false),
+ const AstTextStrategy(includeLibraryNamesInMembers: true),
+ const AstTextStrategy(includeLibraryNamesInTypes: true),
+ const AstTextStrategy(
+ includeLibraryNamesInMembers: true, includeLibraryNamesInTypes: true),
+ ]) {
+ String throughNode = namedNode.toText(strategy);
+ String throughReference = namedNode.reference.toText(strategy);
+ String throughCanonicalName =
+ namedNode.reference.canonicalName!.toText(strategy);
+ if (throughNode == throughReference &&
+ throughReference == throughCanonicalName) continue;
+ print("${namedNode.runtimeType} "
+ "(${strategy.includeLibraryNamesInMembers},"
+ "${strategy.includeLibraryNamesInTypes}): "
+ "$throughNode <--> $throughReference <--> $throughCanonicalName");
+ foundMismatch = true;
+ }
+ }
+
+ if (foundMismatch) throw "Found mismatch.";
+}
+
+class NamedNodeCollector extends RecursiveVisitor {
+ List<NamedNode> namedNodes = [];
+ @override
+ void defaultNode(Node node) {
+ if (node is NamedNode) {
+ namedNodes.add(node);
+ }
+ if (node is Extension) return;
+ if (node is Typedef) return;
+ if (node is Member) return;
+
+ super.defaultNode(node);
+ }
+}
diff --git a/tools/VERSION b/tools/VERSION
index 342e544..2648abd 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 18
PATCH 0
-PRERELEASE 55
+PRERELEASE 56
PRERELEASE_PATCH 0
\ No newline at end of file