Skip to content

Commit bb9252a

Browse files
johnniwintherCommit Queue
authored andcommitted
[cfe] Report conflicts through _Declaration
The reports the declaration conflicts through the _Declaration objects, which streamlines the code and helps providing more targeted messages. Change-Id: I013c9974de87c5a1c541ba6aa5d78a1ba63e1074 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437241 Reviewed-by: Chloe Stefantsova <[email protected]>
1 parent e656fec commit bb9252a

File tree

49 files changed

+938
-603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+938
-603
lines changed

pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,62 +1586,6 @@ Message _withArgumentsConflictsWithImplicitSetterCause(String name) {
15861586
);
15871587
}
15881588

1589-
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1590-
const Template<Message Function(String name)> templateConflictsWithSetter =
1591-
const Template<Message Function(String name)>(
1592-
"ConflictsWithSetter",
1593-
problemMessageTemplate: r"""Conflicts with setter '#name'.""",
1594-
withArguments: _withArgumentsConflictsWithSetter,
1595-
);
1596-
1597-
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1598-
const Code<Message Function(String name)> codeConflictsWithSetter =
1599-
const Code<Message Function(String name)>(
1600-
"ConflictsWithSetter",
1601-
analyzerCodes: <String>["CONFLICTS_WITH_MEMBER"],
1602-
);
1603-
1604-
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1605-
Message _withArgumentsConflictsWithSetter(String name) {
1606-
if (name.isEmpty) throw 'No name provided';
1607-
name = demangleMixinApplicationName(name);
1608-
return new Message(
1609-
codeConflictsWithSetter,
1610-
problemMessage: """Conflicts with setter '${name}'.""",
1611-
arguments: {
1612-
'name': name,
1613-
},
1614-
);
1615-
}
1616-
1617-
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1618-
const Template<Message Function(String name)> templateConflictsWithSetterCause =
1619-
const Template<Message Function(String name)>(
1620-
"ConflictsWithSetterCause",
1621-
problemMessageTemplate: r"""Conflicting setter '#name'.""",
1622-
withArguments: _withArgumentsConflictsWithSetterCause,
1623-
);
1624-
1625-
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1626-
const Code<Message Function(String name)> codeConflictsWithSetterCause =
1627-
const Code<Message Function(String name)>(
1628-
"ConflictsWithSetterCause",
1629-
severity: Severity.context,
1630-
);
1631-
1632-
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1633-
Message _withArgumentsConflictsWithSetterCause(String name) {
1634-
if (name.isEmpty) throw 'No name provided';
1635-
name = demangleMixinApplicationName(name);
1636-
return new Message(
1637-
codeConflictsWithSetterCause,
1638-
problemMessage: """Conflicting setter '${name}'.""",
1639-
arguments: {
1640-
'name': name,
1641-
},
1642-
);
1643-
}
1644-
16451589
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
16461590
const Template<Message Function(String name)>
16471591
templateConflictsWithTypeParameter =

pkg/front_end/lib/src/fragment/enum_element.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ class EnumElementDeclaration
104104
TypeBuilder get type => _fragment.type;
105105

106106
@override
107+
// Coverage-ignore(suite): Not run.
107108
UriOffsetLength get uriOffset => _fragment.uriOffset;
108109

109110
@override

pkg/front_end/lib/src/fragment/primary_constructor_field.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class PrimaryConstructorFieldDeclaration
9898
TypeBuilder get type => _fragment.type;
9999

100100
@override
101+
// Coverage-ignore(suite): Not run.
101102
UriOffsetLength get uriOffset => _fragment.uriOffset;
102103

103104
// Coverage-ignore(suite): Not run.

pkg/front_end/lib/src/source/source_class_builder.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,8 +1573,7 @@ class SourceClassBuilder extends ClassBuilderImpl
15731573
}
15741574
DartType computedBound = substitution.substituteType(interfaceBound);
15751575
if (!types
1576-
.performMutualSubtypesCheck(
1577-
declaredBound, computedBound)
1576+
.performMutualSubtypesCheck(declaredBound, computedBound)
15781577
.isSuccess()) {
15791578
reportInvalidOverride(
15801579
isInterfaceCheck,

0 commit comments

Comments
 (0)