Version 2.11.0-188.0.dev
Merge commit '00594be05c6424805b330d774c8da7eabf819837' into 'dev'
diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
index 1564994..df9fd1e 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -5338,6 +5338,78 @@
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(String name)>
+ templateInvalidGetterSetterTypeFieldContext =
+ const Template<Message Function(String name)>(
+ messageTemplate: r"""This is the declaration of the field '#name'.""",
+ withArguments: _withArgumentsInvalidGetterSetterTypeFieldContext);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String name)>
+ codeInvalidGetterSetterTypeFieldContext =
+ const Code<Message Function(String name)>(
+ "InvalidGetterSetterTypeFieldContext",
+ templateInvalidGetterSetterTypeFieldContext,
+ severity: Severity.context);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeFieldContext(String name) {
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ return new Message(codeInvalidGetterSetterTypeFieldContext,
+ message: """This is the declaration of the field '${name}'.""",
+ arguments: {'name': name});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(String name)>
+ templateInvalidGetterSetterTypeGetterContext =
+ const Template<Message Function(String name)>(
+ messageTemplate: r"""This is the declaration of the getter '#name'.""",
+ withArguments: _withArgumentsInvalidGetterSetterTypeGetterContext);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String name)>
+ codeInvalidGetterSetterTypeGetterContext =
+ const Code<Message Function(String name)>(
+ "InvalidGetterSetterTypeGetterContext",
+ templateInvalidGetterSetterTypeGetterContext,
+ severity: Severity.context);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeGetterContext(String name) {
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ return new Message(codeInvalidGetterSetterTypeGetterContext,
+ message: """This is the declaration of the getter '${name}'.""",
+ arguments: {'name': name});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(String name)>
+ templateInvalidGetterSetterTypeSetterContext =
+ const Template<Message Function(String name)>(
+ messageTemplate: r"""This is the declaration of the setter '#name'.""",
+ withArguments: _withArgumentsInvalidGetterSetterTypeSetterContext);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String name)>
+ codeInvalidGetterSetterTypeSetterContext =
+ const Code<Message Function(String name)>(
+ "InvalidGetterSetterTypeSetterContext",
+ templateInvalidGetterSetterTypeSetterContext,
+ severity: Severity.context);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeSetterContext(String name) {
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ return new Message(codeInvalidGetterSetterTypeSetterContext,
+ message: """This is the declaration of the setter '${name}'.""",
+ arguments: {'name': name});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeInvalidHexEscape = messageInvalidHexEscape;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
diff --git a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
index dc26a16..5bd6ce2 100644
--- a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
+++ b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
@@ -63,6 +63,7 @@
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:analyzer/dart/analysis/results.dart';
import 'package:analyzer/error/error.dart';
+import 'package:analyzer/source/error_processor.dart';
import 'package:analyzer/src/error/codes.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
@@ -356,6 +357,7 @@
/// Use the change [builder] to create fixes for the diagnostics in the
/// library associated with the analysis [result].
Future<void> _fixErrorsInLibrary(ResolvedLibraryResult result) async {
+ var analysisOptions = result.session.analysisContext.analysisOptions;
for (var unitResult in result.units) {
final fixContext = DartFixContextImpl(
workspace,
@@ -364,7 +366,11 @@
(name) => [],
);
for (var error in unitResult.errors) {
- await _fixSingleError(fixContext, unitResult, error);
+ var processor = ErrorProcessor.getProcessor(analysisOptions, error);
+ // Only fix errors not filtered out in analysis options.
+ if (processor == null || processor.severity != null) {
+ await _fixSingleError(fixContext, unitResult, error);
+ }
}
}
}
diff --git a/pkg/analysis_server/test/edit/bulk_fixes_test.dart b/pkg/analysis_server/test/edit/bulk_fixes_test.dart
index c1d8b75..cf1c6c7 100644
--- a/pkg/analysis_server/test/edit/bulk_fixes_test.dart
+++ b/pkg/analysis_server/test/edit/bulk_fixes_test.dart
@@ -27,6 +27,12 @@
expect(editedSource, expectedSource);
}
+ Future<void> assertNoEdits() async {
+ await waitForTasksFinished();
+ var edits = await _getBulkEdits();
+ expect(edits, isEmpty);
+ }
+
@override
void setUp() {
super.setUp();
@@ -52,6 +58,38 @@
''');
}
+ Future<void> test_unnecessaryNew_ignoredInOptions() async {
+ createProject();
+ addAnalysisOptionsFile('''
+analyzer:
+ errors:
+ unnecessary_new: ignore
+linter:
+ rules:
+ - unnecessary_new
+''');
+ addTestFile('''
+class A {}
+A f() => new A();
+''');
+ await assertNoEdits();
+ }
+
+ Future<void> test_unnecessaryNew_ignoredInSource() async {
+ createProject();
+ addAnalysisOptionsFile('''
+linter:
+ rules:
+ - unnecessary_new
+''');
+ addTestFile('''
+class A {}
+//ignore: unnecessary_new
+A f() => new A();
+''');
+ await assertNoEdits();
+ }
+
Future<List<SourceFileEdit>> _getBulkEdits() async {
var request = EditBulkFixesParams([testFile]).toRequest('0');
var response = await waitResponse(request);
diff --git a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
index 5216076..4b12e9d 100644
--- a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
+++ b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
@@ -462,10 +462,17 @@
}) {
YamlMap optionMap;
- var optionsFile = performance.run('findOptionsFile', (_) {
- var folder = resourceProvider.getFile(path).parent;
- return _findOptionsFile(folder);
- });
+ var separator = resourceProvider.pathContext.separator;
+ var isThirdParty =
+ path.contains('${separator}third_party${separator}dart$separator');
+
+ File optionsFile;
+ if (!isThirdParty) {
+ optionsFile = performance.run('findOptionsFile', (_) {
+ var folder = resourceProvider.getFile(path).parent;
+ return _findOptionsFile(folder);
+ });
+ }
if (optionsFile != null) {
performance.run('getOptionsFromFile', (_) {
@@ -479,9 +486,7 @@
} else {
var source = performance.run('defaultOptions', (_) {
if (workspace is WorkspaceWithDefaultAnalysisOptions) {
- var separator = resourceProvider.pathContext.separator;
- if (path
- .contains('${separator}third_party${separator}dart$separator')) {
+ if (isThirdParty) {
return sourceFactory.forUri(
WorkspaceWithDefaultAnalysisOptions.thirdPartyUri,
);
diff --git a/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart b/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart
index f096933..ec169b2 100644
--- a/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart
+++ b/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart
@@ -312,6 +312,13 @@
implicit-casts: false
''');
+ newFile('/workspace/thid_party/dart/aaa/analysis_options.yaml',
+ content: r'''
+analyzer:
+ strong-mode:
+ implicit-casts: true
+''');
+
var aPath = convertPath('/workspace/third_party/dart/aaa/lib/a.dart');
await assertErrorsInFile(aPath, r'''
num a = 0;
diff --git a/pkg/dev_compiler/bin/dartdevc.dart b/pkg/dev_compiler/bin/dartdevc.dart
index 68246e3..baf9c9a 100755
--- a/pkg/dev_compiler/bin/dartdevc.dart
+++ b/pkg/dev_compiler/bin/dartdevc.dart
@@ -30,17 +30,20 @@
} else if (parsedArgs.isBatch) {
await runBatch(parsedArgs);
} else if (parsedArgs.isExpressionCompiler) {
- ExpressionCompilerWorker worker;
if (sendPort != null) {
var receivePort = ReceivePort();
sendPort.send(receivePort.sendPort);
- worker = await ExpressionCompilerWorker.createFromArgs(parsedArgs.rest,
+ var worker = await ExpressionCompilerWorker.createFromArgs(
+ parsedArgs.rest,
requestStream: receivePort.cast<Map<String, dynamic>>(),
sendResponse: sendPort.send);
+ await worker.start();
+ receivePort.close();
} else {
- worker = await ExpressionCompilerWorker.createFromArgs(parsedArgs.rest);
+ var worker =
+ await ExpressionCompilerWorker.createFromArgs(parsedArgs.rest);
+ await worker.start();
}
- await worker.start();
} else {
var result = await compile(parsedArgs);
exitCode = result.exitCode;
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index cd7ebd3..7e7566e 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -882,21 +882,16 @@
var savedTopLevelClass = _classEmittingExtends;
_classEmittingExtends = c;
- // Refers to 'S' in `class C extends S`. Set this to null to avoid
- // referencing deferred supertypes in _emitClassConstructor's JS output.
- js_ast.Expression baseClass;
-
+ // Unroll mixins.
if (shouldDefer(supertype)) {
deferredSupertypes.add(runtimeStatement('setBaseClass(#, #)', [
getBaseClass(isMixinAliasClass(c) ? 0 : mixinApplications.length),
emitDeferredType(supertype),
]));
- // Refers to 'supertype' without any type arguments.
supertype =
_coreTypes.rawType(supertype.classNode, _currentLibrary.nonNullable);
- } else {
- baseClass = emitClassRef(supertype);
}
+ var baseClass = emitClassRef(supertype);
if (isMixinAliasClass(c)) {
// Given `class C = Object with M [implements I1, I2 ...];`
diff --git a/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart b/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
index 85aa859..a1b995c 100644
--- a/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
+++ b/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
@@ -213,6 +213,7 @@
await for (var request in requestStream) {
try {
var command = request['command'] as String;
+ if (command == 'Shutdown') break;
switch (command) {
case 'UpdateDeps':
sendResponse(
@@ -234,6 +235,7 @@
});
}
}
+ _processedOptions.ticker.logMs('Stopped expression compiler worker.');
}
/// Handles a `CompileExpression` request.
diff --git a/pkg/front_end/lib/src/fasta/builder/field_builder.dart b/pkg/front_end/lib/src/fasta/builder/field_builder.dart
index f3bf41e..429d5f1 100644
--- a/pkg/front_end/lib/src/fasta/builder/field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/field_builder.dart
@@ -713,6 +713,11 @@
@override
bool get isFunction => false;
+
+ @override
+ bool isSameDeclaration(ClassMember other) {
+ return other is SourceFieldMember && memberBuilder == other.memberBuilder;
+ }
}
abstract class AbstractLateFieldEncoding implements FieldEncoding {
@@ -1057,13 +1062,16 @@
@override
List<ClassMember> getLocalMembers(SourceFieldBuilder fieldBuilder) {
List<ClassMember> list = <ClassMember>[
- new _SynthesizedFieldClassMember(fieldBuilder, field,
+ new _SynthesizedFieldClassMember(
+ fieldBuilder, field, _SynthesizedFieldMemberKind.LateField,
isInternalImplementation: true),
new _SynthesizedFieldClassMember(fieldBuilder, _lateGetter,
+ _SynthesizedFieldMemberKind.LateGetterSetter,
isInternalImplementation: false)
];
if (_lateIsSetField != null) {
- list.add(new _SynthesizedFieldClassMember(fieldBuilder, _lateIsSetField,
+ list.add(new _SynthesizedFieldClassMember(
+ fieldBuilder, _lateIsSetField, _SynthesizedFieldMemberKind.LateIsSet,
isInternalImplementation: true));
}
return list;
@@ -1071,13 +1079,19 @@
@override
List<ClassMember> getLocalSetters(SourceFieldBuilder fieldBuilder) {
- List<ClassMember> list = <ClassMember>[];
+ List<ClassMember> list = <ClassMember>[
+ new _SynthesizedFieldClassMember(
+ fieldBuilder, field, _SynthesizedFieldMemberKind.LateField,
+ forSetter: true, isInternalImplementation: true),
+ ];
if (_lateIsSetField != null) {
- list.add(new _SynthesizedFieldClassMember(fieldBuilder, _lateIsSetField,
+ list.add(new _SynthesizedFieldClassMember(
+ fieldBuilder, _lateIsSetField, _SynthesizedFieldMemberKind.LateIsSet,
forSetter: true, isInternalImplementation: true));
}
if (_lateSetter != null) {
list.add(new _SynthesizedFieldClassMember(fieldBuilder, _lateSetter,
+ _SynthesizedFieldMemberKind.LateGetterSetter,
forSetter: true, isInternalImplementation: false));
}
return list;
@@ -1274,6 +1288,7 @@
class _SynthesizedFieldClassMember implements ClassMember {
final SourceFieldBuilder fieldBuilder;
+ final _SynthesizedFieldMemberKind _kind;
final Member _member;
@@ -1283,7 +1298,7 @@
@override
final bool isInternalImplementation;
- _SynthesizedFieldClassMember(this.fieldBuilder, this._member,
+ _SynthesizedFieldClassMember(this.fieldBuilder, this._member, this._kind,
{this.forSetter: false, this.isInternalImplementation})
: assert(isInternalImplementation != null);
@@ -1415,8 +1430,16 @@
}
@override
- String toString() =>
- '_ClassMember($fieldBuilder,$_member,forSetter=${forSetter})';
+ bool isSameDeclaration(ClassMember other) {
+ if (identical(this, other)) return true;
+ return other is _SynthesizedFieldClassMember &&
+ fieldBuilder == other.fieldBuilder &&
+ _kind == other._kind;
+ }
+
+ @override
+ String toString() => '_SynthesizedFieldClassMember('
+ '$fieldBuilder,$_member,$_kind,forSetter=${forSetter})';
}
class AbstractOrExternalFieldEncoding implements FieldEncoding {
@@ -1584,6 +1607,7 @@
List<ClassMember> getLocalMembers(SourceFieldBuilder fieldBuilder) =>
<ClassMember>[
new _SynthesizedFieldClassMember(fieldBuilder, _getter,
+ _SynthesizedFieldMemberKind.AbstractExternalGetterSetter,
forSetter: false, isInternalImplementation: false)
];
@@ -1592,7 +1616,22 @@
_setter != null
? <ClassMember>[
new _SynthesizedFieldClassMember(fieldBuilder, _setter,
+ _SynthesizedFieldMemberKind.AbstractExternalGetterSetter,
forSetter: true, isInternalImplementation: false)
]
: const <ClassMember>[];
}
+
+enum _SynthesizedFieldMemberKind {
+ /// A `isSet` field used for late lowering.
+ LateIsSet,
+
+ /// A field used for the value of a late lowered field.
+ LateField,
+
+ /// A getter or setter used for late lowering.
+ LateGetterSetter,
+
+ /// A getter or setter used for abstract or external fields.
+ AbstractExternalGetterSetter,
+}
diff --git a/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart b/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart
index 75c8ba1..b42e61e 100644
--- a/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart
@@ -614,6 +614,12 @@
@override
bool get isFunction => !isProperty;
+
+ @override
+ bool isSameDeclaration(ClassMember other) {
+ return other is SourceProcedureMember &&
+ memberBuilder == other.memberBuilder;
+ }
}
class RedirectingFactoryBuilder extends ProcedureBuilderImpl {
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart
index ca51796..b34c24f 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart
@@ -191,6 +191,11 @@
// Do nothing; this is only for source members.
}
+ @override
+ bool isSameDeclaration(ClassMember other) {
+ return other is DillClassMember && memberBuilder == other.memberBuilder;
+ }
+
String toString() => 'DillClassMember($memberBuilder,forSetter=${forSetter})';
}
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
index 480cc47..3e928df 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
@@ -2042,6 +2042,690 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterType = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the setter '#name2'.""",
+ withArguments: _withArgumentsInvalidGetterSetterType);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2, String name2,
+ bool isNonNullableByDefault)> codeInvalidGetterSetterType = const Code<
+ Message Function(DartType _type, String name, DartType _type2, String name2,
+ bool isNonNullableByDefault)>(
+ "InvalidGetterSetterType",
+ templateInvalidGetterSetterType,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterType(DartType _type, String name,
+ DartType _type2, String name2, bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterType,
+ message:
+ """The type '${type}' of the getter '${name}' is not a subtype of the type '${type2}' of the setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeBothInheritedField = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""",
+ withArguments: _withArgumentsInvalidGetterSetterTypeBothInheritedField);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeBothInheritedField = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeBothInheritedField",
+ templateInvalidGetterSetterTypeBothInheritedField,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeBothInheritedField(DartType _type,
+ String name, DartType _type2, String name2, bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeBothInheritedField,
+ message:
+ """The type '${type}' of the inherited field '${name}' is not a subtype of the type '${type2}' of the inherited setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeBothInheritedFieldLegacy = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the inherited field '#name' is not assignable to the type '#type2' of the inherited setter '#name2'.""",
+ withArguments:
+ _withArgumentsInvalidGetterSetterTypeBothInheritedFieldLegacy);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeBothInheritedFieldLegacy = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeBothInheritedFieldLegacy",
+ templateInvalidGetterSetterTypeBothInheritedFieldLegacy,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeBothInheritedFieldLegacy(
+ DartType _type,
+ String name,
+ DartType _type2,
+ String name2,
+ bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeBothInheritedFieldLegacy,
+ message:
+ """The type '${type}' of the inherited field '${name}' is not assignable to the type '${type2}' of the inherited setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeBothInheritedGetter = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""",
+ withArguments:
+ _withArgumentsInvalidGetterSetterTypeBothInheritedGetter);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeBothInheritedGetter = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeBothInheritedGetter",
+ templateInvalidGetterSetterTypeBothInheritedGetter,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeBothInheritedGetter(DartType _type,
+ String name, DartType _type2, String name2, bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeBothInheritedGetter,
+ message:
+ """The type '${type}' of the inherited getter '${name}' is not a subtype of the type '${type2}' of the inherited setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeBothInheritedGetterLegacy = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the inherited getter '#name' is not assignable to the type '#type2' of the inherited setter '#name2'.""",
+ withArguments:
+ _withArgumentsInvalidGetterSetterTypeBothInheritedGetterLegacy);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeBothInheritedGetterLegacy = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeBothInheritedGetterLegacy",
+ templateInvalidGetterSetterTypeBothInheritedGetterLegacy,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeBothInheritedGetterLegacy(
+ DartType _type,
+ String name,
+ DartType _type2,
+ String name2,
+ bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeBothInheritedGetterLegacy,
+ message:
+ """The type '${type}' of the inherited getter '${name}' is not assignable to the type '${type2}' of the inherited setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeFieldInherited = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the setter '#name2'.""",
+ withArguments: _withArgumentsInvalidGetterSetterTypeFieldInherited);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeFieldInherited = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeFieldInherited",
+ templateInvalidGetterSetterTypeFieldInherited,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeFieldInherited(DartType _type,
+ String name, DartType _type2, String name2, bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeFieldInherited,
+ message:
+ """The type '${type}' of the inherited field '${name}' is not a subtype of the type '${type2}' of the setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeFieldInheritedLegacy = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the inherited field '#name' is not assignable to the type '#type2' of the setter '#name2'.""",
+ withArguments:
+ _withArgumentsInvalidGetterSetterTypeFieldInheritedLegacy);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeFieldInheritedLegacy = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeFieldInheritedLegacy",
+ templateInvalidGetterSetterTypeFieldInheritedLegacy,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeFieldInheritedLegacy(
+ DartType _type,
+ String name,
+ DartType _type2,
+ String name2,
+ bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeFieldInheritedLegacy,
+ message:
+ """The type '${type}' of the inherited field '${name}' is not assignable to the type '${type2}' of the setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeGetterInherited = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the setter '#name2'.""",
+ withArguments: _withArgumentsInvalidGetterSetterTypeGetterInherited);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeGetterInherited = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeGetterInherited",
+ templateInvalidGetterSetterTypeGetterInherited,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeGetterInherited(DartType _type,
+ String name, DartType _type2, String name2, bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeGetterInherited,
+ message:
+ """The type '${type}' of the inherited getter '${name}' is not a subtype of the type '${type2}' of the setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeGetterInheritedLegacy = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the inherited getter '#name' is not assignable to the type '#type2' of the setter '#name2'.""",
+ withArguments:
+ _withArgumentsInvalidGetterSetterTypeGetterInheritedLegacy);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeGetterInheritedLegacy = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeGetterInheritedLegacy",
+ templateInvalidGetterSetterTypeGetterInheritedLegacy,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeGetterInheritedLegacy(
+ DartType _type,
+ String name,
+ DartType _type2,
+ String name2,
+ bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeGetterInheritedLegacy,
+ message:
+ """The type '${type}' of the inherited getter '${name}' is not assignable to the type '${type2}' of the setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeLegacy = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the getter '#name' is not assignable to the type '#type2' of the setter '#name2'.""",
+ withArguments: _withArgumentsInvalidGetterSetterTypeLegacy);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeLegacy = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeLegacy",
+ templateInvalidGetterSetterTypeLegacy,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeLegacy(DartType _type, String name,
+ DartType _type2, String name2, bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeLegacy,
+ message:
+ """The type '${type}' of the getter '${name}' is not assignable to the type '${type2}' of the setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeSetterInheritedField = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""",
+ withArguments:
+ _withArgumentsInvalidGetterSetterTypeSetterInheritedField);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeSetterInheritedField = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeSetterInheritedField",
+ templateInvalidGetterSetterTypeSetterInheritedField,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeSetterInheritedField(
+ DartType _type,
+ String name,
+ DartType _type2,
+ String name2,
+ bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeSetterInheritedField,
+ message:
+ """The type '${type}' of the field '${name}' is not a subtype of the type '${type2}' of the inherited setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeSetterInheritedFieldLegacy = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the field '#name' is not assignable to the type '#type2' of the inherited setter '#name2'.""",
+ withArguments:
+ _withArgumentsInvalidGetterSetterTypeSetterInheritedFieldLegacy);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeSetterInheritedFieldLegacy = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeSetterInheritedFieldLegacy",
+ templateInvalidGetterSetterTypeSetterInheritedFieldLegacy,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeSetterInheritedFieldLegacy(
+ DartType _type,
+ String name,
+ DartType _type2,
+ String name2,
+ bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeSetterInheritedFieldLegacy,
+ message:
+ """The type '${type}' of the field '${name}' is not assignable to the type '${type2}' of the inherited setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeSetterInheritedGetter = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'.""",
+ withArguments:
+ _withArgumentsInvalidGetterSetterTypeSetterInheritedGetter);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeSetterInheritedGetter = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeSetterInheritedGetter",
+ templateInvalidGetterSetterTypeSetterInheritedGetter,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeSetterInheritedGetter(
+ DartType _type,
+ String name,
+ DartType _type2,
+ String name2,
+ bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeSetterInheritedGetter,
+ message:
+ """The type '${type}' of the getter '${name}' is not a subtype of the type '${type2}' of the inherited setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ templateInvalidGetterSetterTypeSetterInheritedGetterLegacy = const Template<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ messageTemplate:
+ r"""The type '#type' of the getter '#name' is not assignable to the type '#type2' of the inherited setter '#name2'.""",
+ withArguments:
+ _withArgumentsInvalidGetterSetterTypeSetterInheritedGetterLegacy);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>
+ codeInvalidGetterSetterTypeSetterInheritedGetterLegacy = const Code<
+ Message Function(DartType _type, String name, DartType _type2,
+ String name2, bool isNonNullableByDefault)>(
+ "InvalidGetterSetterTypeSetterInheritedGetterLegacy",
+ templateInvalidGetterSetterTypeSetterInheritedGetterLegacy,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidGetterSetterTypeSetterInheritedGetterLegacy(
+ DartType _type,
+ String name,
+ DartType _type2,
+ String name2,
+ bool isNonNullableByDefault) {
+ TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+ List<Object> typeParts = labeler.labelType(_type);
+ if (name.isEmpty) throw 'No name provided';
+ name = demangleMixinApplicationName(name);
+ List<Object> type2Parts = labeler.labelType(_type2);
+ if (name2.isEmpty) throw 'No name provided';
+ name2 = demangleMixinApplicationName(name2);
+ String type = typeParts.join();
+ String type2 = type2Parts.join();
+ return new Message(codeInvalidGetterSetterTypeSetterInheritedGetterLegacy,
+ message:
+ """The type '${type}' of the getter '${name}' is not assignable to the type '${type2}' of the inherited setter '${name2}'.""" +
+ labeler.originMessages,
+ arguments: {
+ 'type': _type,
+ 'name': name,
+ 'type2': _type2,
+ 'name2': name2
+ });
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
Message Function(
DartType _type,
DartType _type2,
diff --git a/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart b/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
index 13c33ac..43778fe 100644
--- a/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
@@ -240,6 +240,9 @@
void inferType(ClassHierarchyBuilder hierarchy);
void registerOverrideDependency(ClassMember overriddenMember);
+
+ /// Returns `true` if this has the same underlying declaration as [other].
+ bool isSameDeclaration(ClassMember other);
}
bool hasSameSignature(FunctionNode a, FunctionNode b) {
@@ -326,9 +329,9 @@
final List<DelayedTypeComputation> _delayedTypeComputations =
<DelayedTypeComputation>[];
- final List<DelayedOverrideCheck> _overrideChecks = <DelayedOverrideCheck>[];
+ final List<DelayedCheck> _delayedChecks = <DelayedCheck>[];
- final List<ClassMember> _delayedMemberChecks = <ClassMember>[];
+ final List<ClassMember> _delayedMemberComputations = <ClassMember>[];
final CoreTypes coreTypes;
@@ -345,9 +348,9 @@
void clear() {
nodes.clear();
substitutions.clear();
- _overrideChecks.clear();
+ _delayedChecks.clear();
_delayedTypeComputations.clear();
- _delayedMemberChecks.clear();
+ _delayedMemberComputations.clear();
}
void registerDelayedTypeComputation(DelayedTypeComputation computation) {
@@ -356,11 +359,17 @@
void registerOverrideCheck(
SourceClassBuilder classBuilder, ClassMember a, ClassMember b) {
- _overrideChecks.add(new DelayedOverrideCheck(classBuilder, a, b));
+ _delayedChecks.add(new DelayedOverrideCheck(classBuilder, a, b));
}
- void registerMemberCheck(ClassMember member) {
- _delayedMemberChecks.add(member);
+ void registerGetterSetterCheck(
+ SourceClassBuilder classBuilder, ClassMember getter, ClassMember setter) {
+ _delayedChecks
+ .add(new DelayedGetterSetterCheck(classBuilder, getter, setter));
+ }
+
+ void registerMemberComputation(ClassMember member) {
+ _delayedMemberComputations.add(member);
}
List<DelayedTypeComputation> takeDelayedTypeComputations() {
@@ -369,15 +378,15 @@
return list;
}
- List<DelayedOverrideCheck> takeDelayedOverrideChecks() {
- List<DelayedOverrideCheck> list = _overrideChecks.toList();
- _overrideChecks.clear();
+ List<DelayedCheck> takeDelayedChecks() {
+ List<DelayedCheck> list = _delayedChecks.toList();
+ _delayedChecks.clear();
return list;
}
- List<ClassMember> takeDelayedMemberChecks() {
- List<ClassMember> list = _delayedMemberChecks.toList();
- _delayedMemberChecks.clear();
+ List<ClassMember> takeDelayedMemberComputations() {
+ List<ClassMember> list = _delayedMemberComputations.toList();
+ _delayedMemberComputations.clear();
return list;
}
@@ -1781,7 +1790,7 @@
shouldModifyKernel,
concrete.isAbstract,
concrete.name);
- hierarchy.registerMemberCheck(result);
+ hierarchy.registerMemberComputation(result);
}
} else if (classBuilder.isMixinApplication &&
declaredMember.classBuilder != classBuilder) {
@@ -1793,7 +1802,7 @@
shouldModifyKernel,
isInheritableConflict: false);
if (result.needsComputation) {
- hierarchy.registerMemberCheck(result);
+ hierarchy.registerMemberComputation(result);
}
}
@@ -1820,7 +1829,7 @@
}
if (extendedMember.isInheritableConflict) {
extendedMember = extendedMember.withParent(classBuilder);
- hierarchy.registerMemberCheck(extendedMember);
+ hierarchy.registerMemberComputation(extendedMember);
}
if (extendedMember.classBuilder.library.isNonNullableByDefault &&
!classBuilder.library.isNonNullableByDefault) {
@@ -1834,7 +1843,7 @@
extendedMember.isAbstract,
extendedMember.name,
isImplicitlyAbstract: extendedMember.isAbstract);
- hierarchy.registerMemberCheck(extendedMember);
+ hierarchy.registerMemberComputation(extendedMember);
}
}
return extendedMember;
@@ -1923,7 +1932,7 @@
shouldModifyKernel);
}
if (result.needsComputation) {
- hierarchy.registerMemberCheck(result);
+ hierarchy.registerMemberComputation(result);
}
}
@@ -1936,7 +1945,7 @@
}
if (interfaceMember.isInheritableConflict) {
interfaceMember = interfaceMember.withParent(classBuilder);
- hierarchy.registerMemberCheck(interfaceMember);
+ hierarchy.registerMemberComputation(interfaceMember);
}
if (interfaceMember.classBuilder.library.isNonNullableByDefault &&
!classBuilder.library.isNonNullableByDefault) {
@@ -1950,7 +1959,7 @@
interfaceMember.isAbstract,
interfaceMember.name,
isImplicitlyAbstract: interfaceMember.isAbstract);
- hierarchy.registerMemberCheck(interfaceMember);
+ hierarchy.registerMemberComputation(interfaceMember);
}
}
return interfaceMember;
@@ -2041,6 +2050,18 @@
classSetter = interfaceSetter;
}
}
+ if (classBuilder is SourceClassBuilder) {
+ ClassMember member = interfaceMember ?? classMember;
+ ClassMember setter = interfaceSetter ?? classSetter;
+ if (member != null &&
+ setter != null &&
+ member.isProperty &&
+ setter.isProperty &&
+ member.isStatic == setter.isStatic &&
+ !member.isSameDeclaration(setter)) {
+ hierarchy.registerGetterSetterCheck(classBuilder, member, setter);
+ }
+ }
if (classMember != null) {
classMemberMap[name] = classMember;
}
@@ -2576,7 +2597,11 @@
}
}
-class DelayedOverrideCheck {
+abstract class DelayedCheck {
+ void check(ClassHierarchyBuilder hierarchy);
+}
+
+class DelayedOverrideCheck implements DelayedCheck {
final SourceClassBuilder classBuilder;
final ClassMember declaredMember;
final ClassMember overriddenMember;
@@ -2599,6 +2624,20 @@
}
}
+class DelayedGetterSetterCheck implements DelayedCheck {
+ final SourceClassBuilder classBuilder;
+ final ClassMember getter;
+ final ClassMember setter;
+
+ const DelayedGetterSetterCheck(this.classBuilder, this.getter, this.setter);
+
+ void check(ClassHierarchyBuilder hierarchy) {
+ classBuilder.checkGetterSetter(hierarchy.types, getter.getMember(hierarchy),
+ setter.getMember(hierarchy),
+ isInterfaceCheck: !classBuilder.isMixinApplication);
+ }
+}
+
class DelayedTypeComputation {
final ClassHierarchyNodeBuilder builder;
final ClassMember declaredMember;
@@ -2830,6 +2869,12 @@
[this], isProperty, isSetter, modifyKernel, isAbstract, name);
}
+ @override
+ bool isSameDeclaration(ClassMember other) {
+ // This could be more precise but it currently has no benefit.
+ return identical(this, other);
+ }
+
static ClassMember combined(
ClassBuilder parent,
ClassMember concreteImplementation,
@@ -3114,6 +3159,12 @@
isImplicitlyAbstract: isImplicitlyAbstract);
}
+ @override
+ bool isSameDeclaration(ClassMember other) {
+ // This could be more precise but it currently has no benefit.
+ return identical(this, other);
+ }
+
static ClassMember combined(ClassBuilder parent, ClassMember a, ClassMember b,
bool isSetter, bool createForwarders) {
assert(a.isProperty == b.isProperty,
@@ -3236,6 +3287,15 @@
@override
ClassMember get concrete => concreteImplementation;
+
+ @override
+ bool isSameDeclaration(ClassMember other) {
+ if (identical(this, other)) return false;
+ return other is AbstractMemberOverridingImplementation &&
+ classBuilder == other.classBuilder &&
+ abstract.isSameDeclaration(other.abstract) &&
+ concrete.isSameDeclaration(other.concrete);
+ }
}
void addDeclarationIfDifferent(
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart
index b17364e3..c0b1459 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart
@@ -15,7 +15,7 @@
import '../combinator.dart' as fasta;
export 'class_hierarchy_builder.dart'
- show ClassHierarchyBuilder, ClassMember, DelayedOverrideCheck;
+ show ClassHierarchyBuilder, ClassMember, DelayedCheck;
export 'implicit_field_type.dart' show ImplicitFieldType;
diff --git a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
index a96c1f0..c58a522 100644
--- a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
@@ -1204,6 +1204,155 @@
// TODO(ahe): Handle other cases: accessors, operators, and fields.
}
+ void checkGetterSetter(Types types, Member getter, Member setter,
+ {bool isInterfaceCheck = false}) {
+ if (getter == setter) {
+ return;
+ }
+ if (cls != getter.enclosingClass &&
+ getter.enclosingClass == setter.enclosingClass) {
+ return;
+ }
+
+ DartType getterType = getter.getterType;
+ if (getter.enclosingClass.typeParameters.isNotEmpty) {
+ getterType = Substitution.fromPairs(
+ getter.enclosingClass.typeParameters,
+ types.hierarchy.getTypeArgumentsAsInstanceOf(
+ thisType, getter.enclosingClass))
+ .substituteType(getterType);
+ }
+
+ DartType setterType = setter.setterType;
+ if (setter.enclosingClass.typeParameters.isNotEmpty) {
+ setterType = Substitution.fromPairs(
+ setter.enclosingClass.typeParameters,
+ types.hierarchy.getTypeArgumentsAsInstanceOf(
+ thisType, setter.enclosingClass))
+ .substituteType(setterType);
+ }
+
+ if (getterType is InvalidType || setterType is InvalidType) {
+ // Don't report a problem as something else is wrong that has already
+ // been reported.
+ } else {
+ bool isValid = types.isSubtypeOf(
+ getterType,
+ setterType,
+ library.isNonNullableByDefault
+ ? SubtypeCheckMode.withNullabilities
+ : SubtypeCheckMode.ignoringNullabilities);
+ if (!isValid && !library.isNonNullableByDefault) {
+ // Allow assignability in legacy libraries.
+ isValid = types.isSubtypeOf(
+ setterType, getterType, SubtypeCheckMode.ignoringNullabilities);
+ }
+ if (!isValid) {
+ Member getterOrigin = getter.memberSignatureOrigin ?? getter;
+ Member setterOrigin = setter.memberSignatureOrigin ?? setter;
+ String getterMemberName = '${getterOrigin.enclosingClass.name}'
+ '.${getterOrigin.name.text}';
+ String setterMemberName = '${setterOrigin.enclosingClass.name}'
+ '.${setterOrigin.name.text}';
+ if (getterOrigin.enclosingClass == cls &&
+ setterOrigin.enclosingClass == cls) {
+ Template<Message Function(DartType, String, DartType, String, bool)>
+ template = library.isNonNullableByDefault
+ ? templateInvalidGetterSetterType
+ : templateInvalidGetterSetterTypeLegacy;
+ library.addProblem(
+ template.withArguments(getterType, getterMemberName, setterType,
+ setterMemberName, library.isNonNullableByDefault),
+ getterOrigin.fileOffset,
+ getterOrigin.name.text.length,
+ getterOrigin.fileUri,
+ context: [
+ templateInvalidGetterSetterTypeSetterContext
+ .withArguments(setterMemberName)
+ .withLocation(setterOrigin.fileUri, setterOrigin.fileOffset,
+ setterOrigin.name.text.length)
+ ]);
+ } else if (getterOrigin.enclosingClass == cls) {
+ Template<Message Function(DartType, String, DartType, String, bool)>
+ template = library.isNonNullableByDefault
+ ? templateInvalidGetterSetterTypeSetterInheritedGetter
+ : templateInvalidGetterSetterTypeSetterInheritedGetterLegacy;
+ if (getterOrigin is Field) {
+ template = library.isNonNullableByDefault
+ ? templateInvalidGetterSetterTypeSetterInheritedField
+ : templateInvalidGetterSetterTypeSetterInheritedFieldLegacy;
+ }
+ library.addProblem(
+ template.withArguments(getterType, getterMemberName, setterType,
+ setterMemberName, library.isNonNullableByDefault),
+ getterOrigin.fileOffset,
+ getterOrigin.name.text.length,
+ getterOrigin.fileUri,
+ context: [
+ templateInvalidGetterSetterTypeSetterContext
+ .withArguments(setterMemberName)
+ .withLocation(setterOrigin.fileUri, setterOrigin.fileOffset,
+ setterOrigin.name.text.length)
+ ]);
+ } else if (setterOrigin.enclosingClass == cls) {
+ Template<Message Function(DartType, String, DartType, String, bool)>
+ template = library.isNonNullableByDefault
+ ? templateInvalidGetterSetterTypeGetterInherited
+ : templateInvalidGetterSetterTypeGetterInheritedLegacy;
+ Template<Message Function(String)> context =
+ templateInvalidGetterSetterTypeGetterContext;
+ if (getterOrigin is Field) {
+ template = library.isNonNullableByDefault
+ ? templateInvalidGetterSetterTypeFieldInherited
+ : templateInvalidGetterSetterTypeFieldInheritedLegacy;
+ context = templateInvalidGetterSetterTypeFieldContext;
+ }
+ library.addProblem(
+ template.withArguments(getterType, getterMemberName, setterType,
+ setterMemberName, library.isNonNullableByDefault),
+ setterOrigin.fileOffset,
+ setterOrigin.name.text.length,
+ setterOrigin.fileUri,
+ context: [
+ context.withArguments(getterMemberName).withLocation(
+ getterOrigin.fileUri,
+ getterOrigin.fileOffset,
+ getterOrigin.name.text.length)
+ ]);
+ } else {
+ Template<Message Function(DartType, String, DartType, String, bool)>
+ template = library.isNonNullableByDefault
+ ? templateInvalidGetterSetterTypeBothInheritedGetter
+ : templateInvalidGetterSetterTypeBothInheritedGetterLegacy;
+ Template<Message Function(String)> context =
+ templateInvalidGetterSetterTypeGetterContext;
+ if (getterOrigin is Field) {
+ template = library.isNonNullableByDefault
+ ? templateInvalidGetterSetterTypeBothInheritedField
+ : templateInvalidGetterSetterTypeBothInheritedFieldLegacy;
+ context = templateInvalidGetterSetterTypeFieldContext;
+ }
+ library.addProblem(
+ template.withArguments(getterType, getterMemberName, setterType,
+ setterMemberName, library.isNonNullableByDefault),
+ charOffset,
+ noLength,
+ fileUri,
+ context: [
+ context.withArguments(getterMemberName).withLocation(
+ getterOrigin.fileUri,
+ getterOrigin.fileOffset,
+ getterOrigin.name.text.length),
+ templateInvalidGetterSetterTypeSetterContext
+ .withArguments(setterMemberName)
+ .withLocation(setterOrigin.fileUri, setterOrigin.fileOffset,
+ setterOrigin.name.text.length)
+ ]);
+ }
+ }
+ }
+ }
+
Uri _getMemberUri(Member member) {
if (member is Field) return member.fileUri;
if (member is Procedure) return member.fileUri;
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index 23761f4..14803dd 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -88,7 +88,7 @@
import '../fasta_codes.dart';
import '../kernel/kernel_builder.dart'
- show ClassHierarchyBuilder, ClassMember, DelayedOverrideCheck;
+ show ClassHierarchyBuilder, ClassMember, DelayedCheck;
import '../kernel/kernel_target.dart' show KernelTarget;
@@ -1026,8 +1026,7 @@
}
void checkOverrides(List<SourceClassBuilder> sourceClasses) {
- List<DelayedOverrideCheck> overrideChecks =
- builderHierarchy.takeDelayedOverrideChecks();
+ List<DelayedCheck> overrideChecks = builderHierarchy.takeDelayedChecks();
for (int i = 0; i < overrideChecks.length; i++) {
overrideChecks[i].check(builderHierarchy);
}
@@ -1039,7 +1038,7 @@
void checkAbstractMembers(List<SourceClassBuilder> sourceClasses) {
List<ClassMember> delayedMemberChecks =
- builderHierarchy.takeDelayedMemberChecks();
+ builderHierarchy.takeDelayedMemberComputations();
Set<Class> changedClasses = new Set<Class>();
for (int i = 0; i < delayedMemberChecks.length; i++) {
delayedMemberChecks[i].getMember(builderHierarchy);
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index c083e2c..5679493 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -416,6 +416,20 @@
InvalidCatchArguments/example: Fail
InvalidContinueTarget/analyzerCode: Fail
InvalidContinueTarget/example: Fail
+InvalidGetterSetterType/analyzerCode: Fail
+InvalidGetterSetterTypeBothInheritedField/analyzerCode: Fail
+InvalidGetterSetterTypeBothInheritedFieldLegacy/analyzerCode: Fail
+InvalidGetterSetterTypeBothInheritedGetter/analyzerCode: Fail
+InvalidGetterSetterTypeBothInheritedGetterLegacy/analyzerCode: Fail
+InvalidGetterSetterTypeFieldInherited/analyzerCode: Fail
+InvalidGetterSetterTypeFieldInheritedLegacy/analyzerCode: Fail
+InvalidGetterSetterTypeGetterInherited/analyzerCode: Fail
+InvalidGetterSetterTypeGetterInheritedLegacy/analyzerCode: Fail
+InvalidGetterSetterTypeLegacy/analyzerCode: Fail
+InvalidGetterSetterTypeSetterInheritedField/analyzerCode: Fail
+InvalidGetterSetterTypeSetterInheritedFieldLegacy/analyzerCode: Fail
+InvalidGetterSetterTypeSetterInheritedGetter/analyzerCode: Fail
+InvalidGetterSetterTypeSetterInheritedGetterLegacy/analyzerCode: Fail
InvalidInitializer/example: Fail
InvalidPackageUri/analyzerCode: Fail
InvalidPackageUri/example: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index d182347..7412866 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -2236,6 +2236,171 @@
method({required int? a});
}
+InvalidGetterSetterType:
+ template: "The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the setter '#name2'."
+ configuration: nnbd-strong
+ script: |
+ abstract class A {
+ num get property;
+ void set property(int i);
+ }
+
+InvalidGetterSetterTypeGetterInherited:
+ template: "The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the setter '#name2'."
+ configuration: nnbd-strong
+ script: |
+ abstract class A {
+ num get property;
+ }
+ abstract class B implements A {
+ void set property(int i);
+ }
+
+InvalidGetterSetterTypeFieldInherited:
+ template: "The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the setter '#name2'."
+ configuration: nnbd-strong
+ script: |
+ abstract class A {
+ final num property;
+ A(this.property);
+ }
+ abstract class B implements A {
+ void set property(int i);
+ }
+
+InvalidGetterSetterTypeSetterInheritedGetter:
+ template: "The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
+ configuration: nnbd-strong
+ script: |
+ abstract class A {
+ void set property(int i);
+ }
+ abstract class B implements A {
+ num get property;
+ }
+
+InvalidGetterSetterTypeSetterInheritedField:
+ template: "The type '#type' of the field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
+ configuration: nnbd-strong
+ script: |
+ abstract class A {
+ void set property(int i);
+ }
+ abstract class B implements A {
+ final num property;
+ B(this.property);
+ }
+
+InvalidGetterSetterTypeBothInheritedField:
+ template: "The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
+ configuration: nnbd-strong
+ script: |
+ abstract class A {
+ final num property;
+ A(this.property);
+ }
+ abstract class B {
+ void set property(int i);
+ }
+ abstract class C implements A, B {}
+
+InvalidGetterSetterTypeBothInheritedGetter:
+ template: "The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
+ configuration: nnbd-strong
+ script: |
+ abstract class A {
+ num get property;
+ }
+ abstract class B {
+ void set property(int i);
+ }
+ abstract class C implements A, B {}
+
+InvalidGetterSetterTypeLegacy:
+ template: "The type '#type' of the getter '#name' is not assignable to the type '#type2' of the setter '#name2'."
+ script: |
+ abstract class A {
+ String get property;
+ void set property(int i);
+ }
+
+InvalidGetterSetterTypeGetterInheritedLegacy:
+ template: "The type '#type' of the inherited getter '#name' is not assignable to the type '#type2' of the setter '#name2'."
+ script: |
+ abstract class A {
+ String get property;
+ }
+ abstract class B implements A {
+ void set property(int i);
+ }
+
+InvalidGetterSetterTypeFieldInheritedLegacy:
+ template: "The type '#type' of the inherited field '#name' is not assignable to the type '#type2' of the setter '#name2'."
+ script: |
+ abstract class A {
+ final String property;
+ A(this.property);
+ }
+ abstract class B implements A {
+ void set property(int i);
+ }
+
+InvalidGetterSetterTypeSetterInheritedGetterLegacy:
+ template: "The type '#type' of the getter '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
+ script: |
+ abstract class A {
+ void set property(int i);
+ }
+ abstract class B implements A {
+ String get property;
+ }
+
+InvalidGetterSetterTypeSetterInheritedFieldLegacy:
+ template: "The type '#type' of the field '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
+ script: |
+ abstract class A {
+ void set property(int i);
+ }
+ abstract class B implements A {
+ final String property;
+ B(this.property);
+ }
+
+InvalidGetterSetterTypeBothInheritedFieldLegacy:
+ template: "The type '#type' of the inherited field '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
+ script: |
+ abstract class A {
+ final String property;
+ A(this.property);
+ }
+ abstract class B {
+ void set property(int i);
+ }
+ abstract class C implements A, B {}
+
+InvalidGetterSetterTypeBothInheritedGetterLegacy:
+ template: "The type '#type' of the inherited getter '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
+ script: |
+ abstract class A {
+ String get property;
+ }
+ abstract class B {
+ void set property(int i);
+ }
+ abstract class C implements A, B {}
+
+InvalidGetterSetterTypeFieldContext:
+ template: "This is the declaration of the field '#name'."
+ severity: CONTEXT
+
+InvalidGetterSetterTypeGetterContext:
+ template: "This is the declaration of the getter '#name'."
+ severity: CONTEXT
+
+InvalidGetterSetterTypeSetterContext:
+ template: "This is the declaration of the setter '#name'."
+ severity: CONTEXT
+
PartOfSelf:
template: "A file can't be a part of itself."
analyzerCode: PART_OF_NON_PART
diff --git a/pkg/front_end/test/fasta/bootstrap_test.dart b/pkg/front_end/test/fasta/bootstrap_test.dart
index 39effb5..37dff17 100644
--- a/pkg/front_end/test/fasta/bootstrap_test.dart
+++ b/pkg/front_end/test/fasta/bootstrap_test.dart
@@ -59,7 +59,7 @@
],
suppressOutput: false);
if (result.exitCode != 0) {
- throw "Compilation failed.";
+ throw "Compilation failed:\n${result.output}";
}
}
diff --git a/pkg/front_end/testcases/expression/main.dart b/pkg/front_end/testcases/expression/main.dart
index e38cbea..91ad8d9 100644
--- a/pkg/front_end/testcases/expression/main.dart
+++ b/pkg/front_end/testcases/expression/main.dart
@@ -42,7 +42,7 @@
return "";
}
- void set z(int _) {}
+ void set z(_) {}
void _privMethod() {}
}
diff --git a/pkg/front_end/testcases/general/getter_vs_setter_type.dart b/pkg/front_end/testcases/general/getter_vs_setter_type.dart
new file mode 100644
index 0000000..2f92b93
--- /dev/null
+++ b/pkg/front_end/testcases/general/getter_vs_setter_type.dart
@@ -0,0 +1,105 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class A {
+ int get property1; // ok
+ void set property1(int i);
+
+ int get property2; // ok
+ void set property2(int i);
+
+ String get property3; // error
+ void set property3(int i);
+
+ int property4; // ok
+
+ int property5; // ok
+
+ covariant String property6; // ok
+}
+
+abstract class B1 {
+ int get property1;
+
+ int get property2;
+
+ String get property3;
+
+ final int property4;
+
+ final int property5;
+
+ final String property6;
+
+ B1(this.property4, this.property5, this.property6);
+}
+
+abstract class B2 implements B1 {
+ void set property1(int i); // ok
+
+ void set property2(String i); // error
+
+ void set property3(int i); // error
+
+ void set property4(int i); // ok
+
+ void set property5(String i); // error
+
+ void set property6(int i); // error
+}
+
+abstract class C1 {
+ void set property1(int i);
+
+ void set property2(String i);
+
+ void set property3(int i);
+
+ int property4;
+
+ String property5;
+
+ int property6;
+}
+
+abstract class C2 implements C1 {
+ int get property1; // ok
+
+ int get property2; // error
+
+ String get property3; // error
+
+ int get property4; // ok
+
+ // This results in two errors; one for the getter/setter type mismatch and one
+ // for the getter override.
+ int get property5; // error
+
+ // This results in two errors; one for the getter/setter type mismatch and one
+ // for the getter override.
+ String get property6; // error
+}
+
+abstract class D1 {
+ int get property1;
+
+ int get property2;
+
+ String get property3;
+}
+
+abstract class D2 {
+ void set property1(int i);
+
+ void set property2(String i);
+
+ void set property3(int i);
+}
+
+abstract class D3 implements D1, D2 /* error on property2 and property3 */ {}
+
+abstract class D4
+ implements D3 /* no need for error on property2 and property3 */ {}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/getter_vs_setter_type.dart.outline.expect b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.outline.expect
new file mode 100644
index 0000000..d0db1ea
--- /dev/null
+++ b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.outline.expect
@@ -0,0 +1,293 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:12:14: Error: The type 'String' of the getter 'A.property3' is not assignable to the type 'int' of the setter 'A.property3'.
+// String get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:13:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:41:12: Error: The type 'int' of the inherited getter 'B1.property2' is not assignable to the type 'String' of the setter 'B2.property2'.
+// void set property2(String i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:25:11: Context: This is the declaration of the getter 'B1.property2'.
+// int get property2;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:43:12: Error: The type 'String' of the inherited getter 'B1.property3' is not assignable to the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:27:14: Context: This is the declaration of the getter 'B1.property3'.
+// String get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:47:12: Error: The type 'int' of the inherited field 'B1.property5' is not assignable to the type 'String' of the setter 'B2.property5'.
+// void set property5(String i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:31:13: Context: This is the declaration of the field 'B1.property5'.
+// final int property5;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:49:12: Error: The type 'String' of the inherited field 'B1.property6' is not assignable to the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:33:16: Context: This is the declaration of the field 'B1.property6'.
+// final String property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:69:11: Error: The type 'int' of the getter 'C2.property2' is not assignable to the type 'String' of the inherited setter 'C1.property2'.
+// int get property2; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:55:12: Context: This is the declaration of the setter 'C1.property2'.
+// void set property2(String i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:71:14: Error: The type 'String' of the getter 'C2.property3' is not assignable to the type 'int' of the inherited setter 'C1.property3'.
+// String get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:57:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:77:11: Error: The return type of the method 'C2.property5' is 'int', which does not match the return type, 'String', of the overridden method, 'C1.property5'.
+// Change to a subtype of 'String'.
+// int get property5; // error
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:61:10: Context: This is the overridden method ('property5').
+// String property5;
+// ^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:77:11: Error: The type 'int' of the getter 'C2.property5' is not assignable to the type 'String' of the inherited setter 'C1.property5'.
+// int get property5; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:61:10: Context: This is the declaration of the setter 'C1.property5'.
+// String property5;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:81:14: Error: The return type of the method 'C2.property6' is 'String', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// String get property6; // error
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:63:7: Context: This is the overridden method ('property6').
+// int property6;
+// ^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:81:14: Error: The type 'String' of the getter 'C2.property6' is not assignable to the type 'int' of the inherited setter 'C1.property6'.
+// String get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:63:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:100:16: Error: The type 'int' of the inherited getter 'D1.property2' is not assignable to the type 'String' of the inherited setter 'D2.property2'.
+// abstract class D3 implements D1, D2 /* error on property2 and property3 */ {}
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:87:11: Context: This is the declaration of the getter 'D1.property2'.
+// int get property2;
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:95:12: Context: This is the declaration of the setter 'D2.property2'.
+// void set property2(String i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:100:16: Error: The type 'String' of the inherited getter 'D1.property3' is not assignable to the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property2 and property3 */ {}
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:89:14: Context: This is the declaration of the getter 'D1.property3'.
+// String get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:97:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:102:16: Error: The type 'int' of the inherited getter 'D1.property2' is not assignable to the type 'String' of the inherited setter 'D2.property2'.
+// abstract class D4
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:87:11: Context: This is the declaration of the getter 'D1.property2'.
+// int get property2;
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:95:12: Context: This is the declaration of the setter 'D2.property2'.
+// void set property2(String i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:102:16: Error: The type 'String' of the inherited getter 'D1.property3' is not assignable to the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:89:14: Context: This is the declaration of the getter 'D1.property3'.
+// String get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:97:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int* property4;
+ field core::int* property5;
+ covariant field core::String* property6;
+ synthetic constructor •() → self::A*
+ ;
+ abstract get property1() → core::int*;
+ abstract set property1(core::int* i) → void;
+ abstract get property2() → core::int*;
+ abstract set property2(core::int* i) → void;
+ abstract get property3() → core::String*;
+ abstract set property3(core::int* i) → 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class B1 extends core::Object {
+ final field core::int* property4;
+ final field core::int* property5;
+ final field core::String* property6;
+ constructor •(core::int* property4, core::int* property5, core::String* property6) → self::B1*
+ ;
+ abstract get property1() → core::int*;
+ abstract get property2() → core::int*;
+ abstract get property3() → core::String*;
+ 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2*
+ ;
+ abstract set property1(core::int* i) → void;
+ abstract set property2(core::String* i) → void;
+ abstract set property3(core::int* i) → void;
+ abstract set property4(core::int* i) → void;
+ abstract set property5(core::String* i) → void;
+ abstract set property6(core::int* i) → 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class C1 extends core::Object {
+ field core::int* property4;
+ field core::String* property5;
+ field core::int* property6;
+ synthetic constructor •() → self::C1*
+ ;
+ abstract set property1(core::int* i) → void;
+ abstract set property2(core::String* i) → void;
+ abstract set property3(core::int* i) → 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2*
+ ;
+ abstract get property1() → core::int*;
+ abstract get property2() → core::int*;
+ abstract get property3() → core::String*;
+ abstract get property4() → core::int*;
+ abstract get property5() → core::int*;
+ abstract get property6() → core::String*;
+ 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class D1 extends core::Object {
+ synthetic constructor •() → self::D1*
+ ;
+ abstract get property1() → core::int*;
+ abstract get property2() → core::int*;
+ abstract get property3() → core::String*;
+ 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class D2 extends core::Object {
+ synthetic constructor •() → self::D2*
+ ;
+ abstract set property1(core::int* i) → void;
+ abstract set property2(core::String* i) → void;
+ abstract set property3(core::int* i) → 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3*
+ ;
+ 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4*
+ ;
+ 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/general/getter_vs_setter_type.dart.strong.expect b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.strong.expect
new file mode 100644
index 0000000..eb497ad
--- /dev/null
+++ b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.strong.expect
@@ -0,0 +1,301 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:12:14: Error: The type 'String' of the getter 'A.property3' is not assignable to the type 'int' of the setter 'A.property3'.
+// String get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:13:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:41:12: Error: The type 'int' of the inherited getter 'B1.property2' is not assignable to the type 'String' of the setter 'B2.property2'.
+// void set property2(String i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:25:11: Context: This is the declaration of the getter 'B1.property2'.
+// int get property2;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:43:12: Error: The type 'String' of the inherited getter 'B1.property3' is not assignable to the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:27:14: Context: This is the declaration of the getter 'B1.property3'.
+// String get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:47:12: Error: The type 'int' of the inherited field 'B1.property5' is not assignable to the type 'String' of the setter 'B2.property5'.
+// void set property5(String i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:31:13: Context: This is the declaration of the field 'B1.property5'.
+// final int property5;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:49:12: Error: The type 'String' of the inherited field 'B1.property6' is not assignable to the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:33:16: Context: This is the declaration of the field 'B1.property6'.
+// final String property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:69:11: Error: The type 'int' of the getter 'C2.property2' is not assignable to the type 'String' of the inherited setter 'C1.property2'.
+// int get property2; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:55:12: Context: This is the declaration of the setter 'C1.property2'.
+// void set property2(String i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:71:14: Error: The type 'String' of the getter 'C2.property3' is not assignable to the type 'int' of the inherited setter 'C1.property3'.
+// String get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:57:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:77:11: Error: The return type of the method 'C2.property5' is 'int', which does not match the return type, 'String', of the overridden method, 'C1.property5'.
+// Change to a subtype of 'String'.
+// int get property5; // error
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:61:10: Context: This is the overridden method ('property5').
+// String property5;
+// ^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:77:11: Error: The type 'int' of the getter 'C2.property5' is not assignable to the type 'String' of the inherited setter 'C1.property5'.
+// int get property5; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:61:10: Context: This is the declaration of the setter 'C1.property5'.
+// String property5;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:81:14: Error: The return type of the method 'C2.property6' is 'String', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// String get property6; // error
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:63:7: Context: This is the overridden method ('property6').
+// int property6;
+// ^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:81:14: Error: The type 'String' of the getter 'C2.property6' is not assignable to the type 'int' of the inherited setter 'C1.property6'.
+// String get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:63:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:100:16: Error: The type 'int' of the inherited getter 'D1.property2' is not assignable to the type 'String' of the inherited setter 'D2.property2'.
+// abstract class D3 implements D1, D2 /* error on property2 and property3 */ {}
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:87:11: Context: This is the declaration of the getter 'D1.property2'.
+// int get property2;
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:95:12: Context: This is the declaration of the setter 'D2.property2'.
+// void set property2(String i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:100:16: Error: The type 'String' of the inherited getter 'D1.property3' is not assignable to the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property2 and property3 */ {}
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:89:14: Context: This is the declaration of the getter 'D1.property3'.
+// String get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:97:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:102:16: Error: The type 'int' of the inherited getter 'D1.property2' is not assignable to the type 'String' of the inherited setter 'D2.property2'.
+// abstract class D4
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:87:11: Context: This is the declaration of the getter 'D1.property2'.
+// int get property2;
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:95:12: Context: This is the declaration of the setter 'D2.property2'.
+// void set property2(String i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:102:16: Error: The type 'String' of the inherited getter 'D1.property3' is not assignable to the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4
+// ^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:89:14: Context: This is the declaration of the getter 'D1.property3'.
+// String get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/general/getter_vs_setter_type.dart:97:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int* property4 = null;
+ field core::int* property5 = null;
+ covariant field core::String* property6 = null;
+ synthetic constructor •() → self::A*
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int*;
+ abstract set property1(core::int* i) → void;
+ abstract get property2() → core::int*;
+ abstract set property2(core::int* i) → void;
+ abstract get property3() → core::String*;
+ abstract set property3(core::int* i) → 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class B1 extends core::Object {
+ final field core::int* property4;
+ final field core::int* property5;
+ final field core::String* property6;
+ constructor •(core::int* property4, core::int* property5, core::String* property6) → self::B1*
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int*;
+ abstract get property2() → core::int*;
+ abstract get property3() → core::String*;
+ 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2*
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int* i) → void;
+ abstract set property2(core::String* i) → void;
+ abstract set property3(core::int* i) → void;
+ abstract set property4(core::int* i) → void;
+ abstract set property5(core::String* i) → void;
+ abstract set property6(core::int* i) → 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class C1 extends core::Object {
+ field core::int* property4 = null;
+ field core::String* property5 = null;
+ field core::int* property6 = null;
+ synthetic constructor •() → self::C1*
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int* i) → void;
+ abstract set property2(core::String* i) → void;
+ abstract set property3(core::int* i) → 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2*
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int*;
+ abstract get property2() → core::int*;
+ abstract get property3() → core::String*;
+ abstract get property4() → core::int*;
+ abstract get property5() → core::int*;
+ abstract get property6() → core::String*;
+ 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class D1 extends core::Object {
+ synthetic constructor •() → self::D1*
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int*;
+ abstract get property2() → core::int*;
+ abstract get property3() → core::String*;
+ 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class D2 extends core::Object {
+ synthetic constructor •() → self::D2*
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int* i) → void;
+ abstract set property2(core::String* i) → void;
+ abstract set property3(core::int* i) → 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3*
+ : super core::Object::•()
+ ;
+ 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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 class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4*
+ : super core::Object::•()
+ ;
+ 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
+ abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+ abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+ abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+ abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+ 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
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/getter_vs_setter_type.dart.textual_outline.expect b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.textual_outline.expect
new file mode 100644
index 0000000..2018462
--- /dev/null
+++ b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.textual_outline.expect
@@ -0,0 +1,66 @@
+abstract class A {
+ int get property1;
+ void set property1(int i);
+ int get property2;
+ void set property2(int i);
+ String get property3;
+ void set property3(int i);
+ int property4;
+ int property5;
+ covariant String property6;
+}
+
+abstract class B1 {
+ int get property1;
+ int get property2;
+ String get property3;
+ final int property4;
+ final int property5;
+ final String property6;
+ B1(this.property4, this.property5, this.property6);
+}
+
+abstract class B2 implements B1 {
+ void set property1(int i);
+ void set property2(String i);
+ void set property3(int i);
+ void set property4(int i);
+ void set property5(String i);
+ void set property6(int i);
+}
+
+abstract class C1 {
+ void set property1(int i);
+ void set property2(String i);
+ void set property3(int i);
+ int property4;
+ String property5;
+ int property6;
+}
+
+abstract class C2 implements C1 {
+ int get property1;
+ int get property2;
+ String get property3;
+ int get property4;
+ int get property5;
+ String get property6;
+}
+
+abstract class D1 {
+ int get property1;
+ int get property2;
+ String get property3;
+}
+
+abstract class D2 {
+ void set property1(int i);
+ void set property2(String i);
+ void set property3(int i);
+}
+
+abstract class D3 implements D1, D2 {}
+
+abstract class D4 implements D3 {}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/getter_vs_setter_type.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..22c0c24
--- /dev/null
+++ b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.textual_outline_modelled.expect
@@ -0,0 +1,66 @@
+abstract class A {
+ String get property3;
+ covariant String property6;
+ int get property1;
+ int get property2;
+ int property4;
+ int property5;
+ void set property1(int i);
+ void set property2(int i);
+ void set property3(int i);
+}
+
+abstract class B1 {
+ B1(this.property4, this.property5, this.property6);
+ String get property3;
+ final String property6;
+ final int property4;
+ final int property5;
+ int get property1;
+ int get property2;
+}
+
+abstract class B2 implements B1 {
+ void set property1(int i);
+ void set property2(String i);
+ void set property3(int i);
+ void set property4(int i);
+ void set property5(String i);
+ void set property6(int i);
+}
+
+abstract class C1 {
+ String property5;
+ int property4;
+ int property6;
+ void set property1(int i);
+ void set property2(String i);
+ void set property3(int i);
+}
+
+abstract class C2 implements C1 {
+ String get property3;
+ String get property6;
+ int get property1;
+ int get property2;
+ int get property4;
+ int get property5;
+}
+
+abstract class D1 {
+ String get property3;
+ int get property1;
+ int get property2;
+}
+
+abstract class D2 {
+ void set property1(int i);
+ void set property2(String i);
+ void set property3(int i);
+}
+
+abstract class D3 implements D1, D2 {}
+
+abstract class D4 implements D3 {}
+
+main() {}
diff --git a/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.outline.expect b/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.outline.expect
index e645d8d..b9c9e68 100644
--- a/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.outline.expect
@@ -1,4 +1,21 @@
library test;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:9:11: Error: The type 'int' of the getter 'A.x' is not assignable to the type 'double' of the setter 'A.x'.
+// int get x;
+// ^
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:10:12: Context: This is the declaration of the setter 'A.x'.
+// void set x(double value) {}
+// ^
+//
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:14:9: Error: The type 'int' of the field 'B.x' is not assignable to the type 'double' of the inherited setter 'A.x'.
+// final x;
+// ^
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:10:12: Context: This is the declaration of the setter 'A.x'.
+// void set x(double value) {}
+// ^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.strong.expect b/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.strong.expect
index 5cb9148..3eab43e 100644
--- a/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.strong.expect
@@ -1,4 +1,21 @@
library test;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:9:11: Error: The type 'int' of the getter 'A.x' is not assignable to the type 'double' of the setter 'A.x'.
+// int get x;
+// ^
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:10:12: Context: This is the declaration of the setter 'A.x'.
+// void set x(double value) {}
+// ^
+//
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:14:9: Error: The type 'int' of the field 'B.x' is not assignable to the type 'double' of the inherited setter 'A.x'.
+// final x;
+// ^
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:10:12: Context: This is the declaration of the setter 'A.x'.
+// void set x(double value) {}
+// ^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.strong.transformed.expect
index 5cb9148..3eab43e 100644
--- a/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart.strong.transformed.expect
@@ -1,4 +1,21 @@
library test;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:9:11: Error: The type 'int' of the getter 'A.x' is not assignable to the type 'double' of the setter 'A.x'.
+// int get x;
+// ^
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:10:12: Context: This is the declaration of the setter 'A.x'.
+// void set x(double value) {}
+// ^
+//
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:14:9: Error: The type 'int' of the field 'B.x' is not assignable to the type 'double' of the inherited setter 'A.x'.
+// final x;
+// ^
+// pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart:10:12: Context: This is the declaration of the setter 'A.x'.
+// void set x(double value) {}
+// ^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.outline.expect b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.outline.expect
index 0672d55..1385117 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.outline.expect
+++ b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.outline.expect
@@ -13,6 +13,13 @@
// void set x(double value);
// ^
//
+// pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:9:11: Error: The type 'int' of the getter 'A.x' is not assignable to the type 'double' of the setter 'A.x'.
+// int get x;
+// ^
+// pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:10:12: Context: This is the declaration of the setter 'A.x'.
+// void set x(double value);
+// ^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect
index 60eda17..c0bc8d0 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect
@@ -13,6 +13,13 @@
// void set x(double value);
// ^
//
+// pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:9:11: Error: The type 'int' of the getter 'A.x' is not assignable to the type 'double' of the setter 'A.x'.
+// int get x;
+// ^
+// pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:10:12: Context: This is the declaration of the setter 'A.x'.
+// void set x(double value);
+// ^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.transformed.expect
index 60eda17..c0bc8d0 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.transformed.expect
@@ -13,6 +13,13 @@
// void set x(double value);
// ^
//
+// pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:9:11: Error: The type 'int' of the getter 'A.x' is not assignable to the type 'double' of the setter 'A.x'.
+// int get x;
+// ^
+// pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:10:12: Context: This is the declaration of the setter 'A.x'.
+// void set x(double value);
+// ^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.outline.expect b/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.outline.expect
index d0171ae..1dedb62 100644
--- a/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.outline.expect
+++ b/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.outline.expect
@@ -1,4 +1,16 @@
library test;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/inference_new/property_assign_combiner.dart:29:9: Error: The type 'A' of the getter 'G.target' is not assignable to the type 'B' of the setter 'G.target'.
+// - 'A' is from 'pkg/front_end/testcases/inference_new/property_assign_combiner.dart'.
+// - 'B' is from 'pkg/front_end/testcases/inference_new/property_assign_combiner.dart'.
+// A get target => null;
+// ^^^^^^
+// pkg/front_end/testcases/inference_new/property_assign_combiner.dart:31:12: Context: This is the declaration of the setter 'G.target'.
+// void set target(B value) {}
+// ^^^^^^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.strong.expect b/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.strong.expect
index 165d38e..b551bed 100644
--- a/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.strong.expect
@@ -1,4 +1,16 @@
library test;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/inference_new/property_assign_combiner.dart:29:9: Error: The type 'A' of the getter 'G.target' is not assignable to the type 'B' of the setter 'G.target'.
+// - 'A' is from 'pkg/front_end/testcases/inference_new/property_assign_combiner.dart'.
+// - 'B' is from 'pkg/front_end/testcases/inference_new/property_assign_combiner.dart'.
+// A get target => null;
+// ^^^^^^
+// pkg/front_end/testcases/inference_new/property_assign_combiner.dart:31:12: Context: This is the declaration of the setter 'G.target'.
+// void set target(B value) {}
+// ^^^^^^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.strong.transformed.expect
index 165d38e..b551bed 100644
--- a/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/property_assign_combiner.dart.strong.transformed.expect
@@ -1,4 +1,16 @@
library test;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/inference_new/property_assign_combiner.dart:29:9: Error: The type 'A' of the getter 'G.target' is not assignable to the type 'B' of the setter 'G.target'.
+// - 'A' is from 'pkg/front_end/testcases/inference_new/property_assign_combiner.dart'.
+// - 'B' is from 'pkg/front_end/testcases/inference_new/property_assign_combiner.dart'.
+// A get target => null;
+// ^^^^^^
+// pkg/front_end/testcases/inference_new/property_assign_combiner.dart:31:12: Context: This is the declaration of the setter 'G.target'.
+// void set target(B value) {}
+// ^^^^^^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart
new file mode 100644
index 0000000..90ac015
--- /dev/null
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class A {
+ late int property4; // ok
+
+ late int? property5; // ok
+
+ covariant late int property6; // ok
+
+ A(this.property4, this.property5, this.property6);
+}
+
+abstract class B1 {
+ late final int property4;
+
+ late final int property5;
+
+ late final int? property6;
+
+ B1(this.property4, this.property5, this.property6);
+}
+
+abstract class B2 implements B1 {
+ void set property4(int i); // ok
+
+ void set property5(int? i); // ok
+
+ // This results in two errors; one for the getter/setter type mismatch and one
+ // for the getter override.
+ void set property6(int i); // error
+}
+
+abstract class C1 {
+ late int property4;
+
+ late int property5;
+
+ late int property6;
+
+ C1(this.property4, this.property5, this.property6);
+}
+
+abstract class C2 implements C1 {
+ int get property4; // ok
+
+ int get property5; // ok
+
+ // This results in two errors; one for the getter/setter type mismatch and one
+ // for the getter override.
+ int? get property6; // error
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.outline.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.outline.expect
new file mode 100644
index 0000000..7c87b5f
--- /dev/null
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.outline.expect
@@ -0,0 +1,94 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:32:26: Error: The parameter 'i' of the method 'B2.property6' has type 'int', which does not match the corresponding type, 'int?', in the overridden method, 'B1.property6'.
+// Change to a supertype of 'int?', or, for a covariant parameter, a subtype.
+// void set property6(int i); // error
+// ^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:20:19: Context: This is the overridden method ('property6').
+// late final int? property6;
+// ^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:32:12: Error: The type 'int?' of the inherited getter 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:20:19: Context: This is the declaration of the getter 'B1.property6'.
+// late final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:52:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:40:12: Context: This is the overridden method ('property6').
+// late int property6;
+// ^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:52:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:40:12: Context: This is the declaration of the setter 'C1.property6'.
+// late int property6;
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int? _#A#property4;
+ field core::int? _#A#property5;
+ field core::bool _#A#property5#isSet;
+ field core::int? _#A#property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ ;
+ get property4() → core::int;
+ set property4(core::int #t1) → void;
+ get property5() → core::int?;
+ set property5(core::int? #t2) → void;
+ get property6() → core::int;
+ set property6(covariant core::int #t3) → void;
+}
+abstract class B1 extends core::Object {
+ field core::int? _#B1#property4;
+ field core::int? _#B1#property5;
+ field core::int? _#B1#property6;
+ field core::bool _#B1#property6#isSet;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ ;
+ get property4() → core::int;
+ set property4(core::int #t4) → void;
+ get property5() → core::int;
+ set property5(core::int #t5) → void;
+ get property6() → core::int?;
+ set property6(core::int? #t6) → void;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ ;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int? _#C1#property4;
+ field core::int? _#C1#property5;
+ field core::int? _#C1#property6;
+ constructor •(core::int property4, core::int property5, core::int property6) → self::C1
+ ;
+ get property4() → core::int;
+ set property4(core::int #t7) → void;
+ get property5() → core::int;
+ set property5(core::int #t8) → void;
+ get property6() → core::int;
+ set property6(core::int #t9) → void;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ ;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.expect
new file mode 100644
index 0000000..9248820
--- /dev/null
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.expect
@@ -0,0 +1,130 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:32:26: Error: The parameter 'i' of the method 'B2.property6' has type 'int', which does not match the corresponding type, 'int?', in the overridden method, 'B1.property6'.
+// Change to a supertype of 'int?', or, for a covariant parameter, a subtype.
+// void set property6(int i); // error
+// ^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:20:19: Context: This is the overridden method ('property6').
+// late final int? property6;
+// ^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:32:12: Error: The type 'int?' of the inherited getter 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:20:19: Context: This is the declaration of the getter 'B1.property6'.
+// late final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:52:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:40:12: Context: This is the overridden method ('property6').
+// late int property6;
+// ^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:52:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:40:12: Context: This is the declaration of the setter 'C1.property6'.
+// late int property6;
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:_internal" as _in;
+
+abstract class A extends core::Object {
+ field core::int? _#A#property4 = null;
+ field core::int? _#A#property5 = null;
+ field core::bool _#A#property5#isSet = false;
+ field core::int? _#A#property6 = null;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::_#A#property4 = property4, self::A::_#A#property5#isSet = true, self::A::_#A#property5 = property5, self::A::_#A#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return let final core::int? #t1 = this.{self::A::_#A#property4} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t1{core::int};
+ set property4(core::int #t2) → void
+ this.{self::A::_#A#property4} = #t2;
+ get property5() → core::int?
+ return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ set property5(core::int? #t3) → void {
+ this.{self::A::_#A#property5#isSet} = true;
+ this.{self::A::_#A#property5} = #t3;
+ }
+ get property6() → core::int
+ return let final core::int? #t4 = this.{self::A::_#A#property6} in #t4.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.") : #t4{core::int};
+ set property6(covariant core::int #t5) → void
+ this.{self::A::_#A#property6} = #t5;
+}
+abstract class B1 extends core::Object {
+ field core::int? _#B1#property4 = null;
+ field core::int? _#B1#property5 = null;
+ field core::int? _#B1#property6 = null;
+ field core::bool _#B1#property6#isSet = false;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::_#B1#property4 = property4, self::B1::_#B1#property5 = property5, self::B1::_#B1#property6#isSet = true, self::B1::_#B1#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t6{core::int};
+ set property4(core::int #t7) → void
+ if(this.{self::B1::_#B1#property4}.==(null))
+ this.{self::B1::_#B1#property4} = #t7;
+ else
+ throw new _in::LateInitializationErrorImpl::•("Field 'property4' has already been initialized.");
+ get property5() → core::int
+ return let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.") : #t8{core::int};
+ set property5(core::int #t9) → void
+ if(this.{self::B1::_#B1#property5}.==(null))
+ this.{self::B1::_#B1#property5} = #t9;
+ else
+ throw new _in::LateInitializationErrorImpl::•("Field 'property5' has already been initialized.");
+ get property6() → core::int?
+ return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ set property6(core::int? #t10) → void
+ if(this.{self::B1::_#B1#property6#isSet})
+ throw new _in::LateInitializationErrorImpl::•("Field 'property6' has already been initialized.");
+ else {
+ this.{self::B1::_#B1#property6#isSet} = true;
+ this.{self::B1::_#B1#property6} = #t10;
+ }
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int? _#C1#property4 = null;
+ field core::int? _#C1#property5 = null;
+ field core::int? _#C1#property6 = null;
+ constructor •(core::int property4, core::int property5, core::int property6) → self::C1
+ : self::C1::_#C1#property4 = property4, self::C1::_#C1#property5 = property5, self::C1::_#C1#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t11{core::int};
+ set property4(core::int #t12) → void
+ this.{self::C1::_#C1#property4} = #t12;
+ get property5() → core::int
+ return let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.") : #t13{core::int};
+ set property5(core::int #t14) → void
+ this.{self::C1::_#C1#property5} = #t14;
+ get property6() → core::int
+ return let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.") : #t15{core::int};
+ set property6(core::int #t16) → void
+ this.{self::C1::_#C1#property6} = #t16;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.transformed.expect
new file mode 100644
index 0000000..9248820
--- /dev/null
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.transformed.expect
@@ -0,0 +1,130 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:32:26: Error: The parameter 'i' of the method 'B2.property6' has type 'int', which does not match the corresponding type, 'int?', in the overridden method, 'B1.property6'.
+// Change to a supertype of 'int?', or, for a covariant parameter, a subtype.
+// void set property6(int i); // error
+// ^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:20:19: Context: This is the overridden method ('property6').
+// late final int? property6;
+// ^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:32:12: Error: The type 'int?' of the inherited getter 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:20:19: Context: This is the declaration of the getter 'B1.property6'.
+// late final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:52:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:40:12: Context: This is the overridden method ('property6').
+// late int property6;
+// ^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:52:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:40:12: Context: This is the declaration of the setter 'C1.property6'.
+// late int property6;
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:_internal" as _in;
+
+abstract class A extends core::Object {
+ field core::int? _#A#property4 = null;
+ field core::int? _#A#property5 = null;
+ field core::bool _#A#property5#isSet = false;
+ field core::int? _#A#property6 = null;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::_#A#property4 = property4, self::A::_#A#property5#isSet = true, self::A::_#A#property5 = property5, self::A::_#A#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return let final core::int? #t1 = this.{self::A::_#A#property4} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t1{core::int};
+ set property4(core::int #t2) → void
+ this.{self::A::_#A#property4} = #t2;
+ get property5() → core::int?
+ return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ set property5(core::int? #t3) → void {
+ this.{self::A::_#A#property5#isSet} = true;
+ this.{self::A::_#A#property5} = #t3;
+ }
+ get property6() → core::int
+ return let final core::int? #t4 = this.{self::A::_#A#property6} in #t4.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.") : #t4{core::int};
+ set property6(covariant core::int #t5) → void
+ this.{self::A::_#A#property6} = #t5;
+}
+abstract class B1 extends core::Object {
+ field core::int? _#B1#property4 = null;
+ field core::int? _#B1#property5 = null;
+ field core::int? _#B1#property6 = null;
+ field core::bool _#B1#property6#isSet = false;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::_#B1#property4 = property4, self::B1::_#B1#property5 = property5, self::B1::_#B1#property6#isSet = true, self::B1::_#B1#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t6{core::int};
+ set property4(core::int #t7) → void
+ if(this.{self::B1::_#B1#property4}.==(null))
+ this.{self::B1::_#B1#property4} = #t7;
+ else
+ throw new _in::LateInitializationErrorImpl::•("Field 'property4' has already been initialized.");
+ get property5() → core::int
+ return let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.") : #t8{core::int};
+ set property5(core::int #t9) → void
+ if(this.{self::B1::_#B1#property5}.==(null))
+ this.{self::B1::_#B1#property5} = #t9;
+ else
+ throw new _in::LateInitializationErrorImpl::•("Field 'property5' has already been initialized.");
+ get property6() → core::int?
+ return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ set property6(core::int? #t10) → void
+ if(this.{self::B1::_#B1#property6#isSet})
+ throw new _in::LateInitializationErrorImpl::•("Field 'property6' has already been initialized.");
+ else {
+ this.{self::B1::_#B1#property6#isSet} = true;
+ this.{self::B1::_#B1#property6} = #t10;
+ }
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int? _#C1#property4 = null;
+ field core::int? _#C1#property5 = null;
+ field core::int? _#C1#property6 = null;
+ constructor •(core::int property4, core::int property5, core::int property6) → self::C1
+ : self::C1::_#C1#property4 = property4, self::C1::_#C1#property5 = property5, self::C1::_#C1#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.") : #t11{core::int};
+ set property4(core::int #t12) → void
+ this.{self::C1::_#C1#property4} = #t12;
+ get property5() → core::int
+ return let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.") : #t13{core::int};
+ set property5(core::int #t14) → void
+ this.{self::C1::_#C1#property5} = #t14;
+ get property6() → core::int
+ return let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.") : #t15{core::int};
+ set property6(core::int #t16) → void
+ this.{self::C1::_#C1#property6} = #t16;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.textual_outline.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.textual_outline.expect
new file mode 100644
index 0000000..2045647
--- /dev/null
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.textual_outline.expect
@@ -0,0 +1,39 @@
+abstract class A {
+ late int ;
+ property4;
+ late int;
+ operator? (){}
+ property5;
+ covariant late int ;
+ property6;
+ A(this.property4, this.property5, this.property6);
+}
+abstract class B1 {
+ late ;
+ final int property4;
+ late ;
+ final int property5;
+ late ;
+ final int? property6;
+ B1(this.property4, this.property5, this.property6);
+}
+abstract class B2 implements B1 {
+ void set property4(int i);
+ void set property5(int? i);
+ void set property6(int i);
+}
+abstract class C1 {
+ late int ;
+ property4;
+ late int ;
+ property5;
+ late int ;
+ property6;
+ C1(this.property4, this.property5, this.property6);
+}
+abstract class C2 implements C1 {
+ int get property4;
+ int get property5;
+ int? get property6;
+}
+main() {}
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.expect
new file mode 100644
index 0000000..7dd79a4
--- /dev/null
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.expect
@@ -0,0 +1,151 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:32:26: Error: The parameter 'i' of the method 'B2.property6' has type 'int', which does not match the corresponding type, 'int?', in the overridden method, 'B1.property6'.
+// Change to a supertype of 'int?', or, for a covariant parameter, a subtype.
+// void set property6(int i); // error
+// ^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:20:19: Context: This is the overridden method ('property6').
+// late final int? property6;
+// ^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:32:12: Error: The type 'int?' of the inherited getter 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:20:19: Context: This is the declaration of the getter 'B1.property6'.
+// late final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:52:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:40:12: Context: This is the overridden method ('property6').
+// late int property6;
+// ^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:52:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:40:12: Context: This is the declaration of the setter 'C1.property6'.
+// late int property6;
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:_internal" as _in;
+
+abstract class A extends core::Object {
+ field core::int? _#A#property4 = null;
+ field core::bool _#A#property4#isSet = false;
+ field core::int? _#A#property5 = null;
+ field core::bool _#A#property5#isSet = false;
+ field core::int? _#A#property6 = null;
+ field core::bool _#A#property6#isSet = false;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::_#A#property4#isSet = true, self::A::_#A#property4 = property4, self::A::_#A#property5#isSet = true, self::A::_#A#property5 = property5, self::A::_#A#property6#isSet = true, self::A::_#A#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return this.{self::A::_#A#property4#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#property4} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ set property4(core::int #t2) → void {
+ this.{self::A::_#A#property4#isSet} = true;
+ this.{self::A::_#A#property4} = #t2;
+ }
+ get property5() → core::int?
+ return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ set property5(core::int? #t3) → void {
+ this.{self::A::_#A#property5#isSet} = true;
+ this.{self::A::_#A#property5} = #t3;
+ }
+ get property6() → core::int
+ return this.{self::A::_#A#property6#isSet} ?{core::int} let final core::int? #t4 = this.{self::A::_#A#property6} in #t4{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ set property6(covariant core::int #t5) → void {
+ this.{self::A::_#A#property6#isSet} = true;
+ this.{self::A::_#A#property6} = #t5;
+ }
+}
+abstract class B1 extends core::Object {
+ field core::int? _#B1#property4 = null;
+ field core::bool _#B1#property4#isSet = false;
+ field core::int? _#B1#property5 = null;
+ field core::bool _#B1#property5#isSet = false;
+ field core::int? _#B1#property6 = null;
+ field core::bool _#B1#property6#isSet = false;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::_#B1#property4#isSet = true, self::B1::_#B1#property4 = property4, self::B1::_#B1#property5#isSet = true, self::B1::_#B1#property5 = property5, self::B1::_#B1#property6#isSet = true, self::B1::_#B1#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return this.{self::B1::_#B1#property4#isSet} ?{core::int} let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ set property4(core::int #t7) → void
+ if(this.{self::B1::_#B1#property4#isSet})
+ throw new _in::LateInitializationErrorImpl::•("Field 'property4' has already been initialized.");
+ else {
+ this.{self::B1::_#B1#property4#isSet} = true;
+ this.{self::B1::_#B1#property4} = #t7;
+ }
+ get property5() → core::int
+ return this.{self::B1::_#B1#property5#isSet} ?{core::int} let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ set property5(core::int #t9) → void
+ if(this.{self::B1::_#B1#property5#isSet})
+ throw new _in::LateInitializationErrorImpl::•("Field 'property5' has already been initialized.");
+ else {
+ this.{self::B1::_#B1#property5#isSet} = true;
+ this.{self::B1::_#B1#property5} = #t9;
+ }
+ get property6() → core::int?
+ return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ set property6(core::int? #t10) → void
+ if(this.{self::B1::_#B1#property6#isSet})
+ throw new _in::LateInitializationErrorImpl::•("Field 'property6' has already been initialized.");
+ else {
+ this.{self::B1::_#B1#property6#isSet} = true;
+ this.{self::B1::_#B1#property6} = #t10;
+ }
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int? _#C1#property4 = null;
+ field core::bool _#C1#property4#isSet = false;
+ field core::int? _#C1#property5 = null;
+ field core::bool _#C1#property5#isSet = false;
+ field core::int? _#C1#property6 = null;
+ field core::bool _#C1#property6#isSet = false;
+ constructor •(core::int property4, core::int property5, core::int property6) → self::C1
+ : self::C1::_#C1#property4#isSet = true, self::C1::_#C1#property4 = property4, self::C1::_#C1#property5#isSet = true, self::C1::_#C1#property5 = property5, self::C1::_#C1#property6#isSet = true, self::C1::_#C1#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return this.{self::C1::_#C1#property4#isSet} ?{core::int} let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ set property4(core::int #t12) → void {
+ this.{self::C1::_#C1#property4#isSet} = true;
+ this.{self::C1::_#C1#property4} = #t12;
+ }
+ get property5() → core::int
+ return this.{self::C1::_#C1#property5#isSet} ?{core::int} let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ set property5(core::int #t14) → void {
+ this.{self::C1::_#C1#property5#isSet} = true;
+ this.{self::C1::_#C1#property5} = #t14;
+ }
+ get property6() → core::int
+ return this.{self::C1::_#C1#property6#isSet} ?{core::int} let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ set property6(core::int #t16) → void {
+ this.{self::C1::_#C1#property6#isSet} = true;
+ this.{self::C1::_#C1#property6} = #t16;
+ }
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.transformed.expect
new file mode 100644
index 0000000..7dd79a4
--- /dev/null
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.transformed.expect
@@ -0,0 +1,151 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:32:26: Error: The parameter 'i' of the method 'B2.property6' has type 'int', which does not match the corresponding type, 'int?', in the overridden method, 'B1.property6'.
+// Change to a supertype of 'int?', or, for a covariant parameter, a subtype.
+// void set property6(int i); // error
+// ^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:20:19: Context: This is the overridden method ('property6').
+// late final int? property6;
+// ^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:32:12: Error: The type 'int?' of the inherited getter 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:20:19: Context: This is the declaration of the getter 'B1.property6'.
+// late final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:52:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:40:12: Context: This is the overridden method ('property6').
+// late int property6;
+// ^
+//
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:52:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart:40:12: Context: This is the declaration of the setter 'C1.property6'.
+// late int property6;
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:_internal" as _in;
+
+abstract class A extends core::Object {
+ field core::int? _#A#property4 = null;
+ field core::bool _#A#property4#isSet = false;
+ field core::int? _#A#property5 = null;
+ field core::bool _#A#property5#isSet = false;
+ field core::int? _#A#property6 = null;
+ field core::bool _#A#property6#isSet = false;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::_#A#property4#isSet = true, self::A::_#A#property4 = property4, self::A::_#A#property5#isSet = true, self::A::_#A#property5 = property5, self::A::_#A#property6#isSet = true, self::A::_#A#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return this.{self::A::_#A#property4#isSet} ?{core::int} let final core::int? #t1 = this.{self::A::_#A#property4} in #t1{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ set property4(core::int #t2) → void {
+ this.{self::A::_#A#property4#isSet} = true;
+ this.{self::A::_#A#property4} = #t2;
+ }
+ get property5() → core::int?
+ return this.{self::A::_#A#property5#isSet} ?{core::int?} this.{self::A::_#A#property5} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ set property5(core::int? #t3) → void {
+ this.{self::A::_#A#property5#isSet} = true;
+ this.{self::A::_#A#property5} = #t3;
+ }
+ get property6() → core::int
+ return this.{self::A::_#A#property6#isSet} ?{core::int} let final core::int? #t4 = this.{self::A::_#A#property6} in #t4{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ set property6(covariant core::int #t5) → void {
+ this.{self::A::_#A#property6#isSet} = true;
+ this.{self::A::_#A#property6} = #t5;
+ }
+}
+abstract class B1 extends core::Object {
+ field core::int? _#B1#property4 = null;
+ field core::bool _#B1#property4#isSet = false;
+ field core::int? _#B1#property5 = null;
+ field core::bool _#B1#property5#isSet = false;
+ field core::int? _#B1#property6 = null;
+ field core::bool _#B1#property6#isSet = false;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::_#B1#property4#isSet = true, self::B1::_#B1#property4 = property4, self::B1::_#B1#property5#isSet = true, self::B1::_#B1#property5 = property5, self::B1::_#B1#property6#isSet = true, self::B1::_#B1#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return this.{self::B1::_#B1#property4#isSet} ?{core::int} let final core::int? #t6 = this.{self::B1::_#B1#property4} in #t6{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ set property4(core::int #t7) → void
+ if(this.{self::B1::_#B1#property4#isSet})
+ throw new _in::LateInitializationErrorImpl::•("Field 'property4' has already been initialized.");
+ else {
+ this.{self::B1::_#B1#property4#isSet} = true;
+ this.{self::B1::_#B1#property4} = #t7;
+ }
+ get property5() → core::int
+ return this.{self::B1::_#B1#property5#isSet} ?{core::int} let final core::int? #t8 = this.{self::B1::_#B1#property5} in #t8{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ set property5(core::int #t9) → void
+ if(this.{self::B1::_#B1#property5#isSet})
+ throw new _in::LateInitializationErrorImpl::•("Field 'property5' has already been initialized.");
+ else {
+ this.{self::B1::_#B1#property5#isSet} = true;
+ this.{self::B1::_#B1#property5} = #t9;
+ }
+ get property6() → core::int?
+ return this.{self::B1::_#B1#property6#isSet} ?{core::int?} this.{self::B1::_#B1#property6} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ set property6(core::int? #t10) → void
+ if(this.{self::B1::_#B1#property6#isSet})
+ throw new _in::LateInitializationErrorImpl::•("Field 'property6' has already been initialized.");
+ else {
+ this.{self::B1::_#B1#property6#isSet} = true;
+ this.{self::B1::_#B1#property6} = #t10;
+ }
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int? _#C1#property4 = null;
+ field core::bool _#C1#property4#isSet = false;
+ field core::int? _#C1#property5 = null;
+ field core::bool _#C1#property5#isSet = false;
+ field core::int? _#C1#property6 = null;
+ field core::bool _#C1#property6#isSet = false;
+ constructor •(core::int property4, core::int property5, core::int property6) → self::C1
+ : self::C1::_#C1#property4#isSet = true, self::C1::_#C1#property4 = property4, self::C1::_#C1#property5#isSet = true, self::C1::_#C1#property5 = property5, self::C1::_#C1#property6#isSet = true, self::C1::_#C1#property6 = property6, super core::Object::•()
+ ;
+ get property4() → core::int
+ return this.{self::C1::_#C1#property4#isSet} ?{core::int} let final core::int? #t11 = this.{self::C1::_#C1#property4} in #t11{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property4' has not been initialized.");
+ set property4(core::int #t12) → void {
+ this.{self::C1::_#C1#property4#isSet} = true;
+ this.{self::C1::_#C1#property4} = #t12;
+ }
+ get property5() → core::int
+ return this.{self::C1::_#C1#property5#isSet} ?{core::int} let final core::int? #t13 = this.{self::C1::_#C1#property5} in #t13{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property5' has not been initialized.");
+ set property5(core::int #t14) → void {
+ this.{self::C1::_#C1#property5#isSet} = true;
+ this.{self::C1::_#C1#property5} = #t14;
+ }
+ get property6() → core::int
+ return this.{self::C1::_#C1#property6#isSet} ?{core::int} let final core::int? #t15 = this.{self::C1::_#C1#property6} in #t15{core::int} : throw new _in::LateInitializationErrorImpl::•("Field 'property6' has not been initialized.");
+ set property6(core::int #t16) → void {
+ this.{self::C1::_#C1#property6#isSet} = true;
+ this.{self::C1::_#C1#property6} = #t16;
+ }
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart
new file mode 100644
index 0000000..aaba82c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart
@@ -0,0 +1,102 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class A {
+ int get property1; // ok
+ void set property1(int i);
+
+ int get property2; // ok
+ void set property2(int i);
+
+ num get property3; // error
+ void set property3(int i);
+
+ int property4 = 0; // ok
+
+ int property5 = 0; // ok
+
+ covariant num property6 = 0; // ok
+}
+
+abstract class B1 {
+ int get property1;
+
+ int get property2;
+
+ num get property3;
+
+ final int property4;
+
+ final int property5;
+
+ final num property6;
+
+ B1(this.property4, this.property5, this.property6);
+}
+
+abstract class B2 implements B1 {
+ void set property1(int i); // ok
+
+ void set property2(num i); // ok
+
+ void set property3(int i); // error
+
+ void set property4(int i); // ok
+
+ void set property5(num i); // ok
+
+ void set property6(int i); // error
+}
+
+abstract class C1 {
+ void set property1(int i);
+
+ void set property2(num i);
+
+ void set property3(int i);
+
+ int property4 = 0;
+
+ num property5 = 0;
+
+ int property6 = 0;
+}
+
+abstract class C2 implements C1 {
+ int get property1; // ok
+
+ int get property2; // ok
+
+ num get property3; // error
+
+ int get property4; // ok
+
+ int get property5; // ok
+
+ // This results in two errors; one for the getter/setter type mismatch and one
+ // for the getter override.
+ num get property6; // error
+}
+
+abstract class D1 {
+ int get property1;
+
+ int get property2;
+
+ num get property3;
+}
+
+abstract class D2 {
+ void set property1(int i);
+
+ void set property2(num i);
+
+ void set property3(int i);
+}
+
+abstract class D3 implements D1, D2 /* error on property3 */ {}
+
+abstract class D4 implements D3 /* no need for error on property3 */ {}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.outline.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.outline.expect
new file mode 100644
index 0000000..e7d6448
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.outline.expect
@@ -0,0 +1,147 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:12:11: Error: The type 'num' of the getter 'A.property3' is not a subtype of the type 'int' of the setter 'A.property3'.
+// num get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:13:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:43:12: Error: The type 'num' of the inherited getter 'B1.property3' is not a subtype of the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:27:11: Context: This is the declaration of the getter 'B1.property3'.
+// num get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:49:12: Error: The type 'num' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:33:13: Context: This is the declaration of the field 'B1.property6'.
+// final num property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:71:11: Error: The type 'num' of the getter 'C2.property3' is not a subtype of the type 'int' of the inherited setter 'C1.property3'.
+// num get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:57:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:79:11: Error: The return type of the method 'C2.property6' is 'num', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// num get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:63:7: Context: This is the overridden method ('property6').
+// int property6 = 0;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:79:11: Error: The type 'num' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// num get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:63:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6 = 0;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:98:16: Error: The type 'num' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:87:11: Context: This is the declaration of the getter 'D1.property3'.
+// num get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:95:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:100:16: Error: The type 'num' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4 implements D3 /* no need for error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:87:11: Context: This is the declaration of the getter 'D1.property3'.
+// num get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:95:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int property4;
+ field core::int property5;
+ covariant field core::num property6;
+ synthetic constructor •() → self::A
+ ;
+ abstract get property1() → core::int;
+ abstract set property1(core::int i) → void;
+ abstract get property2() → core::int;
+ abstract set property2(core::int i) → void;
+ abstract get property3() → core::num;
+ abstract set property3(core::int i) → void;
+}
+abstract class B1 extends core::Object {
+ final field core::int property4;
+ final field core::int property5;
+ final field core::num property6;
+ constructor •(core::int property4, core::int property5, core::num property6) → self::B1
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::num;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::num i) → void;
+ abstract set property3(core::int i) → void;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::num i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int property4;
+ field core::num property5;
+ field core::int property6;
+ synthetic constructor •() → self::C1
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::num i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::num;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::num;
+}
+abstract class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::num;
+}
+abstract class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::num i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3
+ ;
+}
+abstract class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4
+ ;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.strong.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.strong.expect
new file mode 100644
index 0000000..5c5052b
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.strong.expect
@@ -0,0 +1,155 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:12:11: Error: The type 'num' of the getter 'A.property3' is not a subtype of the type 'int' of the setter 'A.property3'.
+// num get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:13:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:43:12: Error: The type 'num' of the inherited getter 'B1.property3' is not a subtype of the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:27:11: Context: This is the declaration of the getter 'B1.property3'.
+// num get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:49:12: Error: The type 'num' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:33:13: Context: This is the declaration of the field 'B1.property6'.
+// final num property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:71:11: Error: The type 'num' of the getter 'C2.property3' is not a subtype of the type 'int' of the inherited setter 'C1.property3'.
+// num get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:57:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:79:11: Error: The return type of the method 'C2.property6' is 'num', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// num get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:63:7: Context: This is the overridden method ('property6').
+// int property6 = 0;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:79:11: Error: The type 'num' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// num get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:63:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6 = 0;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:98:16: Error: The type 'num' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:87:11: Context: This is the declaration of the getter 'D1.property3'.
+// num get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:95:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:100:16: Error: The type 'num' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4 implements D3 /* no need for error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:87:11: Context: This is the declaration of the getter 'D1.property3'.
+// num get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:95:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int property4 = 0;
+ field core::int property5 = 0;
+ covariant field core::num property6 = 0;
+ synthetic constructor •() → self::A
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract set property1(core::int i) → void;
+ abstract get property2() → core::int;
+ abstract set property2(core::int i) → void;
+ abstract get property3() → core::num;
+ abstract set property3(core::int i) → void;
+}
+abstract class B1 extends core::Object {
+ final field core::int property4;
+ final field core::int property5;
+ final field core::num property6;
+ constructor •(core::int property4, core::int property5, core::num property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::num;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::num i) → void;
+ abstract set property3(core::int i) → void;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::num i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int property4 = 0;
+ field core::num property5 = 0;
+ field core::int property6 = 0;
+ synthetic constructor •() → self::C1
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::num i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::num;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::num;
+}
+abstract class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::num;
+}
+abstract class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::num i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3
+ : super core::Object::•()
+ ;
+}
+abstract class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.strong.transformed.expect
new file mode 100644
index 0000000..4e6abc1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.strong.transformed.expect
@@ -0,0 +1,155 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:14:12: Error: The type 'int?' of the getter 'A.property3' is not a subtype of the type 'int' of the setter 'A.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:16:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:48:12: Error: The type 'int?' of the inherited getter 'B1.property3' is not a subtype of the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:32:12: Context: This is the declaration of the getter 'B1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:54:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:38:14: Context: This is the declaration of the field 'B1.property6'.
+// final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:78:12: Error: The type 'int?' of the getter 'C2.property3' is not a subtype of the type 'int' of the inherited setter 'C1.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:62:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:86:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:68:7: Context: This is the overridden method ('property6').
+// int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:86:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:68:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:105:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:107:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4 implements D3 /* no need for error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract set property1(core::int i) → void;
+ abstract get property2() → core::int;
+ abstract set property2(core::int? i) → void;
+ abstract get property3() → core::int?;
+ abstract set property3(core::int i) → void;
+}
+abstract class B1 extends core::Object {
+ final field core::int property4;
+ final field core::int property5;
+ final field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::C1
+ : self::C1::property4 = property4, self::C1::property5 = property5, self::C1::property6 = property6, super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+abstract class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3
+ : super core::Object::•()
+ ;
+}
+abstract class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.textual_outline.expect
new file mode 100644
index 0000000..bc0af57
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.textual_outline.expect
@@ -0,0 +1,66 @@
+abstract class A {
+ int get property1;
+ void set property1(int i);
+ int get property2;
+ void set property2(int i);
+ num get property3;
+ void set property3(int i);
+ int property4 = 0;
+ int property5 = 0;
+ covariant num property6 = 0;
+}
+
+abstract class B1 {
+ int get property1;
+ int get property2;
+ num get property3;
+ final int property4;
+ final int property5;
+ final num property6;
+ B1(this.property4, this.property5, this.property6);
+}
+
+abstract class B2 implements B1 {
+ void set property1(int i);
+ void set property2(num i);
+ void set property3(int i);
+ void set property4(int i);
+ void set property5(num i);
+ void set property6(int i);
+}
+
+abstract class C1 {
+ void set property1(int i);
+ void set property2(num i);
+ void set property3(int i);
+ int property4 = 0;
+ num property5 = 0;
+ int property6 = 0;
+}
+
+abstract class C2 implements C1 {
+ int get property1;
+ int get property2;
+ num get property3;
+ int get property4;
+ int get property5;
+ num get property6;
+}
+
+abstract class D1 {
+ int get property1;
+ int get property2;
+ num get property3;
+}
+
+abstract class D2 {
+ void set property1(int i);
+ void set property2(num i);
+ void set property3(int i);
+}
+
+abstract class D3 implements D1, D2 {}
+
+abstract class D4 implements D3 {}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..43c1a56
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.textual_outline_modelled.expect
@@ -0,0 +1,66 @@
+abstract class A {
+ covariant num property6 = 0;
+ int get property1;
+ int get property2;
+ int property4 = 0;
+ int property5 = 0;
+ num get property3;
+ void set property1(int i);
+ void set property2(int i);
+ void set property3(int i);
+}
+
+abstract class B1 {
+ B1(this.property4, this.property5, this.property6);
+ final int property4;
+ final int property5;
+ final num property6;
+ int get property1;
+ int get property2;
+ num get property3;
+}
+
+abstract class B2 implements B1 {
+ void set property1(int i);
+ void set property2(num i);
+ void set property3(int i);
+ void set property4(int i);
+ void set property5(num i);
+ void set property6(int i);
+}
+
+abstract class C1 {
+ int property4 = 0;
+ int property6 = 0;
+ num property5 = 0;
+ void set property1(int i);
+ void set property2(num i);
+ void set property3(int i);
+}
+
+abstract class C2 implements C1 {
+ int get property1;
+ int get property2;
+ int get property4;
+ int get property5;
+ num get property3;
+ num get property6;
+}
+
+abstract class D1 {
+ int get property1;
+ int get property2;
+ num get property3;
+}
+
+abstract class D2 {
+ void set property1(int i);
+ void set property2(num i);
+ void set property3(int i);
+}
+
+abstract class D3 implements D1, D2 {}
+
+abstract class D4 implements D3 {}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.expect
new file mode 100644
index 0000000..5c5052b
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.expect
@@ -0,0 +1,155 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:12:11: Error: The type 'num' of the getter 'A.property3' is not a subtype of the type 'int' of the setter 'A.property3'.
+// num get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:13:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:43:12: Error: The type 'num' of the inherited getter 'B1.property3' is not a subtype of the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:27:11: Context: This is the declaration of the getter 'B1.property3'.
+// num get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:49:12: Error: The type 'num' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:33:13: Context: This is the declaration of the field 'B1.property6'.
+// final num property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:71:11: Error: The type 'num' of the getter 'C2.property3' is not a subtype of the type 'int' of the inherited setter 'C1.property3'.
+// num get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:57:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:79:11: Error: The return type of the method 'C2.property6' is 'num', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// num get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:63:7: Context: This is the overridden method ('property6').
+// int property6 = 0;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:79:11: Error: The type 'num' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// num get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:63:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6 = 0;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:98:16: Error: The type 'num' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:87:11: Context: This is the declaration of the getter 'D1.property3'.
+// num get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:95:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:100:16: Error: The type 'num' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4 implements D3 /* no need for error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:87:11: Context: This is the declaration of the getter 'D1.property3'.
+// num get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:95:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int property4 = 0;
+ field core::int property5 = 0;
+ covariant field core::num property6 = 0;
+ synthetic constructor •() → self::A
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract set property1(core::int i) → void;
+ abstract get property2() → core::int;
+ abstract set property2(core::int i) → void;
+ abstract get property3() → core::num;
+ abstract set property3(core::int i) → void;
+}
+abstract class B1 extends core::Object {
+ final field core::int property4;
+ final field core::int property5;
+ final field core::num property6;
+ constructor •(core::int property4, core::int property5, core::num property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::num;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::num i) → void;
+ abstract set property3(core::int i) → void;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::num i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int property4 = 0;
+ field core::num property5 = 0;
+ field core::int property6 = 0;
+ synthetic constructor •() → self::C1
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::num i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::num;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::num;
+}
+abstract class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::num;
+}
+abstract class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::num i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3
+ : super core::Object::•()
+ ;
+}
+abstract class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.transformed.expect
new file mode 100644
index 0000000..4e6abc1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.transformed.expect
@@ -0,0 +1,155 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:14:12: Error: The type 'int?' of the getter 'A.property3' is not a subtype of the type 'int' of the setter 'A.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:16:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:48:12: Error: The type 'int?' of the inherited getter 'B1.property3' is not a subtype of the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:32:12: Context: This is the declaration of the getter 'B1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:54:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:38:14: Context: This is the declaration of the field 'B1.property6'.
+// final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:78:12: Error: The type 'int?' of the getter 'C2.property3' is not a subtype of the type 'int' of the inherited setter 'C1.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:62:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:86:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:68:7: Context: This is the overridden method ('property6').
+// int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:86:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:68:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:105:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:107:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4 implements D3 /* no need for error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract set property1(core::int i) → void;
+ abstract get property2() → core::int;
+ abstract set property2(core::int? i) → void;
+ abstract get property3() → core::int?;
+ abstract set property3(core::int i) → void;
+}
+abstract class B1 extends core::Object {
+ final field core::int property4;
+ final field core::int property5;
+ final field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::C1
+ : self::C1::property4 = property4, self::C1::property5 = property5, self::C1::property6 = property6, super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+abstract class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3
+ : super core::Object::•()
+ ;
+}
+abstract class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart
new file mode 100644
index 0000000..ca3246a
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart
@@ -0,0 +1,53 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class A {
+ late int property4; // ok
+
+ late int? property5; // ok
+
+ covariant late int property6; // ok
+
+ A(this.property4, this.property5, this.property6);
+}
+
+abstract class B1 {
+ late final int property4;
+
+ late final int property5;
+
+ late final int? property6;
+
+ B1(this.property4, this.property5, this.property6);
+}
+
+abstract class B2 implements B1 {
+ void set property4(int i); // ok
+
+ void set property5(int? i); // ok
+
+ void set property6(int i); // error
+}
+
+abstract class C1 {
+ late int property4;
+
+ late int property5;
+
+ late int property6;
+
+ C1(this.property4, this.property5, this.property6);
+}
+
+abstract class C2 implements C1 {
+ int get property4; // ok
+
+ int get property5; // ok
+
+ // This results in two errors; one for the getter/setter type mismatch and one
+ // for the getter override.
+ int? get property6; // error
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.outline.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.outline.expect
new file mode 100644
index 0000000..36042d2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.outline.expect
@@ -0,0 +1,66 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:30:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:20:19: Context: This is the declaration of the field 'B1.property6'.
+// late final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:50:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:38:12: Context: This is the overridden method ('property6').
+// late int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:50:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:38:12: Context: This is the declaration of the setter 'C1.property6'.
+// late int property6;
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ late field core::int property4;
+ late field core::int? property5;
+ late covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ ;
+}
+abstract class B1 extends core::Object {
+ late final [setter] field core::int property4;
+ late final [setter] field core::int property5;
+ late final [setter] field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ ;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ ;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ late field core::int property4;
+ late field core::int property5;
+ late field core::int property6;
+ constructor •(core::int property4, core::int property5, core::int property6) → self::C1
+ ;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ ;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.expect
new file mode 100644
index 0000000..e53ccba4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.expect
@@ -0,0 +1,70 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:30:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:20:19: Context: This is the declaration of the field 'B1.property6'.
+// late final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:50:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:38:12: Context: This is the overridden method ('property6').
+// late int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:50:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:38:12: Context: This is the declaration of the setter 'C1.property6'.
+// late int property6;
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ late field core::int property4;
+ late field core::int? property5;
+ late covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class B1 extends core::Object {
+ late final [setter] field core::int property4;
+ late final [setter] field core::int property5;
+ late final [setter] field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ late field core::int property4;
+ late field core::int property5;
+ late field core::int property6;
+ constructor •(core::int property4, core::int property5, core::int property6) → self::C1
+ : self::C1::property4 = property4, self::C1::property5 = property5, self::C1::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.transformed.expect
new file mode 100644
index 0000000..e53ccba4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.transformed.expect
@@ -0,0 +1,70 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:30:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:20:19: Context: This is the declaration of the field 'B1.property6'.
+// late final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:50:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:38:12: Context: This is the overridden method ('property6').
+// late int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:50:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:38:12: Context: This is the declaration of the setter 'C1.property6'.
+// late int property6;
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ late field core::int property4;
+ late field core::int? property5;
+ late covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class B1 extends core::Object {
+ late final [setter] field core::int property4;
+ late final [setter] field core::int property5;
+ late final [setter] field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ late field core::int property4;
+ late field core::int property5;
+ late field core::int property6;
+ constructor •(core::int property4, core::int property5, core::int property6) → self::C1
+ : self::C1::property4 = property4, self::C1::property5 = property5, self::C1::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.textual_outline.expect
new file mode 100644
index 0000000..2045647
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.textual_outline.expect
@@ -0,0 +1,39 @@
+abstract class A {
+ late int ;
+ property4;
+ late int;
+ operator? (){}
+ property5;
+ covariant late int ;
+ property6;
+ A(this.property4, this.property5, this.property6);
+}
+abstract class B1 {
+ late ;
+ final int property4;
+ late ;
+ final int property5;
+ late ;
+ final int? property6;
+ B1(this.property4, this.property5, this.property6);
+}
+abstract class B2 implements B1 {
+ void set property4(int i);
+ void set property5(int? i);
+ void set property6(int i);
+}
+abstract class C1 {
+ late int ;
+ property4;
+ late int ;
+ property5;
+ late int ;
+ property6;
+ C1(this.property4, this.property5, this.property6);
+}
+abstract class C2 implements C1 {
+ int get property4;
+ int get property5;
+ int? get property6;
+}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.expect
new file mode 100644
index 0000000..e53ccba4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.expect
@@ -0,0 +1,70 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:30:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:20:19: Context: This is the declaration of the field 'B1.property6'.
+// late final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:50:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:38:12: Context: This is the overridden method ('property6').
+// late int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:50:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:38:12: Context: This is the declaration of the setter 'C1.property6'.
+// late int property6;
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ late field core::int property4;
+ late field core::int? property5;
+ late covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class B1 extends core::Object {
+ late final [setter] field core::int property4;
+ late final [setter] field core::int property5;
+ late final [setter] field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ late field core::int property4;
+ late field core::int property5;
+ late field core::int property6;
+ constructor •(core::int property4, core::int property5, core::int property6) → self::C1
+ : self::C1::property4 = property4, self::C1::property5 = property5, self::C1::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.transformed.expect
new file mode 100644
index 0000000..e53ccba4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.transformed.expect
@@ -0,0 +1,70 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:30:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:20:19: Context: This is the declaration of the field 'B1.property6'.
+// late final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:50:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:38:12: Context: This is the overridden method ('property6').
+// late int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:50:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart:38:12: Context: This is the declaration of the setter 'C1.property6'.
+// late int property6;
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ late field core::int property4;
+ late field core::int? property5;
+ late covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class B1 extends core::Object {
+ late final [setter] field core::int property4;
+ late final [setter] field core::int property5;
+ late final [setter] field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ late field core::int property4;
+ late field core::int property5;
+ late field core::int property6;
+ constructor •(core::int property4, core::int property5, core::int property6) → self::C1
+ : self::C1::property4 = property4, self::C1::property5 = property5, self::C1::property6 = property6, super core::Object::•()
+ ;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart
new file mode 100644
index 0000000..364f0c6
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart
@@ -0,0 +1,109 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class A {
+ int get property1; // ok
+
+ void set property1(int i);
+
+ int get property2; // ok
+
+ void set property2(int? i);
+
+ int? get property3; // error
+
+ void set property3(int i);
+
+ int property4; // ok
+
+ int? property5; // ok
+
+ covariant int property6; // ok
+
+ A(this.property4, this.property5, this.property6);
+}
+
+abstract class B1 {
+ int get property1;
+
+ int get property2;
+
+ int? get property3;
+
+ final int property4;
+
+ final int property5;
+
+ final int? property6;
+
+ B1(this.property4, this.property5, this.property6);
+}
+
+abstract class B2 implements B1 {
+ void set property1(int i); // ok
+
+ void set property2(int? i); // ok
+
+ void set property3(int i); // error
+
+ void set property4(int i); // ok
+
+ void set property5(int? i); // ok
+
+ void set property6(int i); // error
+}
+
+abstract class C1 {
+ void set property1(int i);
+
+ void set property2(int? i);
+
+ void set property3(int i);
+
+ int property4;
+
+ int? property5;
+
+ int property6;
+
+ C1(this.property4, this.property5, this.property6);
+}
+
+abstract class C2 implements C1 {
+ int get property1; // ok
+
+ int get property2; // ok
+
+ int? get property3; // error
+
+ int get property4; // ok
+
+ int get property5; // ok
+
+ // This results in two errors; one for the getter/setter type mismatch and one
+ // for the getter override.
+ int? get property6; // error
+}
+
+abstract class D1 {
+ int get property1;
+
+ int get property2;
+
+ int? get property3;
+}
+
+abstract class D2 {
+ void set property1(int i);
+
+ void set property2(int? i);
+
+ void set property3(int i);
+}
+
+abstract class D3 implements D1, D2 /* error on property3 */ {}
+
+abstract class D4 implements D3 /* no need for error on property3 */ {}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.outline.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.outline.expect
new file mode 100644
index 0000000..30e3ae5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.outline.expect
@@ -0,0 +1,147 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:14:12: Error: The type 'int?' of the getter 'A.property3' is not a subtype of the type 'int' of the setter 'A.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:16:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:48:12: Error: The type 'int?' of the inherited getter 'B1.property3' is not a subtype of the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:32:12: Context: This is the declaration of the getter 'B1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:54:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:38:14: Context: This is the declaration of the field 'B1.property6'.
+// final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:78:12: Error: The type 'int?' of the getter 'C2.property3' is not a subtype of the type 'int' of the inherited setter 'C1.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:62:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:86:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:68:7: Context: This is the overridden method ('property6').
+// int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:86:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:68:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:105:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:107:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4 implements D3 /* no need for error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ ;
+ abstract get property1() → core::int;
+ abstract set property1(core::int i) → void;
+ abstract get property2() → core::int;
+ abstract set property2(core::int? i) → void;
+ abstract get property3() → core::int?;
+ abstract set property3(core::int i) → void;
+}
+abstract class B1 extends core::Object {
+ final field core::int property4;
+ final field core::int property5;
+ final field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::C1
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+abstract class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3
+ ;
+}
+abstract class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4
+ ;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.expect
new file mode 100644
index 0000000..89fd1f6
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.expect
@@ -0,0 +1,155 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:14:12: Error: The type 'int?' of the getter 'A.property3' is not a subtype of the type 'int' of the setter 'A.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:16:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:48:12: Error: The type 'int?' of the inherited getter 'B1.property3' is not a subtype of the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:32:12: Context: This is the declaration of the getter 'B1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:54:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:38:14: Context: This is the declaration of the field 'B1.property6'.
+// final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:78:12: Error: The type 'int?' of the getter 'C2.property3' is not a subtype of the type 'int' of the inherited setter 'C1.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:62:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:86:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:68:7: Context: This is the overridden method ('property6').
+// int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:86:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:68:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:105:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:107:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4 implements D3 /* no need for error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract set property1(core::int i) → void;
+ abstract get property2() → core::int;
+ abstract set property2(core::int? i) → void;
+ abstract get property3() → core::int?;
+ abstract set property3(core::int i) → void;
+}
+abstract class B1 extends core::Object {
+ final field core::int property4;
+ final field core::int property5;
+ final field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::C1
+ : self::C1::property4 = property4, self::C1::property5 = property5, self::C1::property6 = property6, super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+abstract class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3
+ : super core::Object::•()
+ ;
+}
+abstract class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.transformed.expect
new file mode 100644
index 0000000..89fd1f6
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.transformed.expect
@@ -0,0 +1,155 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:14:12: Error: The type 'int?' of the getter 'A.property3' is not a subtype of the type 'int' of the setter 'A.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:16:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:48:12: Error: The type 'int?' of the inherited getter 'B1.property3' is not a subtype of the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:32:12: Context: This is the declaration of the getter 'B1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:54:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:38:14: Context: This is the declaration of the field 'B1.property6'.
+// final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:78:12: Error: The type 'int?' of the getter 'C2.property3' is not a subtype of the type 'int' of the inherited setter 'C1.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:62:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:86:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:68:7: Context: This is the overridden method ('property6').
+// int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:86:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:68:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:105:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:107:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4 implements D3 /* no need for error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract set property1(core::int i) → void;
+ abstract get property2() → core::int;
+ abstract set property2(core::int? i) → void;
+ abstract get property3() → core::int?;
+ abstract set property3(core::int i) → void;
+}
+abstract class B1 extends core::Object {
+ final field core::int property4;
+ final field core::int property5;
+ final field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::C1
+ : self::C1::property4 = property4, self::C1::property5 = property5, self::C1::property6 = property6, super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+abstract class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3
+ : super core::Object::•()
+ ;
+}
+abstract class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.textual_outline.expect
new file mode 100644
index 0000000..b6be33e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.textual_outline.expect
@@ -0,0 +1,68 @@
+abstract class A {
+ int get property1;
+ void set property1(int i);
+ int get property2;
+ void set property2(int? i);
+ int? get property3;
+ void set property3(int i);
+ int property4;
+ int? property5;
+ covariant int property6;
+ A(this.property4, this.property5, this.property6);
+}
+
+abstract class B1 {
+ int get property1;
+ int get property2;
+ int? get property3;
+ final int property4;
+ final int property5;
+ final int? property6;
+ B1(this.property4, this.property5, this.property6);
+}
+
+abstract class B2 implements B1 {
+ void set property1(int i);
+ void set property2(int? i);
+ void set property3(int i);
+ void set property4(int i);
+ void set property5(int? i);
+ void set property6(int i);
+}
+
+abstract class C1 {
+ void set property1(int i);
+ void set property2(int? i);
+ void set property3(int i);
+ int property4;
+ int? property5;
+ int property6;
+ C1(this.property4, this.property5, this.property6);
+}
+
+abstract class C2 implements C1 {
+ int get property1;
+ int get property2;
+ int? get property3;
+ int get property4;
+ int get property5;
+ int? get property6;
+}
+
+abstract class D1 {
+ int get property1;
+ int get property2;
+ int? get property3;
+}
+
+abstract class D2 {
+ void set property1(int i);
+ void set property2(int? i);
+ void set property3(int i);
+}
+
+abstract class D3 implements D1, D2 {}
+
+abstract class D4 implements D3 {}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..a071d28
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.textual_outline_modelled.expect
@@ -0,0 +1,68 @@
+abstract class A {
+ A(this.property4, this.property5, this.property6);
+ covariant int property6;
+ int? get property3;
+ int? property5;
+ int get property1;
+ int get property2;
+ int property4;
+ void set property1(int i);
+ void set property2(int? i);
+ void set property3(int i);
+}
+
+abstract class B1 {
+ B1(this.property4, this.property5, this.property6);
+ final int? property6;
+ final int property4;
+ final int property5;
+ int? get property3;
+ int get property1;
+ int get property2;
+}
+
+abstract class B2 implements B1 {
+ void set property1(int i);
+ void set property2(int? i);
+ void set property3(int i);
+ void set property4(int i);
+ void set property5(int? i);
+ void set property6(int i);
+}
+
+abstract class C1 {
+ C1(this.property4, this.property5, this.property6);
+ int? property5;
+ int property4;
+ int property6;
+ void set property1(int i);
+ void set property2(int? i);
+ void set property3(int i);
+}
+
+abstract class C2 implements C1 {
+ int? get property3;
+ int? get property6;
+ int get property1;
+ int get property2;
+ int get property4;
+ int get property5;
+}
+
+abstract class D1 {
+ int? get property3;
+ int get property1;
+ int get property2;
+}
+
+abstract class D2 {
+ void set property1(int i);
+ void set property2(int? i);
+ void set property3(int i);
+}
+
+abstract class D3 implements D1, D2 {}
+
+abstract class D4 implements D3 {}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.expect
new file mode 100644
index 0000000..89fd1f6
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.expect
@@ -0,0 +1,155 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:14:12: Error: The type 'int?' of the getter 'A.property3' is not a subtype of the type 'int' of the setter 'A.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:16:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:48:12: Error: The type 'int?' of the inherited getter 'B1.property3' is not a subtype of the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:32:12: Context: This is the declaration of the getter 'B1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:54:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:38:14: Context: This is the declaration of the field 'B1.property6'.
+// final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:78:12: Error: The type 'int?' of the getter 'C2.property3' is not a subtype of the type 'int' of the inherited setter 'C1.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:62:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:86:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:68:7: Context: This is the overridden method ('property6').
+// int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:86:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:68:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:105:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:107:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4 implements D3 /* no need for error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract set property1(core::int i) → void;
+ abstract get property2() → core::int;
+ abstract set property2(core::int? i) → void;
+ abstract get property3() → core::int?;
+ abstract set property3(core::int i) → void;
+}
+abstract class B1 extends core::Object {
+ final field core::int property4;
+ final field core::int property5;
+ final field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::C1
+ : self::C1::property4 = property4, self::C1::property5 = property5, self::C1::property6 = property6, super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+abstract class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3
+ : super core::Object::•()
+ ;
+}
+abstract class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.transformed.expect
new file mode 100644
index 0000000..89fd1f6
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.transformed.expect
@@ -0,0 +1,155 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:14:12: Error: The type 'int?' of the getter 'A.property3' is not a subtype of the type 'int' of the setter 'A.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:16:12: Context: This is the declaration of the setter 'A.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:48:12: Error: The type 'int?' of the inherited getter 'B1.property3' is not a subtype of the type 'int' of the setter 'B2.property3'.
+// void set property3(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:32:12: Context: This is the declaration of the getter 'B1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:54:12: Error: The type 'int?' of the inherited field 'B1.property6' is not a subtype of the type 'int' of the setter 'B2.property6'.
+// void set property6(int i); // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:38:14: Context: This is the declaration of the field 'B1.property6'.
+// final int? property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:78:12: Error: The type 'int?' of the getter 'C2.property3' is not a subtype of the type 'int' of the inherited setter 'C1.property3'.
+// int? get property3; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:62:12: Context: This is the declaration of the setter 'C1.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:86:12: Error: The return type of the method 'C2.property6' is 'int?', which does not match the return type, 'int', of the overridden method, 'C1.property6'.
+// Change to a subtype of 'int'.
+// int? get property6; // error
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:68:7: Context: This is the overridden method ('property6').
+// int property6;
+// ^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:86:12: Error: The type 'int?' of the getter 'C2.property6' is not a subtype of the type 'int' of the inherited setter 'C1.property6'.
+// int? get property6; // error
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:68:7: Context: This is the declaration of the setter 'C1.property6'.
+// int property6;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:105:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D3 implements D1, D2 /* error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:107:16: Error: The type 'int?' of the inherited getter 'D1.property3' is not a subtype of the type 'int' of the inherited setter 'D2.property3'.
+// abstract class D4 implements D3 /* no need for error on property3 */ {}
+// ^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:94:12: Context: This is the declaration of the getter 'D1.property3'.
+// int? get property3;
+// ^^^^^^^^^
+// pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart:102:12: Context: This is the declaration of the setter 'D2.property3'.
+// void set property3(int i);
+// ^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ covariant field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::A
+ : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract set property1(core::int i) → void;
+ abstract get property2() → core::int;
+ abstract set property2(core::int? i) → void;
+ abstract get property3() → core::int?;
+ abstract set property3(core::int i) → void;
+}
+abstract class B1 extends core::Object {
+ final field core::int property4;
+ final field core::int property5;
+ final field core::int? property6;
+ constructor •(core::int property4, core::int property5, core::int? property6) → self::B1
+ : self::B1::property4 = property4, self::B1::property5 = property5, self::B1::property6 = property6, super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class B2 extends core::Object implements self::B1 {
+ synthetic constructor •() → self::B2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+ abstract set property4(core::int i) → void;
+ abstract set property5(core::int? i) → void;
+ abstract set property6(core::int i) → void;
+}
+abstract class C1 extends core::Object {
+ field core::int property4;
+ field core::int? property5;
+ field core::int property6;
+ constructor •(core::int property4, core::int? property5, core::int property6) → self::C1
+ : self::C1::property4 = property4, self::C1::property5 = property5, self::C1::property6 = property6, super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class C2 extends core::Object implements self::C1 {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+ abstract get property4() → core::int;
+ abstract get property5() → core::int;
+ abstract get property6() → core::int?;
+}
+abstract class D1 extends core::Object {
+ synthetic constructor •() → self::D1
+ : super core::Object::•()
+ ;
+ abstract get property1() → core::int;
+ abstract get property2() → core::int;
+ abstract get property3() → core::int?;
+}
+abstract class D2 extends core::Object {
+ synthetic constructor •() → self::D2
+ : super core::Object::•()
+ ;
+ abstract set property1(core::int i) → void;
+ abstract set property2(core::int? i) → void;
+ abstract set property3(core::int i) → void;
+}
+abstract class D3 extends core::Object implements self::D1, self::D2 {
+ synthetic constructor •() → self::D3
+ : super core::Object::•()
+ ;
+}
+abstract class D4 extends core::Object implements self::D3 {
+ synthetic constructor •() → self::D4
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.expect
index c2781bb..44dc597 100644
--- a/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.expect
@@ -43,17 +43,6 @@
get property4() → core::int*
return 0;
set property4(core::int* value) → void {}
- abstract member-signature method method1() → core::int*; -> mem::Class::method1
- abstract member-signature method method2() → core::int*; -> mem::Class::method2
- abstract member-signature method method5a(core::int* a, core::int* b) → core::int*; -> mem::Class::method5a
- abstract member-signature method method5b(core::int* a, [core::int* b = #C1]) → core::int*; -> mem::Class::method5b
- abstract member-signature method method5c([core::int* a = #C2, core::int* b = #C1]) → core::int*; -> mem::Class::method5c
- abstract member-signature method method7a(core::int* a, {core::int* b = #C1}) → core::int*; -> mem::Class::method7a
- abstract member-signature method method7b({core::int* a = #C2, core::int* b = #C1}) → core::int*; -> mem::Class::method7b
- abstract member-signature method method9a(core::int* a, {core::int* b = #C1}) → core::int*; -> mem::Class::method9a
- abstract member-signature method method9b({core::int* a = #C1, core::int* b = #C1}) → core::int*; -> mem::Class::method9b
- abstract member-signature get getter1() → core::int*; -> mem::Class::getter1
- abstract member-signature get getter2() → core::int*; -> mem::Class::getter2
abstract member-signature get field1() → core::int*; -> mem::Class::field1
abstract member-signature set field1(core::int* _) → void; -> mem::Class::field1
abstract member-signature get field2() → core::int*; -> mem::Class::field2
@@ -66,6 +55,17 @@
abstract member-signature set property5(core::int* _) → void; -> mem::Class::property5
abstract member-signature get property6() → core::int*; -> mem::Class::property6
abstract member-signature set property6(core::int* _) → void; -> mem::Class::property6
+ abstract member-signature method method1() → core::int*; -> mem::Class::method1
+ abstract member-signature method method2() → core::int*; -> mem::Class::method2
+ abstract member-signature method method5a(core::int* a, core::int* b) → core::int*; -> mem::Class::method5a
+ abstract member-signature method method5b(core::int* a, [core::int* b = #C1]) → core::int*; -> mem::Class::method5b
+ abstract member-signature method method5c([core::int* a = #C2, core::int* b = #C1]) → core::int*; -> mem::Class::method5c
+ abstract member-signature method method7a(core::int* a, {core::int* b = #C1}) → core::int*; -> mem::Class::method7a
+ abstract member-signature method method7b({core::int* a = #C2, core::int* b = #C1}) → core::int*; -> mem::Class::method7b
+ abstract member-signature method method9a(core::int* a, {core::int* b = #C1}) → core::int*; -> mem::Class::method9a
+ abstract member-signature method method9b({core::int* a = #C1, core::int* b = #C1}) → core::int*; -> mem::Class::method9b
+ abstract member-signature get getter1() → core::int*; -> mem::Class::getter1
+ abstract member-signature get getter2() → core::int*; -> mem::Class::getter2
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/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.transformed.expect
index c2781bb..44dc597 100644
--- a/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_in.dart.weak.transformed.expect
@@ -43,17 +43,6 @@
get property4() → core::int*
return 0;
set property4(core::int* value) → void {}
- abstract member-signature method method1() → core::int*; -> mem::Class::method1
- abstract member-signature method method2() → core::int*; -> mem::Class::method2
- abstract member-signature method method5a(core::int* a, core::int* b) → core::int*; -> mem::Class::method5a
- abstract member-signature method method5b(core::int* a, [core::int* b = #C1]) → core::int*; -> mem::Class::method5b
- abstract member-signature method method5c([core::int* a = #C2, core::int* b = #C1]) → core::int*; -> mem::Class::method5c
- abstract member-signature method method7a(core::int* a, {core::int* b = #C1}) → core::int*; -> mem::Class::method7a
- abstract member-signature method method7b({core::int* a = #C2, core::int* b = #C1}) → core::int*; -> mem::Class::method7b
- abstract member-signature method method9a(core::int* a, {core::int* b = #C1}) → core::int*; -> mem::Class::method9a
- abstract member-signature method method9b({core::int* a = #C1, core::int* b = #C1}) → core::int*; -> mem::Class::method9b
- abstract member-signature get getter1() → core::int*; -> mem::Class::getter1
- abstract member-signature get getter2() → core::int*; -> mem::Class::getter2
abstract member-signature get field1() → core::int*; -> mem::Class::field1
abstract member-signature set field1(core::int* _) → void; -> mem::Class::field1
abstract member-signature get field2() → core::int*; -> mem::Class::field2
@@ -66,6 +55,17 @@
abstract member-signature set property5(core::int* _) → void; -> mem::Class::property5
abstract member-signature get property6() → core::int*; -> mem::Class::property6
abstract member-signature set property6(core::int* _) → void; -> mem::Class::property6
+ abstract member-signature method method1() → core::int*; -> mem::Class::method1
+ abstract member-signature method method2() → core::int*; -> mem::Class::method2
+ abstract member-signature method method5a(core::int* a, core::int* b) → core::int*; -> mem::Class::method5a
+ abstract member-signature method method5b(core::int* a, [core::int* b = #C1]) → core::int*; -> mem::Class::method5b
+ abstract member-signature method method5c([core::int* a = #C2, core::int* b = #C1]) → core::int*; -> mem::Class::method5c
+ abstract member-signature method method7a(core::int* a, {core::int* b = #C1}) → core::int*; -> mem::Class::method7a
+ abstract member-signature method method7b({core::int* a = #C2, core::int* b = #C1}) → core::int*; -> mem::Class::method7b
+ abstract member-signature method method9a(core::int* a, {core::int* b = #C1}) → core::int*; -> mem::Class::method9a
+ abstract member-signature method method9b({core::int* a = #C1, core::int* b = #C1}) → core::int*; -> mem::Class::method9b
+ abstract member-signature get getter1() → core::int*; -> mem::Class::getter1
+ abstract member-signature get getter2() → core::int*; -> mem::Class::getter2
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/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.expect
index 3f07aa4..a1b69ec 100644
--- a/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.expect
@@ -49,22 +49,6 @@
synthetic constructor •() → self::Class2a
: super opt::LegacyClass::•()
;
- abstract member-signature method method1() → core::int; -> opt::LegacyClass::method1
- abstract member-signature method method2() → core::int?; -> opt::LegacyClass::method2
- abstract member-signature method method3a(core::int a, core::int b) → core::int; -> opt::LegacyClass::method3a
- abstract member-signature method method3b(core::int a, [core::int b = #C1]) → core::int; -> opt::LegacyClass::method3b
- abstract member-signature method method3c([core::int a = #C1, core::int b = #C1]) → core::int; -> opt::LegacyClass::method3c
- abstract member-signature method method4a(core::int? a, core::int? b) → core::int?; -> opt::LegacyClass::method4a
- abstract member-signature method method4b(core::int? a, [core::int? b = #C1]) → core::int?; -> opt::LegacyClass::method4b
- abstract member-signature method method4c([core::int? a = #C1, core::int? b = #C1]) → core::int?; -> opt::LegacyClass::method4c
- abstract member-signature method method5a(core::int a, {core::int b = #C1}) → core::int; -> opt::LegacyClass::method5a
- abstract member-signature method method5b({core::int a = #C1, core::int b = #C1}) → core::int; -> opt::LegacyClass::method5b
- abstract member-signature method method5c({core::int a = #C1, core::int b = #C1}) → core::int; -> opt::LegacyClass::method5c
- abstract member-signature method method6a(core::int? a, {core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6a
- abstract member-signature method method6b({core::int? a = #C1, core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6b
- abstract member-signature method method6c({core::int? a = #C1, core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6c
- abstract member-signature get getter1() → core::int; -> opt::LegacyClass::getter1
- abstract member-signature get getter2() → core::int?; -> opt::LegacyClass::getter2
abstract member-signature get field1() → core::int; -> opt::LegacyClass::field1
abstract member-signature set field1(core::int _) → void; -> opt::LegacyClass::field1
abstract member-signature get field2() → core::int?; -> opt::LegacyClass::field2
@@ -81,6 +65,22 @@
abstract member-signature set property3(core::int value) → void; -> opt::LegacyClass::property3
abstract member-signature get property4() → core::int?; -> opt::LegacyClass::property4
abstract member-signature set property4(core::int? value) → void; -> opt::LegacyClass::property4
+ abstract member-signature method method1() → core::int; -> opt::LegacyClass::method1
+ abstract member-signature method method2() → core::int?; -> opt::LegacyClass::method2
+ abstract member-signature method method3a(core::int a, core::int b) → core::int; -> opt::LegacyClass::method3a
+ abstract member-signature method method3b(core::int a, [core::int b = #C1]) → core::int; -> opt::LegacyClass::method3b
+ abstract member-signature method method3c([core::int a = #C1, core::int b = #C1]) → core::int; -> opt::LegacyClass::method3c
+ abstract member-signature method method4a(core::int? a, core::int? b) → core::int?; -> opt::LegacyClass::method4a
+ abstract member-signature method method4b(core::int? a, [core::int? b = #C1]) → core::int?; -> opt::LegacyClass::method4b
+ abstract member-signature method method4c([core::int? a = #C1, core::int? b = #C1]) → core::int?; -> opt::LegacyClass::method4c
+ abstract member-signature method method5a(core::int a, {core::int b = #C1}) → core::int; -> opt::LegacyClass::method5a
+ abstract member-signature method method5b({core::int a = #C1, core::int b = #C1}) → core::int; -> opt::LegacyClass::method5b
+ abstract member-signature method method5c({core::int a = #C1, core::int b = #C1}) → core::int; -> opt::LegacyClass::method5c
+ abstract member-signature method method6a(core::int? a, {core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6a
+ abstract member-signature method method6b({core::int? a = #C1, core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6b
+ abstract member-signature method method6c({core::int? a = #C1, core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6c
+ abstract member-signature get getter1() → core::int; -> opt::LegacyClass::getter1
+ abstract member-signature get getter2() → core::int?; -> opt::LegacyClass::getter2
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/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.transformed.expect
index 3f07aa4..a1b69ec 100644
--- a/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/member_inheritance_from_opt_out.dart.weak.transformed.expect
@@ -49,22 +49,6 @@
synthetic constructor •() → self::Class2a
: super opt::LegacyClass::•()
;
- abstract member-signature method method1() → core::int; -> opt::LegacyClass::method1
- abstract member-signature method method2() → core::int?; -> opt::LegacyClass::method2
- abstract member-signature method method3a(core::int a, core::int b) → core::int; -> opt::LegacyClass::method3a
- abstract member-signature method method3b(core::int a, [core::int b = #C1]) → core::int; -> opt::LegacyClass::method3b
- abstract member-signature method method3c([core::int a = #C1, core::int b = #C1]) → core::int; -> opt::LegacyClass::method3c
- abstract member-signature method method4a(core::int? a, core::int? b) → core::int?; -> opt::LegacyClass::method4a
- abstract member-signature method method4b(core::int? a, [core::int? b = #C1]) → core::int?; -> opt::LegacyClass::method4b
- abstract member-signature method method4c([core::int? a = #C1, core::int? b = #C1]) → core::int?; -> opt::LegacyClass::method4c
- abstract member-signature method method5a(core::int a, {core::int b = #C1}) → core::int; -> opt::LegacyClass::method5a
- abstract member-signature method method5b({core::int a = #C1, core::int b = #C1}) → core::int; -> opt::LegacyClass::method5b
- abstract member-signature method method5c({core::int a = #C1, core::int b = #C1}) → core::int; -> opt::LegacyClass::method5c
- abstract member-signature method method6a(core::int? a, {core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6a
- abstract member-signature method method6b({core::int? a = #C1, core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6b
- abstract member-signature method method6c({core::int? a = #C1, core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6c
- abstract member-signature get getter1() → core::int; -> opt::LegacyClass::getter1
- abstract member-signature get getter2() → core::int?; -> opt::LegacyClass::getter2
abstract member-signature get field1() → core::int; -> opt::LegacyClass::field1
abstract member-signature set field1(core::int _) → void; -> opt::LegacyClass::field1
abstract member-signature get field2() → core::int?; -> opt::LegacyClass::field2
@@ -81,6 +65,22 @@
abstract member-signature set property3(core::int value) → void; -> opt::LegacyClass::property3
abstract member-signature get property4() → core::int?; -> opt::LegacyClass::property4
abstract member-signature set property4(core::int? value) → void; -> opt::LegacyClass::property4
+ abstract member-signature method method1() → core::int; -> opt::LegacyClass::method1
+ abstract member-signature method method2() → core::int?; -> opt::LegacyClass::method2
+ abstract member-signature method method3a(core::int a, core::int b) → core::int; -> opt::LegacyClass::method3a
+ abstract member-signature method method3b(core::int a, [core::int b = #C1]) → core::int; -> opt::LegacyClass::method3b
+ abstract member-signature method method3c([core::int a = #C1, core::int b = #C1]) → core::int; -> opt::LegacyClass::method3c
+ abstract member-signature method method4a(core::int? a, core::int? b) → core::int?; -> opt::LegacyClass::method4a
+ abstract member-signature method method4b(core::int? a, [core::int? b = #C1]) → core::int?; -> opt::LegacyClass::method4b
+ abstract member-signature method method4c([core::int? a = #C1, core::int? b = #C1]) → core::int?; -> opt::LegacyClass::method4c
+ abstract member-signature method method5a(core::int a, {core::int b = #C1}) → core::int; -> opt::LegacyClass::method5a
+ abstract member-signature method method5b({core::int a = #C1, core::int b = #C1}) → core::int; -> opt::LegacyClass::method5b
+ abstract member-signature method method5c({core::int a = #C1, core::int b = #C1}) → core::int; -> opt::LegacyClass::method5c
+ abstract member-signature method method6a(core::int? a, {core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6a
+ abstract member-signature method method6b({core::int? a = #C1, core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6b
+ abstract member-signature method method6c({core::int? a = #C1, core::int? b = #C1}) → core::int?; -> opt::LegacyClass::method6c
+ abstract member-signature get getter1() → core::int; -> opt::LegacyClass::getter1
+ abstract member-signature get getter2() → core::int?; -> opt::LegacyClass::getter2
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/nnbd_mixed/mock_http_headers.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.expect
index 831000c..225ab3c 100644
--- a/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.expect
@@ -25,94 +25,94 @@
synthetic constructor •() → self::MockHttpHeaders*
: super self::Mock::•()
;
- no-such-method-forwarder operator [](core::String* name) → core::List<core::String*>*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::List<core::String*>*;
- no-such-method-forwarder method value(core::String* name) → core::String*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::String*;
- no-such-method-forwarder method add(core::String* name, core::Object* value, {core::bool* preserveHeaderCase = #C6}) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: preserveHeaderCase})));
- no-such-method-forwarder method set(core::String* name, core::Object* value, {core::bool* preserveHeaderCase = #C6}) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: preserveHeaderCase})));
- no-such-method-forwarder method remove(core::String* name, core::Object* value) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C10, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
- no-such-method-forwarder method removeAll(core::String* name) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C11, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
- no-such-method-forwarder method forEach((core::String*, core::List<core::String*>*) →* void action) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
- no-such-method-forwarder method noFolding(core::String* name) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get date() → core::DateTime*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
no-such-method-forwarder set date(core::DateTime* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get expires() → core::DateTime*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
no-such-method-forwarder set expires(core::DateTime* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get ifModifiedSince() → core::DateTime*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C18, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
no-such-method-forwarder set ifModifiedSince(core::DateTime* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C19, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get host() → core::String*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C20, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::String*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C10, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::String*;
no-such-method-forwarder set host(core::String* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C21, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C11, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get port() → core::int*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C22, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::int*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::int*;
no-such-method-forwarder set port(core::int* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C23, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get contentType() → _ht::ContentType*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C24, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} _ht::ContentType*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} _ht::ContentType*;
no-such-method-forwarder set contentType(_ht::ContentType* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C25, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get contentLength() → core::int*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C26, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::int*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::int*;
no-such-method-forwarder set contentLength(core::int* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C27, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get persistentConnection() → core::bool*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C28, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::bool*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C18, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::bool*;
no-such-method-forwarder set persistentConnection(core::bool* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C29, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C19, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get chunkedTransferEncoding() → core::bool*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C30, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::bool*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C20, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::bool*;
no-such-method-forwarder set chunkedTransferEncoding(core::bool* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C31, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C21, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ no-such-method-forwarder operator [](core::String* name) → core::List<core::String*>*
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C22, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::List<core::String*>*;
+ no-such-method-forwarder method value(core::String* name) → core::String*
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C23, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::String*;
+ no-such-method-forwarder method add(core::String* name, core::Object* value, {core::bool* preserveHeaderCase = #C24}) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C25, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C26: preserveHeaderCase})));
+ no-such-method-forwarder method set(core::String* name, core::Object* value, {core::bool* preserveHeaderCase = #C24}) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C27, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C26: preserveHeaderCase})));
+ no-such-method-forwarder method remove(core::String* name, core::Object* value) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C28, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ no-such-method-forwarder method removeAll(core::String* name) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C29, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ no-such-method-forwarder method forEach((core::String*, core::List<core::String*>*) →* void action) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C30, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ no-such-method-forwarder method noFolding(core::String* name) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C31, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/_http/http.dart */ clear() → void
return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C32, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
}
static method main() → dynamic {}
constants {
- #C1 = #[]
+ #C1 = #date
#C2 = <core::Type*>[]
#C3 = <dynamic>[]
#C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
- #C5 = #value
- #C6 = false
- #C7 = #add
- #C8 = #preserveHeaderCase
- #C9 = #set
- #C10 = #remove
- #C11 = #removeAll
- #C12 = #forEach
- #C13 = #noFolding
- #C14 = #date
- #C15 = #date=
- #C16 = #expires
- #C17 = #expires=
- #C18 = #ifModifiedSince
- #C19 = #ifModifiedSince=
- #C20 = #host
- #C21 = #host=
- #C22 = #port
- #C23 = #port=
- #C24 = #contentType
- #C25 = #contentType=
- #C26 = #contentLength
- #C27 = #contentLength=
- #C28 = #persistentConnection
- #C29 = #persistentConnection=
- #C30 = #chunkedTransferEncoding
- #C31 = #chunkedTransferEncoding=
+ #C5 = #date=
+ #C6 = #expires
+ #C7 = #expires=
+ #C8 = #ifModifiedSince
+ #C9 = #ifModifiedSince=
+ #C10 = #host
+ #C11 = #host=
+ #C12 = #port
+ #C13 = #port=
+ #C14 = #contentType
+ #C15 = #contentType=
+ #C16 = #contentLength
+ #C17 = #contentLength=
+ #C18 = #persistentConnection
+ #C19 = #persistentConnection=
+ #C20 = #chunkedTransferEncoding
+ #C21 = #chunkedTransferEncoding=
+ #C22 = #[]
+ #C23 = #value
+ #C24 = false
+ #C25 = #add
+ #C26 = #preserveHeaderCase
+ #C27 = #set
+ #C28 = #remove
+ #C29 = #removeAll
+ #C30 = #forEach
+ #C31 = #noFolding
#C32 = #clear
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.transformed.expect
index 831000c..225ab3c 100644
--- a/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.transformed.expect
@@ -25,94 +25,94 @@
synthetic constructor •() → self::MockHttpHeaders*
: super self::Mock::•()
;
- no-such-method-forwarder operator [](core::String* name) → core::List<core::String*>*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::List<core::String*>*;
- no-such-method-forwarder method value(core::String* name) → core::String*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::String*;
- no-such-method-forwarder method add(core::String* name, core::Object* value, {core::bool* preserveHeaderCase = #C6}) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: preserveHeaderCase})));
- no-such-method-forwarder method set(core::String* name, core::Object* value, {core::bool* preserveHeaderCase = #C6}) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: preserveHeaderCase})));
- no-such-method-forwarder method remove(core::String* name, core::Object* value) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C10, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
- no-such-method-forwarder method removeAll(core::String* name) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C11, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
- no-such-method-forwarder method forEach((core::String*, core::List<core::String*>*) →* void action) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
- no-such-method-forwarder method noFolding(core::String* name) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get date() → core::DateTime*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
no-such-method-forwarder set date(core::DateTime* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get expires() → core::DateTime*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
no-such-method-forwarder set expires(core::DateTime* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get ifModifiedSince() → core::DateTime*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C18, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::DateTime*;
no-such-method-forwarder set ifModifiedSince(core::DateTime* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C19, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get host() → core::String*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C20, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::String*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C10, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::String*;
no-such-method-forwarder set host(core::String* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C21, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C11, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get port() → core::int*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C22, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::int*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::int*;
no-such-method-forwarder set port(core::int* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C23, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get contentType() → _ht::ContentType*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C24, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} _ht::ContentType*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} _ht::ContentType*;
no-such-method-forwarder set contentType(_ht::ContentType* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C25, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get contentLength() → core::int*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C26, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::int*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::int*;
no-such-method-forwarder set contentLength(core::int* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C27, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get persistentConnection() → core::bool*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C28, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::bool*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C18, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::bool*;
no-such-method-forwarder set persistentConnection(core::bool* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C29, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C19, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder get chunkedTransferEncoding() → core::bool*
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C30, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::bool*;
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C20, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::bool*;
no-such-method-forwarder set chunkedTransferEncoding(core::bool* _) → void
- return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C31, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C21, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ no-such-method-forwarder operator [](core::String* name) → core::List<core::String*>*
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C22, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::List<core::String*>*;
+ no-such-method-forwarder method value(core::String* name) → core::String*
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C23, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))) as{TypeError,ForDynamic} core::String*;
+ no-such-method-forwarder method add(core::String* name, core::Object* value, {core::bool* preserveHeaderCase = #C24}) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C25, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C26: preserveHeaderCase})));
+ no-such-method-forwarder method set(core::String* name, core::Object* value, {core::bool* preserveHeaderCase = #C24}) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C27, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C26: preserveHeaderCase})));
+ no-such-method-forwarder method remove(core::String* name, core::Object* value) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C28, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name, value]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ no-such-method-forwarder method removeAll(core::String* name) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C29, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ no-such-method-forwarder method forEach((core::String*, core::List<core::String*>*) →* void action) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C30, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+ no-such-method-forwarder method noFolding(core::String* name) → void
+ return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C31, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[name]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
no-such-method-forwarder method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/_http/http.dart */ clear() → void
return this.{self::Mock::noSuchMethod}(new core::_InvocationMirror::_withType(#C32, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
}
static method main() → dynamic {}
constants {
- #C1 = #[]
+ #C1 = #date
#C2 = <core::Type*>[]
#C3 = <dynamic>[]
#C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
- #C5 = #value
- #C6 = false
- #C7 = #add
- #C8 = #preserveHeaderCase
- #C9 = #set
- #C10 = #remove
- #C11 = #removeAll
- #C12 = #forEach
- #C13 = #noFolding
- #C14 = #date
- #C15 = #date=
- #C16 = #expires
- #C17 = #expires=
- #C18 = #ifModifiedSince
- #C19 = #ifModifiedSince=
- #C20 = #host
- #C21 = #host=
- #C22 = #port
- #C23 = #port=
- #C24 = #contentType
- #C25 = #contentType=
- #C26 = #contentLength
- #C27 = #contentLength=
- #C28 = #persistentConnection
- #C29 = #persistentConnection=
- #C30 = #chunkedTransferEncoding
- #C31 = #chunkedTransferEncoding=
+ #C5 = #date=
+ #C6 = #expires
+ #C7 = #expires=
+ #C8 = #ifModifiedSince
+ #C9 = #ifModifiedSince=
+ #C10 = #host
+ #C11 = #host=
+ #C12 = #port
+ #C13 = #port=
+ #C14 = #contentType
+ #C15 = #contentType=
+ #C16 = #contentLength
+ #C17 = #contentLength=
+ #C18 = #persistentConnection
+ #C19 = #persistentConnection=
+ #C20 = #chunkedTransferEncoding
+ #C21 = #chunkedTransferEncoding=
+ #C22 = #[]
+ #C23 = #value
+ #C24 = false
+ #C25 = #add
+ #C26 = #preserveHeaderCase
+ #C27 = #set
+ #C28 = #remove
+ #C29 = #removeAll
+ #C30 = #forEach
+ #C31 = #noFolding
#C32 = #clear
}
diff --git a/pkg/front_end/testcases/old_dills/dills/dart2js.version.46.compile.1.dill b/pkg/front_end/testcases/old_dills/dills/dart2js.version.46.compile.1.dill
new file mode 100644
index 0000000..d766ad5
--- /dev/null
+++ b/pkg/front_end/testcases/old_dills/dills/dart2js.version.46.compile.1.dill
Binary files differ
diff --git a/pkg/front_end/testcases/outline.status b/pkg/front_end/testcases/outline.status
index 82835d3..532869a 100644
--- a/pkg/front_end/testcases/outline.status
+++ b/pkg/front_end/testcases/outline.status
@@ -16,6 +16,7 @@
general/bug30695: TypeCheckError
general/constants/const_collections: TypeCheckError
general/covariant_field: TypeCheckError
+general/getter_vs_setter_type: TypeCheckError
general/infer_field_from_multiple: TypeCheckError
general/invalid_operator: TypeCheckError
general/invalid_operator_override: TypeCheckError
@@ -44,6 +45,7 @@
inference/mixin_inference_unification_2: TypeCheckError
late_lowering/covariant_late_field: TypeCheckError
nnbd/covariant_late_field: TypeCheckError
+nnbd/getter_vs_setter_type: TypeCheckError
nnbd/issue42603: TypeCheckError
rasta/native_is_illegal: Pass # Issue 29763
runtime_checks_new/mixin_forwarding_stub_field: TypeCheckError
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.outline.expect
index 5fd91f2..fa1259d 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.outline.expect
@@ -1,4 +1,15 @@
library test;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart:30:14: Error: The type 'C<num>' of the getter 'D.value' is not assignable to the type 'int Function(int)' of the setter 'D.value'.
+// - 'C' is from 'pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart'.
+// C<num> get value => getValue;
+// ^^^^^
+// pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart:32:12: Context: This is the declaration of the setter 'D.value'.
+// void set value(int Function(int) value) {
+// ^^^^^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.strong.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.strong.expect
index 59b4ef8..408ea27 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.strong.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.strong.expect
@@ -2,6 +2,14 @@
//
// Problems in library:
//
+// pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart:30:14: Error: The type 'C<num>' of the getter 'D.value' is not assignable to the type 'int Function(int)' of the setter 'D.value'.
+// - 'C' is from 'pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart'.
+// C<num> get value => getValue;
+// ^^^^^
+// pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart:32:12: Context: This is the declaration of the setter 'D.value'.
+// void set value(int Function(int) value) {
+// ^^^^^
+//
// pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart:49:46: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'int Function(int)'.
// d.value /*@ checkReturn=(num*) ->* num* */ += 1;
// ^
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.strong.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.strong.transformed.expect
index c4d3d9c..7907879 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.strong.transformed.expect
@@ -2,6 +2,14 @@
//
// Problems in library:
//
+// pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart:30:14: Error: The type 'C<num>' of the getter 'D.value' is not assignable to the type 'int Function(int)' of the setter 'D.value'.
+// - 'C' is from 'pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart'.
+// C<num> get value => getValue;
+// ^^^^^
+// pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart:32:12: Context: This is the declaration of the setter 'D.value'.
+// void set value(int Function(int) value) {
+// ^^^^^
+//
// pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart:49:46: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'int Function(int)'.
// d.value /*@ checkReturn=(num*) ->* num* */ += 1;
// ^
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index 660c22a..64c777e 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -62,6 +62,7 @@
general/error_recovery/yield_not_in_generator: RuntimeError
general/expressions: RuntimeError
general/external_import: RuntimeError # The native extension to import doesn't exist. This is ok.
+general/getter_vs_setter_type: TypeCheckError
general/incomplete_field_formal_parameter: RuntimeError
general/infer_field_from_multiple: TypeCheckError
general/invalid_operator: TypeCheckError
@@ -174,6 +175,7 @@
late_lowering/initializer_rewrite_from_opt_out: RuntimeError # Test is inherently mixed mode
late_lowering/non_nullable_from_opt_out: RuntimeError # Test is inherently mixed mode
nnbd/covariant_late_field: TypeCheckError
+nnbd/getter_vs_setter_type: TypeCheckError
nnbd/issue41180: RuntimeError # Strong mode runtime checking fails due to mixed strong mode.
nnbd/issue42546: TypeCheckError
nnbd/issue42603: TypeCheckError
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index 5515dcd..be9e404 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -66,6 +66,7 @@
general/error_recovery/yield_not_in_generator: RuntimeError
general/expressions: RuntimeError
general/external_import: RuntimeError
+general/getter_vs_setter_type: TypeCheckError
general/incomplete_field_formal_parameter: RuntimeError
general/infer_field_from_multiple: TypeCheckError
general/invalid_operator: TypeCheckError
@@ -176,6 +177,7 @@
late_lowering/initializer_rewrite_from_opt_out: RuntimeError # Test is inherently mixed mode
late_lowering/non_nullable_from_opt_out: RuntimeError # Test is inherently mixed mode
nnbd/covariant_late_field: TypeCheckError
+nnbd/getter_vs_setter_type: TypeCheckError
nnbd/issue41180: RuntimeError
nnbd/issue42546: TypeCheckError
nnbd/issue42603: TypeCheckError
diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status
index 3d0f6a4..d26a0c2 100644
--- a/pkg/front_end/testcases/textual_outline.status
+++ b/pkg/front_end/testcases/textual_outline.status
@@ -132,6 +132,7 @@
inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1: FormatterCrash
inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1: FormatterCrash
late_lowering/covariant_late_field: FormatterCrash
+late_lowering/getter_vs_setter_type: FormatterCrash
late_lowering/infer_late_field_type: FormatterCrash
late_lowering/initializer_rewrite: FormatterCrash
late_lowering/initializer_rewrite_from_opt_out: FormatterCrash
@@ -170,6 +171,7 @@
nnbd/external_field_errors: FormatterCrash
nnbd/external_fields: FormatterCrash
nnbd/forbidden_supers: FormatterCrash
+nnbd/getter_vs_setter_type_late: FormatterCrash
nnbd/infer_if_null: FormatterCrash
nnbd/inheritance_from_opt_in: FormatterCrash
nnbd/issue40805: FormatterCrash
diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status
index eae95b4..689551d 100644
--- a/pkg/front_end/testcases/weak.status
+++ b/pkg/front_end/testcases/weak.status
@@ -60,6 +60,7 @@
general_nnbd_opt_out/void_methods: RuntimeError
late_lowering/covariant_late_field: TypeCheckError
nnbd/covariant_late_field: TypeCheckError
+nnbd/getter_vs_setter_type: TypeCheckError
nnbd/issue42546: TypeCheckError
nnbd/issue42603: TypeCheckError
nnbd/no_support_for_old_null_aware_index_access_syntax: RuntimeError # Expected.
diff --git a/runtime/observatory/tests/service/service.status b/runtime/observatory/tests/service/service.status
index c16feab..bc2bb42 100644
--- a/runtime/observatory/tests/service/service.status
+++ b/runtime/observatory/tests/service/service.status
@@ -15,10 +15,8 @@
[ $arch == arm ]
process_service_test: Pass, Fail # Issue 24344
-# Test uses service API and relies on correct class names
[ $builder_tag == obfuscated ]
-dominator_tree_vm_test: SkipByDesign
-dominator_tree_vm_with_double_field_test: SkipByDesign
+*: SkipByDesign # Responses full of obfuscated names
# Tests with known analyzer issues
[ $compiler == dart2analyzer ]
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index 0468cab..7fb5eca 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -5158,9 +5158,9 @@
class ProgramSerializationRoots : public SerializationRoots {
public:
- ProgramSerializationRoots(intptr_t num_base_objects,
+ ProgramSerializationRoots(ZoneGrowableArray<Object*>* base_objects,
ObjectStore* object_store)
- : num_base_objects_(num_base_objects),
+ : base_objects_(base_objects),
object_store_(object_store),
saved_symbol_table_(Array::Handle()),
saved_canonical_types_(Array::Handle()),
@@ -5194,7 +5194,7 @@
}
void AddBaseObjects(Serializer* s) {
- if (num_base_objects_ == 0) {
+ if (base_objects_ == nullptr) {
// Not writing a new vm isolate: use the one this VM was loaded from.
const Array& base_objects = Object::vm_isolate_snapshot_object_table();
for (intptr_t i = kFirstReference; i < base_objects.Length(); i++) {
@@ -5202,7 +5202,9 @@
}
} else {
// Base objects carried over from WriteVMSnapshot.
- s->CarryOverBaseObjects(num_base_objects_);
+ for (intptr_t i = 0; i < base_objects_->length(); i++) {
+ s->AddBaseObject((*base_objects_)[i]->raw());
+ }
}
}
@@ -5242,7 +5244,7 @@
}
private:
- intptr_t num_base_objects_;
+ ZoneGrowableArray<Object*>* base_objects_;
ObjectStore* object_store_;
Array& saved_symbol_table_;
Array& saved_canonical_types_;
@@ -5306,9 +5308,10 @@
: unit_(unit) {}
void AddBaseObjects(Serializer* s) {
- intptr_t num_base_objects = unit_->parent()->num_objects();
- ASSERT(num_base_objects != 0);
- s->CarryOverBaseObjects(num_base_objects);
+ ZoneGrowableArray<Object*>* objects = unit_->parent()->objects();
+ for (intptr_t i = 0; i < objects->length(); i++) {
+ s->AddBaseObject(objects->At(i)->raw());
+ }
}
void PushRoots(Serializer* s) {
@@ -5469,6 +5472,58 @@
delete[] clusters_by_cid_;
}
+void Serializer::AddBaseObject(ObjectPtr base_object,
+ const char* type,
+ const char* name) {
+ intptr_t ref = AssignRef(base_object);
+ num_base_objects_++;
+
+ if ((profile_writer_ != nullptr) && (type != nullptr)) {
+ if (name == nullptr) {
+ name = "<base object>";
+ }
+ profile_writer_->SetObjectTypeAndName(
+ {V8SnapshotProfileWriter::kSnapshot, ref}, type, name);
+ profile_writer_->AddRoot({V8SnapshotProfileWriter::kSnapshot, ref});
+ }
+}
+
+intptr_t Serializer::AssignRef(ObjectPtr object) {
+ ASSERT(IsAllocatedReference(next_ref_index_));
+ if (object->IsHeapObject()) {
+ // The object id weak table holds image offsets for Instructions instead
+ // of ref indices.
+ ASSERT(!object->IsInstructions());
+ heap_->SetObjectId(object, next_ref_index_);
+ ASSERT(heap_->GetObjectId(object) == next_ref_index_);
+ } else {
+ SmiPtr smi = Smi::RawCast(object);
+ SmiObjectIdPair* existing_pair = smi_ids_.Lookup(smi);
+ if (existing_pair != NULL) {
+ ASSERT(existing_pair->id_ == kUnallocatedReference);
+ existing_pair->id_ = next_ref_index_;
+ } else {
+ SmiObjectIdPair new_pair;
+ new_pair.smi_ = smi;
+ new_pair.id_ = next_ref_index_;
+ smi_ids_.Insert(new_pair);
+ }
+ }
+
+ objects_->Add(&Object::ZoneHandle(object));
+
+ return next_ref_index_++;
+}
+
+intptr_t Serializer::AssignArtificialRef(ObjectPtr object) {
+ ASSERT(object.IsHeapObject());
+ const intptr_t ref = -(next_ref_index_++);
+ ASSERT(IsArtificialReference(ref));
+ heap_->SetObjectId(object, ref);
+ ASSERT(heap_->GetObjectId(object) == ref);
+ return ref;
+}
+
void Serializer::FlushBytesWrittenToRoot() {
#if defined(DART_PRECOMPILER)
if (profile_writer_ != nullptr) {
@@ -5999,7 +6054,7 @@
}
}
-intptr_t Serializer::Serialize(SerializationRoots* roots) {
+ZoneGrowableArray<Object*>* Serializer::Serialize(SerializationRoots* roots) {
roots->AddBaseObjects(this);
NoSafepointScope no_safepoint;
@@ -6065,12 +6120,8 @@
// We should have assigned a ref to every object we pushed.
ASSERT((next_ref_index_ - 1) == num_objects);
-
- if (loading_units_ != nullptr) {
- LoadingUnitSerializationData* unit =
- (*loading_units_)[current_loading_unit_id_];
- unit->set_num_objects(num_objects);
- }
+ // And recorded them all in [objects_].
+ ASSERT(objects_->length() == num_objects);
#if defined(DART_PRECOMPILER)
// When writing snapshot profile, we want to retain some of the program
@@ -6106,12 +6157,8 @@
PrintSnapshotSizes();
- // Note we are not clearing the object id table. The full ref table
- // of the vm isolate snapshot serves as the base objects for the
- // regular isolate snapshot.
-
- // Return the number of objects, -1 accounts for unused ref 0.
- return next_ref_index_ - kFirstReference;
+ heap()->ResetObjectIdTable();
+ return objects_;
}
#endif // !defined(DART_PRECOMPILED_RUNTIME)
@@ -6914,7 +6961,7 @@
FullSnapshotWriter::~FullSnapshotWriter() {}
-intptr_t FullSnapshotWriter::WriteVMSnapshot() {
+ZoneGrowableArray<Object*>* FullSnapshotWriter::WriteVMSnapshot() {
TIMELINE_DURATION(thread(), Isolate, "WriteVMSnapshot");
ASSERT(vm_snapshot_data_ != nullptr);
@@ -6925,7 +6972,7 @@
serializer.WriteVersionAndFeatures(true);
VMSerializationRoots roots(
Array::Handle(Dart::vm_isolate()->object_store()->symbol_table()));
- intptr_t num_objects = serializer.Serialize(&roots);
+ ZoneGrowableArray<Object*>* objects = serializer.Serialize(&roots);
serializer.FillHeader(serializer.kind());
clustered_vm_size_ = serializer.bytes_written();
@@ -6940,11 +6987,11 @@
// The clustered part + the direct mapped data part.
vm_isolate_snapshot_size_ = serializer.bytes_written();
- return num_objects;
+ return objects;
}
void FullSnapshotWriter::WriteProgramSnapshot(
- intptr_t num_base_objects,
+ ZoneGrowableArray<Object*>* objects,
GrowableArray<LoadingUnitSerializationData*>* units) {
TIMELINE_DURATION(thread(), Isolate, "WriteProgramSnapshot");
@@ -6965,8 +7012,11 @@
serializer.ReserveHeader();
serializer.WriteVersionAndFeatures(false);
- ProgramSerializationRoots roots(num_base_objects, object_store);
- serializer.Serialize(&roots);
+ ProgramSerializationRoots roots(objects, object_store);
+ objects = serializer.Serialize(&roots);
+ if (units != nullptr) {
+ (*units)[LoadingUnit::kRootId]->set_objects(objects);
+ }
serializer.FillHeader(serializer.kind());
clustered_isolate_size_ = serializer.bytes_written();
@@ -7003,7 +7053,8 @@
serializer.Write(program_hash);
UnitSerializationRoots roots(unit);
- serializer.Serialize(&roots);
+ unit->set_objects(serializer.Serialize(&roots));
+
serializer.FillHeader(serializer.kind());
clustered_isolate_size_ = serializer.bytes_written();
@@ -7026,16 +7077,15 @@
void FullSnapshotWriter::WriteFullSnapshot(
GrowableArray<LoadingUnitSerializationData*>* data) {
- intptr_t num_base_objects;
+ ZoneGrowableArray<Object*>* objects;
if (vm_snapshot_data_ != nullptr) {
- num_base_objects = WriteVMSnapshot();
- ASSERT(num_base_objects != 0);
+ objects = WriteVMSnapshot();
} else {
- num_base_objects = 0;
+ objects = nullptr;
}
if (isolate_snapshot_data_ != nullptr) {
- WriteProgramSnapshot(num_base_objects, data);
+ WriteProgramSnapshot(objects, data);
}
if (FLAG_print_snapshot_sizes) {
diff --git a/runtime/vm/clustered_snapshot.h b/runtime/vm/clustered_snapshot.h
index ab079c8..56ba846 100644
--- a/runtime/vm/clustered_snapshot.h
+++ b/runtime/vm/clustered_snapshot.h
@@ -54,22 +54,28 @@
public:
LoadingUnitSerializationData(intptr_t id,
LoadingUnitSerializationData* parent)
- : id_(id), parent_(parent), deferred_objects_(), num_objects_(0) {}
+ : id_(id), parent_(parent), deferred_objects_(), objects_(nullptr) {}
intptr_t id() const { return id_; }
LoadingUnitSerializationData* parent() const { return parent_; }
- intptr_t num_objects() const { return num_objects_; }
- void set_num_objects(intptr_t value) { num_objects_ = value; }
void AddDeferredObject(CodePtr obj) {
deferred_objects_.Add(&Code::ZoneHandle(obj));
}
GrowableArray<Code*>* deferred_objects() { return &deferred_objects_; }
+ ZoneGrowableArray<Object*>* objects() {
+ ASSERT(objects_ != nullptr);
+ return objects_;
+ }
+ void set_objects(ZoneGrowableArray<Object*>* objects) {
+ ASSERT(objects_ == nullptr);
+ objects_ = objects;
+ }
private:
intptr_t id_;
LoadingUnitSerializationData* parent_;
GrowableArray<Code*> deferred_objects_;
- intptr_t num_objects_;
+ ZoneGrowableArray<Object*>* objects_;
};
class SerializationCluster : public ZoneAllocated {
@@ -202,59 +208,9 @@
void AddBaseObject(ObjectPtr base_object,
const char* type = nullptr,
- const char* name = nullptr) {
- intptr_t ref = AssignRef(base_object);
- num_base_objects_++;
-
- if (profile_writer_ != nullptr) {
- if (type == nullptr) {
- type = "Unknown";
- }
- if (name == nullptr) {
- name = "<base object>";
- }
- profile_writer_->SetObjectTypeAndName(
- {V8SnapshotProfileWriter::kSnapshot, ref}, type, name);
- profile_writer_->AddRoot({V8SnapshotProfileWriter::kSnapshot, ref});
- }
- }
- void CarryOverBaseObjects(intptr_t num_base_objects) {
- num_base_objects_ = num_base_objects;
- next_ref_index_ = num_base_objects + 1;
- }
-
- intptr_t AssignRef(ObjectPtr object) {
- ASSERT(IsAllocatedReference(next_ref_index_));
- if (object->IsHeapObject()) {
- // The object id weak table holds image offsets for Instructions instead
- // of ref indices.
- ASSERT(!object->IsInstructions());
- heap_->SetObjectId(object, next_ref_index_);
- ASSERT(heap_->GetObjectId(object) == next_ref_index_);
- } else {
- SmiPtr smi = Smi::RawCast(object);
- SmiObjectIdPair* existing_pair = smi_ids_.Lookup(smi);
- if (existing_pair != NULL) {
- ASSERT(existing_pair->id_ == kUnallocatedReference);
- existing_pair->id_ = next_ref_index_;
- } else {
- SmiObjectIdPair new_pair;
- new_pair.smi_ = smi;
- new_pair.id_ = next_ref_index_;
- smi_ids_.Insert(new_pair);
- }
- }
- return next_ref_index_++;
- }
-
- intptr_t AssignArtificialRef(ObjectPtr object) {
- ASSERT(object.IsHeapObject());
- const intptr_t ref = -(next_ref_index_++);
- ASSERT(IsArtificialReference(ref));
- heap_->SetObjectId(object, ref);
- ASSERT(heap_->GetObjectId(object) == ref);
- return ref;
- }
+ const char* name = nullptr);
+ intptr_t AssignRef(ObjectPtr object);
+ intptr_t AssignArtificialRef(ObjectPtr object);
void Push(ObjectPtr object);
@@ -283,7 +239,7 @@
void WriteVersionAndFeatures(bool is_vm_snapshot);
- intptr_t Serialize(SerializationRoots* roots);
+ ZoneGrowableArray<Object*>* Serialize(SerializationRoots* roots);
void PrintSnapshotSizes();
FieldTable* field_table() { return field_table_; }
@@ -537,6 +493,7 @@
intptr_t current_loading_unit_id_ = 0;
GrowableArray<LoadingUnitSerializationData*>* loading_units_ = nullptr;
+ ZoneGrowableArray<Object*>* objects_ = new ZoneGrowableArray<Object*>();
DISALLOW_IMPLICIT_CONSTRUCTORS(Serializer);
};
@@ -765,10 +722,10 @@
private:
// Writes a snapshot of the VM Isolate.
- intptr_t WriteVMSnapshot();
+ ZoneGrowableArray<Object*>* WriteVMSnapshot();
// Writes a full snapshot of regular Dart isolate group.
- void WriteProgramSnapshot(intptr_t num_base_objects,
+ void WriteProgramSnapshot(ZoneGrowableArray<Object*>* objects,
GrowableArray<LoadingUnitSerializationData*>* data);
Thread* thread_;
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index d638bcf..df7a2b7 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1415,6 +1415,8 @@
BackgroundCompiler::Stop(isolate);
isolate->heap()->WaitForMarkerTasks(thread);
isolate->heap()->WaitForSweeperTasks(thread);
+ SafepointOperationScope safepoint_operation(thread);
+ isolate->group()->ReleaseStoreBuffers();
RELEASE_ASSERT(isolate->heap()->old_space()->tasks() == 0);
}
diff --git a/runtime/vm/heap/heap.cc b/runtime/vm/heap/heap.cc
index 2acdfd3..0d2ac0c 100644
--- a/runtime/vm/heap/heap.cc
+++ b/runtime/vm/heap/heap.cc
@@ -723,6 +723,16 @@
new_weak_tables_[i]->MergeFrom(donor->new_weak_tables_[i]);
old_weak_tables_[i]->MergeFrom(donor->old_weak_tables_[i]);
}
+
+ StoreBufferBlock* block =
+ donor->isolate_group()->store_buffer()->TakeBlocks();
+ while (block != nullptr) {
+ StoreBufferBlock* next = block->next();
+ block->set_next(nullptr);
+ isolate_group()->store_buffer()->PushBlock(block,
+ StoreBuffer::kIgnoreThreshold);
+ block = next;
+ }
}
void Heap::CollectForDebugging() {
diff --git a/runtime/vm/heap/pointer_block.h b/runtime/vm/heap/pointer_block.h
index 73cf03b..4a40cd1 100644
--- a/runtime/vm/heap/pointer_block.h
+++ b/runtime/vm/heap/pointer_block.h
@@ -28,6 +28,7 @@
}
PointerBlock<Size>* next() const { return next_; }
+ void set_next(PointerBlock<Size>* next) { next_ = next; }
intptr_t Count() const { return top_; }
bool IsFull() const { return Count() == kSize; }
diff --git a/runtime/vm/heap/verifier.cc b/runtime/vm/heap/verifier.cc
index 48610f8..4c2da50 100644
--- a/runtime/vm/heap/verifier.cc
+++ b/runtime/vm/heap/verifier.cc
@@ -53,8 +53,8 @@
allocated_set_->Contains(OldPage::ToWritable(raw_obj))) {
continue;
}
- uword raw_addr = ObjectLayout::ToAddr(raw_obj);
- FATAL1("Invalid object pointer encountered %#" Px "\n", raw_addr);
+ FATAL2("Invalid object pointer encountered %#" Px ": %#" Px "\n",
+ reinterpret_cast<uword>(current), static_cast<uword>(raw_obj));
}
}
}
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 8f475f6..5aa297b 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -133,6 +133,12 @@
}
}
+static std::unique_ptr<Message> SerializeMessage(Dart_Port dest_port,
+ Dart_CObject* obj) {
+ ApiMessageWriter writer;
+ return writer.WriteCMessage(obj, dest_port, Message::kNormalPriority);
+}
+
static InstancePtr DeserializeMessage(Thread* thread, Message* message) {
if (message == NULL) {
return Instance::null();
@@ -1447,34 +1453,38 @@
NoReloadScope no_reload_scope(T->isolate(), T);
// Generate the error and stacktrace strings for the error message.
- String& exc_str = String::Handle(T->zone());
- String& stacktrace_str = String::Handle(T->zone());
+ const char* exception_cstr = nullptr;
+ const char* stacktrace_cstr = nullptr;
if (result.IsUnhandledException()) {
Zone* zone = T->zone();
const UnhandledException& uhe = UnhandledException::Cast(result);
const Instance& exception = Instance::Handle(zone, uhe.exception());
- Object& tmp = Object::Handle(zone);
- tmp = DartLibraryCalls::ToString(exception);
- if (!tmp.IsString()) {
- tmp = String::New(exception.ToCString());
+ if (exception.raw() == I->object_store()->out_of_memory()) {
+ exception_cstr = "Out of Memory"; // Cf. OutOfMemoryError.toString().
+ } else if (exception.raw() == I->object_store()->stack_overflow()) {
+ exception_cstr = "Stack Overflow"; // Cf. StackOverflowError.toString().
+ } else {
+ const Object& exception_str =
+ Object::Handle(zone, DartLibraryCalls::ToString(exception));
+ if (!exception_str.IsString()) {
+ exception_cstr = exception.ToCString();
+ } else {
+ exception_cstr = exception_str.ToCString();
+ }
}
- exc_str ^= tmp.raw();
const Instance& stacktrace = Instance::Handle(zone, uhe.stacktrace());
- tmp = DartLibraryCalls::ToString(stacktrace);
- if (!tmp.IsString()) {
- tmp = String::New(stacktrace.ToCString());
- }
- stacktrace_str ^= tmp.raw();
+ stacktrace_cstr = stacktrace.ToCString();
} else {
- exc_str = String::New(result.ToErrorCString());
+ exception_cstr = result.ToErrorCString();
}
if (result.IsUnwindError()) {
// When unwinding we don't notify error listeners and we ignore
// whether errors are fatal for the current isolate.
return StoreError(T, result);
} else {
- bool has_listener = I->NotifyErrorListeners(exc_str, stacktrace_str);
+ bool has_listener =
+ I->NotifyErrorListeners(exception_cstr, stacktrace_cstr);
if (I->ErrorsFatal()) {
if (has_listener) {
T->ClearStickyError();
@@ -2276,21 +2286,32 @@
}
}
-bool Isolate::NotifyErrorListeners(const String& msg,
- const String& stacktrace) {
+bool Isolate::NotifyErrorListeners(const char* message,
+ const char* stacktrace) {
const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
current_zone(), isolate_object_store()->error_listeners());
if (listeners.IsNull()) return false;
- const Array& arr = Array::Handle(current_zone(), Array::New(2));
- arr.SetAt(0, msg);
- arr.SetAt(1, stacktrace);
+ Dart_CObject arr;
+ Dart_CObject* arr_values[2];
+ arr.type = Dart_CObject_kArray;
+ arr.value.as_array.length = 2;
+ arr.value.as_array.values = arr_values;
+ Dart_CObject msg;
+ msg.type = Dart_CObject_kString;
+ msg.value.as_string = const_cast<char*>(message);
+ arr_values[0] = &msg;
+ Dart_CObject stack;
+ stack.type = Dart_CObject_kString;
+ stack.value.as_string = const_cast<char*>(stacktrace);
+ arr_values[1] = &stack;
+
SendPort& listener = SendPort::Handle(current_zone());
for (intptr_t i = 0; i < listeners.Length(); i++) {
listener ^= listeners.At(i);
if (!listener.IsNull()) {
Dart_Port port_id = listener.Id();
- PortMap::PostMessage(SerializeMessage(port_id, arr));
+ PortMap::PostMessage(SerializeMessage(port_id, &arr));
}
}
return listeners.Length() > 0;
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 66ff4ec..51d50d91 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -1004,7 +1004,7 @@
void AddErrorListener(const SendPort& listener);
void RemoveErrorListener(const SendPort& listener);
- bool NotifyErrorListeners(const String& msg, const String& stacktrace);
+ bool NotifyErrorListeners(const char* msg, const char* stacktrace);
bool ErrorsFatal() const { return ErrorsFatalBit::decode(isolate_flags_); }
void SetErrorsFatal(bool val) {
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index 103f4e8..36705f7 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -55,17 +55,6 @@
}
#endif // !PRODUCT
-static UnhandledExceptionPtr CreatePreallocatedUnandledException(
- Zone* zone,
- const Object& out_of_memory) {
- // Allocate pre-allocated unhandled exception object initialized with the
- // pre-allocated OutOfMemoryError.
- const UnhandledException& unhandled_exception =
- UnhandledException::Handle(UnhandledException::New(
- Instance::Cast(out_of_memory), StackTrace::Handle(zone)));
- return unhandled_exception.raw();
-}
-
static StackTracePtr CreatePreallocatedStackTrace(Zone* zone) {
const Array& code_array = Array::Handle(
zone, Array::New(StackTrace::kPreallocatedStackdepth, Heap::kOld));
@@ -93,10 +82,12 @@
// pre-allocated OutOfMemoryError.
const Object& out_of_memory =
Object::Handle(zone, object_store_->out_of_memory());
+ const StackTrace& preallocated_stack_trace =
+ StackTrace::Handle(zone, CreatePreallocatedStackTrace(zone));
+ set_preallocated_stack_trace(preallocated_stack_trace);
set_preallocated_unhandled_exception(UnhandledException::Handle(
- CreatePreallocatedUnandledException(zone, out_of_memory)));
- set_preallocated_stack_trace(
- StackTrace::Handle(CreatePreallocatedStackTrace(zone)));
+ zone, UnhandledException::New(Instance::Cast(out_of_memory),
+ preallocated_stack_trace)));
return Error::null();
}
diff --git a/sdk/lib/_internal/vm/bin/vmservice_server.dart b/sdk/lib/_internal/vm/bin/vmservice_server.dart
index 383b19b..69aa7f8 100644
--- a/sdk/lib/_internal/vm/bin/vmservice_server.dart
+++ b/sdk/lib/_internal/vm/bin/vmservice_server.dart
@@ -369,11 +369,8 @@
WebSocketClient(webSocket, _service);
});
} else {
- request.response.statusCode = HttpStatus.forbidden;
- request.response.write('Cannot connect directly to the VM service as '
- 'a Dart Development Service (DDS) instance has taken control and '
- 'can be found at ${_service.ddsUri}.');
- request.response.close();
+ // Attempt to redirect client to the DDS instance.
+ request.response.redirect(_service.ddsUri!);
}
return;
}
diff --git a/sdk/lib/vmservice/vmservice.dart b/sdk/lib/vmservice/vmservice.dart
index e0ccfaa..755e934 100644
--- a/sdk/lib/vmservice/vmservice.dart
+++ b/sdk/lib/vmservice/vmservice.dart
@@ -239,6 +239,12 @@
details:
'Embedder does not support yielding to a VM service intermediary.');
}
+
+ if (_ddsUri != null) {
+ return encodeRpcError(message, kFeatureDisabled,
+ details: 'A DDS instance is already connected at ${_ddsUri!}.');
+ }
+
final uri = message.params['uri'];
if (uri == null) {
return encodeMissingParamError(message, 'uri');
diff --git a/tests/language_2/getter/setter2_test.dart b/tests/language_2/getter/setter2_test.dart
index a533c41..ad8700b 100644
--- a/tests/language_2/getter/setter2_test.dart
+++ b/tests/language_2/getter/setter2_test.dart
@@ -38,6 +38,7 @@
A get field {
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES
+ // [cfe] The type 'A' of the getter 'T2.field' is not assignable to the type 'C' of the setter 'T2.field'.
return getterField;
}
diff --git a/tests/standalone/out_of_memory_unhandled_exception_test.dart b/tests/standalone/out_of_memory_unhandled_exception_test.dart
new file mode 100644
index 0000000..7a5935d
--- /dev/null
+++ b/tests/standalone/out_of_memory_unhandled_exception_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:io";
+
+import "package:expect/expect.dart";
+
+main(args) async {
+ if (args.contains("--child")) {
+ var leak = [];
+ while (true) {
+ leak = [leak];
+ }
+ } else {
+ var exec = Platform.resolvedExecutable;
+ var args = <String>[];
+ args.addAll(Platform.executableArguments);
+ args.add("--old_gen_heap_size=20");
+ args.add(Platform.script.toFilePath());
+ args.add("--child");
+
+ // Should report an unhandled out of memory exception without crashing.
+ print("+ $exec " + args.join(" "));
+ var result = await Process.run(exec, args);
+
+ print("exit: ${result.exitCode}");
+ print("stdout:");
+ print(result.stdout);
+ print("stderr:");
+ print(result.stderr);
+
+ Expect.equals(255, result.exitCode, "Unhandled exception, not crash");
+ Expect.isTrue(result.stderr.contains("Out of Memory"));
+ }
+}
diff --git a/tests/standalone/standalone_kernel.status b/tests/standalone/standalone_kernel.status
index 199fb5a..02cfb78 100644
--- a/tests/standalone/standalone_kernel.status
+++ b/tests/standalone/standalone_kernel.status
@@ -4,9 +4,9 @@
# Sections in this file should contain "$compiler == dartk" or
# "$compiler == dartkp".
-fragmentation_test: Pass, Slow # GC heavy
fragmentation_typed_data_test: Pass, Slow # GC heavy
io/process_sync_test: Pass, Slow # Spawns synchronously subprocesses in sequence.
+out_of_memory_unhandled_exception_test: Pass, Slow
[ $compiler == dartkb ]
no_lazy_dispatchers_test: SkipByDesign # KBC interpreter doesn't support --no_lazy_dispatchers
diff --git a/tests/standalone_2/out_of_memory_unhandled_exception_test.dart b/tests/standalone_2/out_of_memory_unhandled_exception_test.dart
new file mode 100644
index 0000000..7a5935d
--- /dev/null
+++ b/tests/standalone_2/out_of_memory_unhandled_exception_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:io";
+
+import "package:expect/expect.dart";
+
+main(args) async {
+ if (args.contains("--child")) {
+ var leak = [];
+ while (true) {
+ leak = [leak];
+ }
+ } else {
+ var exec = Platform.resolvedExecutable;
+ var args = <String>[];
+ args.addAll(Platform.executableArguments);
+ args.add("--old_gen_heap_size=20");
+ args.add(Platform.script.toFilePath());
+ args.add("--child");
+
+ // Should report an unhandled out of memory exception without crashing.
+ print("+ $exec " + args.join(" "));
+ var result = await Process.run(exec, args);
+
+ print("exit: ${result.exitCode}");
+ print("stdout:");
+ print(result.stdout);
+ print("stderr:");
+ print(result.stderr);
+
+ Expect.equals(255, result.exitCode, "Unhandled exception, not crash");
+ Expect.isTrue(result.stderr.contains("Out of Memory"));
+ }
+}
diff --git a/tests/standalone_2/standalone_2_kernel.status b/tests/standalone_2/standalone_2_kernel.status
index 199fb5a..af8e3ec 100644
--- a/tests/standalone_2/standalone_2_kernel.status
+++ b/tests/standalone_2/standalone_2_kernel.status
@@ -7,6 +7,7 @@
fragmentation_test: Pass, Slow # GC heavy
fragmentation_typed_data_test: Pass, Slow # GC heavy
io/process_sync_test: Pass, Slow # Spawns synchronously subprocesses in sequence.
+out_of_memory_unhandled_exception_test: Pass, Slow
[ $compiler == dartkb ]
no_lazy_dispatchers_test: SkipByDesign # KBC interpreter doesn't support --no_lazy_dispatchers
diff --git a/tools/VERSION b/tools/VERSION
index 81db08d..7693e3e 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 11
PATCH 0
-PRERELEASE 187
+PRERELEASE 188
PRERELEASE_PATCH 0
\ No newline at end of file