Version 2.18.0-175.0.dev
Merge commit 'cc9b825974fef97a197fe70d5964bf0713f7bc83' into 'dev'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ac2b73a..aeb26fc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -56,6 +56,10 @@
#### `dart:io`
+- **Breaking Change** [#49045](https://github.com/dart-lang/sdk/issues/49045):
+ The `uri` property of `RedirectException` in `dart:io` has been changed to
+ be nullable. Programs must be updated to handle the `null` case.
+
- **Breaking Change** [#34218](https://github.com/dart-lang/sdk/issues/34218):
Constants in `dart:io`'s networking APIs following the `SCREAMING_CAPS`
convention have been removed (they were previously deprecated). Please use
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 345e79e..a54317b 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -4634,36 +4634,6 @@
r"""Only packing to 1, 2, 4, 8, and 16 bytes is supported.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<
- Message Function(
- String name,
- String
- name2)> templateFfiPackedNestingNonPacked = const Template<
- Message Function(String name, String name2)>(
- problemMessageTemplate:
- r"""Nesting the non-packed or less tightly packed struct '#name' in a packed struct '#name2' is not supported.""",
- withArguments: _withArgumentsFfiPackedNestingNonPacked);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, String name2)>
- codeFfiPackedNestingNonPacked =
- const Code<Message Function(String name, String name2)>(
- "FfiPackedNestingNonPacked",
-);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsFfiPackedNestingNonPacked(String name, String name2) {
- if (name.isEmpty) throw 'No name provided';
- name = demangleMixinApplicationName(name);
- if (name2.isEmpty) throw 'No name provided';
- name2 = demangleMixinApplicationName(name2);
- return new Message(codeFfiPackedNestingNonPacked,
- problemMessage:
- """Nesting the non-packed or less tightly packed struct '${name}' in a packed struct '${name2}' is not supported.""",
- arguments: {'name': name, 'name2': name2});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name)> templateFfiSizeAnnotation =
const Template<Message Function(String name)>(
problemMessageTemplate:
diff --git a/pkg/analysis_server/analysis_options.yaml b/pkg/analysis_server/analysis_options.yaml
index 4cc8715..54612a2 100644
--- a/pkg/analysis_server/analysis_options.yaml
+++ b/pkg/analysis_server/analysis_options.yaml
@@ -15,7 +15,6 @@
camel_case_types: ignore
constant_identifier_names: ignore
file_names: ignore
- hash_and_equals: ignore
implementation_imports: ignore
non_constant_identifier_names: ignore
overridden_fields: ignore
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
index de4aa97..444d52a 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
@@ -71,11 +71,9 @@
@override
bool operator ==(Object other) {
- if (other is AnalyzerStatusParams &&
- other.runtimeType == AnalyzerStatusParams) {
- return isAnalyzing == other.isAnalyzing && true;
- }
- return false;
+ return other is AnalyzerStatusParams &&
+ other.runtimeType == AnalyzerStatusParams &&
+ isAnalyzing == other.isAnalyzing;
}
@override
@@ -164,10 +162,10 @@
@override
bool operator ==(Object other) {
- if (other is ClosingLabel && other.runtimeType == ClosingLabel) {
- return label == other.label && range == other.range && true;
- }
- return false;
+ return other is ClosingLabel &&
+ other.runtimeType == ClosingLabel &&
+ label == other.label &&
+ range == other.range;
}
@override
@@ -212,11 +210,8 @@
@override
bool operator ==(Object other) {
- if (other is CompletionItemResolutionInfo &&
- other.runtimeType == CompletionItemResolutionInfo) {
- return true;
- }
- return false;
+ return other is CompletionItemResolutionInfo &&
+ other.runtimeType == CompletionItemResolutionInfo;
}
@override
@@ -281,11 +276,9 @@
@override
bool operator ==(Object other) {
- if (other is DartDiagnosticServer &&
- other.runtimeType == DartDiagnosticServer) {
- return port == other.port && true;
- }
- return false;
+ return other is DartDiagnosticServer &&
+ other.runtimeType == DartDiagnosticServer &&
+ port == other.port;
}
@override
@@ -497,18 +490,15 @@
@override
bool operator ==(Object other) {
- if (other is DartSuggestionSetCompletionItemResolutionInfo &&
- other.runtimeType == DartSuggestionSetCompletionItemResolutionInfo) {
- return displayUri == other.displayUri &&
- file == other.file &&
- iLength == other.iLength &&
- libId == other.libId &&
- offset == other.offset &&
- rLength == other.rLength &&
- rOffset == other.rOffset &&
- true;
- }
- return false;
+ return other is DartSuggestionSetCompletionItemResolutionInfo &&
+ other.runtimeType == DartSuggestionSetCompletionItemResolutionInfo &&
+ displayUri == other.displayUri &&
+ file == other.file &&
+ iLength == other.iLength &&
+ libId == other.libId &&
+ offset == other.offset &&
+ rLength == other.rLength &&
+ rOffset == other.rOffset;
}
@override
@@ -679,16 +669,14 @@
@override
bool operator ==(Object other) {
- if (other is Element && other.runtimeType == Element) {
- return kind == other.kind &&
- name == other.name &&
- parameters == other.parameters &&
- range == other.range &&
- returnType == other.returnType &&
- typeParameters == other.typeParameters &&
- true;
- }
- return false;
+ return other is Element &&
+ other.runtimeType == Element &&
+ kind == other.kind &&
+ name == other.name &&
+ parameters == other.parameters &&
+ range == other.range &&
+ returnType == other.returnType &&
+ typeParameters == other.typeParameters;
}
@override
@@ -929,24 +917,19 @@
@override
bool operator ==(Object other) {
- if (other is FlutterOutline && other.runtimeType == FlutterOutline) {
- return listEqual(
- attributes,
- other.attributes,
- (FlutterOutlineAttribute a, FlutterOutlineAttribute b) =>
- a == b) &&
- listEqual(children, other.children,
- (FlutterOutline a, FlutterOutline b) => a == b) &&
- className == other.className &&
- codeRange == other.codeRange &&
- dartElement == other.dartElement &&
- kind == other.kind &&
- label == other.label &&
- range == other.range &&
- variableName == other.variableName &&
- true;
- }
- return false;
+ return other is FlutterOutline &&
+ other.runtimeType == FlutterOutline &&
+ listEqual(attributes, other.attributes,
+ (FlutterOutlineAttribute a, FlutterOutlineAttribute b) => a == b) &&
+ listEqual(children, other.children,
+ (FlutterOutline a, FlutterOutline b) => a == b) &&
+ className == other.className &&
+ codeRange == other.codeRange &&
+ dartElement == other.dartElement &&
+ kind == other.kind &&
+ label == other.label &&
+ range == other.range &&
+ variableName == other.variableName;
}
@override
@@ -1065,14 +1048,11 @@
@override
bool operator ==(Object other) {
- if (other is FlutterOutlineAttribute &&
- other.runtimeType == FlutterOutlineAttribute) {
- return label == other.label &&
- name == other.name &&
- valueRange == other.valueRange &&
- true;
- }
- return false;
+ return other is FlutterOutlineAttribute &&
+ other.runtimeType == FlutterOutlineAttribute &&
+ label == other.label &&
+ name == other.name &&
+ valueRange == other.valueRange;
}
@override
@@ -1199,14 +1179,12 @@
@override
bool operator ==(Object other) {
- if (other is IncomingMessage && other.runtimeType == IncomingMessage) {
- return clientRequestTime == other.clientRequestTime &&
- jsonrpc == other.jsonrpc &&
- method == other.method &&
- params == other.params &&
- true;
- }
- return false;
+ return other is IncomingMessage &&
+ other.runtimeType == IncomingMessage &&
+ clientRequestTime == other.clientRequestTime &&
+ jsonrpc == other.jsonrpc &&
+ method == other.method &&
+ params == other.params;
}
@override
@@ -1300,12 +1278,10 @@
@override
bool operator ==(Object other) {
- if (other is Message && other.runtimeType == Message) {
- return clientRequestTime == other.clientRequestTime &&
- jsonrpc == other.jsonrpc &&
- true;
- }
- return false;
+ return other is Message &&
+ other.runtimeType == Message &&
+ clientRequestTime == other.clientRequestTime &&
+ jsonrpc == other.jsonrpc;
}
@override
@@ -1427,15 +1403,12 @@
@override
bool operator ==(Object other) {
- if (other is NotificationMessage &&
- other.runtimeType == NotificationMessage) {
- return clientRequestTime == other.clientRequestTime &&
- jsonrpc == other.jsonrpc &&
- method == other.method &&
- params == other.params &&
- true;
- }
- return false;
+ return other is NotificationMessage &&
+ other.runtimeType == NotificationMessage &&
+ clientRequestTime == other.clientRequestTime &&
+ jsonrpc == other.jsonrpc &&
+ method == other.method &&
+ params == other.params;
}
@override
@@ -1575,15 +1548,12 @@
@override
bool operator ==(Object other) {
- if (other is Outline && other.runtimeType == Outline) {
- return listEqual(
- children, other.children, (Outline a, Outline b) => a == b) &&
- codeRange == other.codeRange &&
- element == other.element &&
- range == other.range &&
- true;
- }
- return false;
+ return other is Outline &&
+ other.runtimeType == Outline &&
+ listEqual(children, other.children, (Outline a, Outline b) => a == b) &&
+ codeRange == other.codeRange &&
+ element == other.element &&
+ range == other.range;
}
@override
@@ -1656,11 +1626,9 @@
@override
bool operator ==(Object other) {
- if (other is PubPackageCompletionItemResolutionInfo &&
- other.runtimeType == PubPackageCompletionItemResolutionInfo) {
- return packageName == other.packageName && true;
- }
- return false;
+ return other is PubPackageCompletionItemResolutionInfo &&
+ other.runtimeType == PubPackageCompletionItemResolutionInfo &&
+ packageName == other.packageName;
}
@override
@@ -1752,14 +1720,11 @@
@override
bool operator ==(Object other) {
- if (other is PublishClosingLabelsParams &&
- other.runtimeType == PublishClosingLabelsParams) {
- return listEqual(labels, other.labels,
- (ClosingLabel a, ClosingLabel b) => a == b) &&
- uri == other.uri &&
- true;
- }
- return false;
+ return other is PublishClosingLabelsParams &&
+ other.runtimeType == PublishClosingLabelsParams &&
+ listEqual(
+ labels, other.labels, (ClosingLabel a, ClosingLabel b) => a == b) &&
+ uri == other.uri;
}
@override
@@ -1852,11 +1817,10 @@
@override
bool operator ==(Object other) {
- if (other is PublishFlutterOutlineParams &&
- other.runtimeType == PublishFlutterOutlineParams) {
- return outline == other.outline && uri == other.uri && true;
- }
- return false;
+ return other is PublishFlutterOutlineParams &&
+ other.runtimeType == PublishFlutterOutlineParams &&
+ outline == other.outline &&
+ uri == other.uri;
}
@override
@@ -1948,11 +1912,10 @@
@override
bool operator ==(Object other) {
- if (other is PublishOutlineParams &&
- other.runtimeType == PublishOutlineParams) {
- return outline == other.outline && uri == other.uri && true;
- }
- return false;
+ return other is PublishOutlineParams &&
+ other.runtimeType == PublishOutlineParams &&
+ outline == other.outline &&
+ uri == other.uri;
}
@override
@@ -2102,15 +2065,13 @@
@override
bool operator ==(Object other) {
- if (other is RequestMessage && other.runtimeType == RequestMessage) {
- return clientRequestTime == other.clientRequestTime &&
- id == other.id &&
- jsonrpc == other.jsonrpc &&
- method == other.method &&
- params == other.params &&
- true;
- }
- return false;
+ return other is RequestMessage &&
+ other.runtimeType == RequestMessage &&
+ clientRequestTime == other.clientRequestTime &&
+ id == other.id &&
+ jsonrpc == other.jsonrpc &&
+ method == other.method &&
+ params == other.params;
}
@override
@@ -2226,13 +2187,11 @@
@override
bool operator ==(Object other) {
- if (other is ResponseError && other.runtimeType == ResponseError) {
- return code == other.code &&
- data == other.data &&
- message == other.message &&
- true;
- }
- return false;
+ return other is ResponseError &&
+ other.runtimeType == ResponseError &&
+ code == other.code &&
+ data == other.data &&
+ message == other.message;
}
@override
@@ -2376,15 +2335,13 @@
@override
bool operator ==(Object other) {
- if (other is ResponseMessage && other.runtimeType == ResponseMessage) {
- return clientRequestTime == other.clientRequestTime &&
- error == other.error &&
- id == other.id &&
- jsonrpc == other.jsonrpc &&
- result == other.result &&
- true;
- }
- return false;
+ return other is ResponseMessage &&
+ other.runtimeType == ResponseMessage &&
+ clientRequestTime == other.clientRequestTime &&
+ error == other.error &&
+ id == other.id &&
+ jsonrpc == other.jsonrpc &&
+ result == other.result;
}
@override
@@ -2511,13 +2468,11 @@
@override
bool operator ==(Object other) {
- if (other is SnippetTextEdit && other.runtimeType == SnippetTextEdit) {
- return insertTextFormat == other.insertTextFormat &&
- newText == other.newText &&
- range == other.range &&
- true;
- }
- return false;
+ return other is SnippetTextEdit &&
+ other.runtimeType == SnippetTextEdit &&
+ insertTextFormat == other.insertTextFormat &&
+ newText == other.newText &&
+ range == other.range;
}
@override
@@ -2604,11 +2559,10 @@
@override
bool operator ==(Object other) {
- if (other is ValidateRefactorResult &&
- other.runtimeType == ValidateRefactorResult) {
- return message == other.message && valid == other.valid && true;
- }
- return false;
+ return other is ValidateRefactorResult &&
+ other.runtimeType == ValidateRefactorResult &&
+ message == other.message &&
+ valid == other.valid;
}
@override
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
index fdedb8f..1879b75 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
@@ -130,13 +130,11 @@
@override
bool operator ==(Object other) {
- if (other is AnnotatedTextEdit && other.runtimeType == AnnotatedTextEdit) {
- return annotationId == other.annotationId &&
- newText == other.newText &&
- range == other.range &&
- true;
- }
- return false;
+ return other is AnnotatedTextEdit &&
+ other.runtimeType == AnnotatedTextEdit &&
+ annotationId == other.annotationId &&
+ newText == other.newText &&
+ range == other.range;
}
@override
@@ -228,11 +226,10 @@
@override
bool operator ==(Object other) {
- if (other is ApplyWorkspaceEditParams &&
- other.runtimeType == ApplyWorkspaceEditParams) {
- return edit == other.edit && label == other.label && true;
- }
- return false;
+ return other is ApplyWorkspaceEditParams &&
+ other.runtimeType == ApplyWorkspaceEditParams &&
+ edit == other.edit &&
+ label == other.label;
}
@override
@@ -349,14 +346,11 @@
@override
bool operator ==(Object other) {
- if (other is ApplyWorkspaceEditResult &&
- other.runtimeType == ApplyWorkspaceEditResult) {
- return applied == other.applied &&
- failedChange == other.failedChange &&
- failureReason == other.failureReason &&
- true;
- }
- return false;
+ return other is ApplyWorkspaceEditResult &&
+ other.runtimeType == ApplyWorkspaceEditResult &&
+ applied == other.applied &&
+ failedChange == other.failedChange &&
+ failureReason == other.failureReason;
}
@override
@@ -508,15 +502,12 @@
@override
bool operator ==(Object other) {
- if (other is BaseSymbolInformation &&
- other.runtimeType == BaseSymbolInformation) {
- return containerName == other.containerName &&
- kind == other.kind &&
- name == other.name &&
- listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b) &&
- true;
- }
- return false;
+ return other is BaseSymbolInformation &&
+ other.runtimeType == BaseSymbolInformation &&
+ containerName == other.containerName &&
+ kind == other.kind &&
+ name == other.name &&
+ listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b);
}
@override
@@ -585,11 +576,9 @@
@override
bool operator ==(Object other) {
- if (other is CallHierarchyClientCapabilities &&
- other.runtimeType == CallHierarchyClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is CallHierarchyClientCapabilities &&
+ other.runtimeType == CallHierarchyClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -688,14 +677,10 @@
@override
bool operator ==(Object other) {
- if (other is CallHierarchyIncomingCall &&
- other.runtimeType == CallHierarchyIncomingCall) {
- return from == other.from &&
- listEqual(
- fromRanges, other.fromRanges, (Range a, Range b) => a == b) &&
- true;
- }
- return false;
+ return other is CallHierarchyIncomingCall &&
+ other.runtimeType == CallHierarchyIncomingCall &&
+ from == other.from &&
+ listEqual(fromRanges, other.fromRanges, (Range a, Range b) => a == b);
}
@override
@@ -826,14 +811,11 @@
@override
bool operator ==(Object other) {
- if (other is CallHierarchyIncomingCallsParams &&
- other.runtimeType == CallHierarchyIncomingCallsParams) {
- return item == other.item &&
- partialResultToken == other.partialResultToken &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is CallHierarchyIncomingCallsParams &&
+ other.runtimeType == CallHierarchyIncomingCallsParams &&
+ item == other.item &&
+ partialResultToken == other.partialResultToken &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -1069,18 +1051,16 @@
@override
bool operator ==(Object other) {
- if (other is CallHierarchyItem && other.runtimeType == CallHierarchyItem) {
- return data == other.data &&
- detail == other.detail &&
- kind == other.kind &&
- name == other.name &&
- range == other.range &&
- selectionRange == other.selectionRange &&
- listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b) &&
- uri == other.uri &&
- true;
- }
- return false;
+ return other is CallHierarchyItem &&
+ other.runtimeType == CallHierarchyItem &&
+ data == other.data &&
+ detail == other.detail &&
+ kind == other.kind &&
+ name == other.name &&
+ range == other.range &&
+ selectionRange == other.selectionRange &&
+ listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b) &&
+ uri == other.uri;
}
@override
@@ -1155,11 +1135,9 @@
@override
bool operator ==(Object other) {
- if (other is CallHierarchyOptions &&
- other.runtimeType == CallHierarchyOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is CallHierarchyOptions &&
+ other.runtimeType == CallHierarchyOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -1260,14 +1238,10 @@
@override
bool operator ==(Object other) {
- if (other is CallHierarchyOutgoingCall &&
- other.runtimeType == CallHierarchyOutgoingCall) {
- return listEqual(
- fromRanges, other.fromRanges, (Range a, Range b) => a == b) &&
- to == other.to &&
- true;
- }
- return false;
+ return other is CallHierarchyOutgoingCall &&
+ other.runtimeType == CallHierarchyOutgoingCall &&
+ listEqual(fromRanges, other.fromRanges, (Range a, Range b) => a == b) &&
+ to == other.to;
}
@override
@@ -1398,14 +1372,11 @@
@override
bool operator ==(Object other) {
- if (other is CallHierarchyOutgoingCallsParams &&
- other.runtimeType == CallHierarchyOutgoingCallsParams) {
- return item == other.item &&
- partialResultToken == other.partialResultToken &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is CallHierarchyOutgoingCallsParams &&
+ other.runtimeType == CallHierarchyOutgoingCallsParams &&
+ item == other.item &&
+ partialResultToken == other.partialResultToken &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -1537,14 +1508,11 @@
@override
bool operator ==(Object other) {
- if (other is CallHierarchyPrepareParams &&
- other.runtimeType == CallHierarchyPrepareParams) {
- return position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is CallHierarchyPrepareParams &&
+ other.runtimeType == CallHierarchyPrepareParams &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -1668,19 +1636,15 @@
@override
bool operator ==(Object other) {
- if (other is CallHierarchyRegistrationOptions &&
- other.runtimeType == CallHierarchyRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is CallHierarchyRegistrationOptions &&
+ other.runtimeType == CallHierarchyRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -1754,10 +1718,9 @@
@override
bool operator ==(Object other) {
- if (other is CancelParams && other.runtimeType == CancelParams) {
- return id == other.id && true;
- }
- return false;
+ return other is CancelParams &&
+ other.runtimeType == CancelParams &&
+ id == other.id;
}
@override
@@ -1869,13 +1832,11 @@
@override
bool operator ==(Object other) {
- if (other is ChangeAnnotation && other.runtimeType == ChangeAnnotation) {
- return description == other.description &&
- label == other.label &&
- needsConfirmation == other.needsConfirmation &&
- true;
- }
- return false;
+ return other is ChangeAnnotation &&
+ other.runtimeType == ChangeAnnotation &&
+ description == other.description &&
+ label == other.label &&
+ needsConfirmation == other.needsConfirmation;
}
@override
@@ -2056,17 +2017,14 @@
@override
bool operator ==(Object other) {
- if (other is ClientCapabilities &&
- other.runtimeType == ClientCapabilities) {
- return experimental == other.experimental &&
- general == other.general &&
- notebookDocument == other.notebookDocument &&
- textDocument == other.textDocument &&
- window == other.window &&
- workspace == other.workspace &&
- true;
- }
- return false;
+ return other is ClientCapabilities &&
+ other.runtimeType == ClientCapabilities &&
+ experimental == other.experimental &&
+ general == other.general &&
+ notebookDocument == other.notebookDocument &&
+ textDocument == other.textDocument &&
+ window == other.window &&
+ workspace == other.workspace;
}
@override
@@ -2320,19 +2278,17 @@
@override
bool operator ==(Object other) {
- if (other is CodeAction && other.runtimeType == CodeAction) {
- return command == other.command &&
- data == other.data &&
- listEqual(diagnostics, other.diagnostics,
- (Diagnostic a, Diagnostic b) => a == b) &&
- disabled == other.disabled &&
- edit == other.edit &&
- isPreferred == other.isPreferred &&
- kind == other.kind &&
- title == other.title &&
- true;
- }
- return false;
+ return other is CodeAction &&
+ other.runtimeType == CodeAction &&
+ command == other.command &&
+ data == other.data &&
+ listEqual(diagnostics, other.diagnostics,
+ (Diagnostic a, Diagnostic b) => a == b) &&
+ disabled == other.disabled &&
+ edit == other.edit &&
+ isPreferred == other.isPreferred &&
+ kind == other.kind &&
+ title == other.title;
}
@override
@@ -2555,18 +2511,15 @@
@override
bool operator ==(Object other) {
- if (other is CodeActionClientCapabilities &&
- other.runtimeType == CodeActionClientCapabilities) {
- return codeActionLiteralSupport == other.codeActionLiteralSupport &&
- dataSupport == other.dataSupport &&
- disabledSupport == other.disabledSupport &&
- dynamicRegistration == other.dynamicRegistration &&
- honorsChangeAnnotations == other.honorsChangeAnnotations &&
- isPreferredSupport == other.isPreferredSupport &&
- resolveSupport == other.resolveSupport &&
- true;
- }
- return false;
+ return other is CodeActionClientCapabilities &&
+ other.runtimeType == CodeActionClientCapabilities &&
+ codeActionLiteralSupport == other.codeActionLiteralSupport &&
+ dataSupport == other.dataSupport &&
+ disabledSupport == other.disabledSupport &&
+ dynamicRegistration == other.dynamicRegistration &&
+ honorsChangeAnnotations == other.honorsChangeAnnotations &&
+ isPreferredSupport == other.isPreferredSupport &&
+ resolveSupport == other.resolveSupport;
}
@override
@@ -2646,12 +2599,10 @@
@override
bool operator ==(Object other) {
- if (other is CodeActionClientCapabilitiesCodeActionLiteralSupport &&
+ return other is CodeActionClientCapabilitiesCodeActionLiteralSupport &&
other.runtimeType ==
- CodeActionClientCapabilitiesCodeActionLiteralSupport) {
- return codeActionKind == other.codeActionKind && true;
- }
- return false;
+ CodeActionClientCapabilitiesCodeActionLiteralSupport &&
+ codeActionKind == other.codeActionKind;
}
@override
@@ -2722,13 +2673,9 @@
@override
bool operator ==(Object other) {
- if (other is CodeActionClientCapabilitiesResolveSupport &&
- other.runtimeType == CodeActionClientCapabilitiesResolveSupport) {
- return listEqual(
- properties, other.properties, (String a, String b) => a == b) &&
- true;
- }
- return false;
+ return other is CodeActionClientCapabilitiesResolveSupport &&
+ other.runtimeType == CodeActionClientCapabilitiesResolveSupport &&
+ listEqual(properties, other.properties, (String a, String b) => a == b);
}
@override
@@ -2856,15 +2803,13 @@
@override
bool operator ==(Object other) {
- if (other is CodeActionContext && other.runtimeType == CodeActionContext) {
- return listEqual(diagnostics, other.diagnostics,
- (Diagnostic a, Diagnostic b) => a == b) &&
- listEqual(only, other.only,
- (CodeActionKind a, CodeActionKind b) => a == b) &&
- triggerKind == other.triggerKind &&
- true;
- }
- return false;
+ return other is CodeActionContext &&
+ other.runtimeType == CodeActionContext &&
+ listEqual(diagnostics, other.diagnostics,
+ (Diagnostic a, Diagnostic b) => a == b) &&
+ listEqual(
+ only, other.only, (CodeActionKind a, CodeActionKind b) => a == b) &&
+ triggerKind == other.triggerKind;
}
@override
@@ -2936,11 +2881,9 @@
@override
bool operator ==(Object other) {
- if (other is CodeActionDisabled &&
- other.runtimeType == CodeActionDisabled) {
- return reason == other.reason && true;
- }
- return false;
+ return other is CodeActionDisabled &&
+ other.runtimeType == CodeActionDisabled &&
+ reason == other.reason;
}
@override
@@ -3097,13 +3040,10 @@
@override
bool operator ==(Object other) {
- if (other is CodeActionLiteralSupportCodeActionKind &&
- other.runtimeType == CodeActionLiteralSupportCodeActionKind) {
- return listEqual(valueSet, other.valueSet,
- (CodeActionKind a, CodeActionKind b) => a == b) &&
- true;
- }
- return false;
+ return other is CodeActionLiteralSupportCodeActionKind &&
+ other.runtimeType == CodeActionLiteralSupportCodeActionKind &&
+ listEqual(valueSet, other.valueSet,
+ (CodeActionKind a, CodeActionKind b) => a == b);
}
@override
@@ -3218,14 +3158,12 @@
@override
bool operator ==(Object other) {
- if (other is CodeActionOptions && other.runtimeType == CodeActionOptions) {
- return listEqual(codeActionKinds, other.codeActionKinds,
- (CodeActionKind a, CodeActionKind b) => a == b) &&
- resolveProvider == other.resolveProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is CodeActionOptions &&
+ other.runtimeType == CodeActionOptions &&
+ listEqual(codeActionKinds, other.codeActionKinds,
+ (CodeActionKind a, CodeActionKind b) => a == b) &&
+ resolveProvider == other.resolveProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -3410,15 +3348,13 @@
@override
bool operator ==(Object other) {
- if (other is CodeActionParams && other.runtimeType == CodeActionParams) {
- return context == other.context &&
- partialResultToken == other.partialResultToken &&
- range == other.range &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is CodeActionParams &&
+ other.runtimeType == CodeActionParams &&
+ context == other.context &&
+ partialResultToken == other.partialResultToken &&
+ range == other.range &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -3570,21 +3506,17 @@
@override
bool operator ==(Object other) {
- if (other is CodeActionRegistrationOptions &&
- other.runtimeType == CodeActionRegistrationOptions) {
- return listEqual(codeActionKinds, other.codeActionKinds,
- (CodeActionKind a, CodeActionKind b) => a == b) &&
- listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- resolveProvider == other.resolveProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is CodeActionRegistrationOptions &&
+ other.runtimeType == CodeActionRegistrationOptions &&
+ listEqual(codeActionKinds, other.codeActionKinds,
+ (CodeActionKind a, CodeActionKind b) => a == b) &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ resolveProvider == other.resolveProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -3694,10 +3626,9 @@
@override
bool operator ==(Object other) {
- if (other is CodeDescription && other.runtimeType == CodeDescription) {
- return href == other.href && true;
- }
- return false;
+ return other is CodeDescription &&
+ other.runtimeType == CodeDescription &&
+ href == other.href;
}
@override
@@ -3803,13 +3734,11 @@
@override
bool operator ==(Object other) {
- if (other is CodeLens && other.runtimeType == CodeLens) {
- return command == other.command &&
- data == other.data &&
- range == other.range &&
- true;
- }
- return false;
+ return other is CodeLens &&
+ other.runtimeType == CodeLens &&
+ command == other.command &&
+ data == other.data &&
+ range == other.range;
}
@override
@@ -3874,11 +3803,9 @@
@override
bool operator ==(Object other) {
- if (other is CodeLensClientCapabilities &&
- other.runtimeType == CodeLensClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is CodeLensClientCapabilities &&
+ other.runtimeType == CodeLensClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -3961,12 +3888,10 @@
@override
bool operator ==(Object other) {
- if (other is CodeLensOptions && other.runtimeType == CodeLensOptions) {
- return resolveProvider == other.resolveProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is CodeLensOptions &&
+ other.runtimeType == CodeLensOptions &&
+ resolveProvider == other.resolveProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -4097,13 +4022,11 @@
@override
bool operator ==(Object other) {
- if (other is CodeLensParams && other.runtimeType == CodeLensParams) {
- return partialResultToken == other.partialResultToken &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is CodeLensParams &&
+ other.runtimeType == CodeLensParams &&
+ partialResultToken == other.partialResultToken &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -4220,19 +4143,15 @@
@override
bool operator ==(Object other) {
- if (other is CodeLensRegistrationOptions &&
- other.runtimeType == CodeLensRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- resolveProvider == other.resolveProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is CodeLensRegistrationOptions &&
+ other.runtimeType == CodeLensRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ resolveProvider == other.resolveProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -4305,11 +4224,9 @@
@override
bool operator ==(Object other) {
- if (other is CodeLensWorkspaceClientCapabilities &&
- other.runtimeType == CodeLensWorkspaceClientCapabilities) {
- return refreshSupport == other.refreshSupport && true;
- }
- return false;
+ return other is CodeLensWorkspaceClientCapabilities &&
+ other.runtimeType == CodeLensWorkspaceClientCapabilities &&
+ refreshSupport == other.refreshSupport;
}
@override
@@ -4454,14 +4371,12 @@
@override
bool operator ==(Object other) {
- if (other is Color && other.runtimeType == Color) {
- return alpha == other.alpha &&
- blue == other.blue &&
- green == other.green &&
- red == other.red &&
- true;
- }
- return false;
+ return other is Color &&
+ other.runtimeType == Color &&
+ alpha == other.alpha &&
+ blue == other.blue &&
+ green == other.green &&
+ red == other.red;
}
@override
@@ -4559,10 +4474,10 @@
@override
bool operator ==(Object other) {
- if (other is ColorInformation && other.runtimeType == ColorInformation) {
- return color == other.color && range == other.range && true;
- }
- return false;
+ return other is ColorInformation &&
+ other.runtimeType == ColorInformation &&
+ color == other.color &&
+ range == other.range;
}
@override
@@ -4684,14 +4599,12 @@
@override
bool operator ==(Object other) {
- if (other is ColorPresentation && other.runtimeType == ColorPresentation) {
- return listEqual(additionalTextEdits, other.additionalTextEdits,
- (TextEdit a, TextEdit b) => a == b) &&
- label == other.label &&
- textEdit == other.textEdit &&
- true;
- }
- return false;
+ return other is ColorPresentation &&
+ other.runtimeType == ColorPresentation &&
+ listEqual(additionalTextEdits, other.additionalTextEdits,
+ (TextEdit a, TextEdit b) => a == b) &&
+ label == other.label &&
+ textEdit == other.textEdit;
}
@override
@@ -4875,16 +4788,13 @@
@override
bool operator ==(Object other) {
- if (other is ColorPresentationParams &&
- other.runtimeType == ColorPresentationParams) {
- return color == other.color &&
- partialResultToken == other.partialResultToken &&
- range == other.range &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is ColorPresentationParams &&
+ other.runtimeType == ColorPresentationParams &&
+ color == other.color &&
+ partialResultToken == other.partialResultToken &&
+ range == other.range &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -5008,14 +4918,12 @@
@override
bool operator ==(Object other) {
- if (other is Command && other.runtimeType == Command) {
- return listEqual(
- arguments, other.arguments, (Object? a, Object? b) => a == b) &&
- command == other.command &&
- title == other.title &&
- true;
- }
- return false;
+ return other is Command &&
+ other.runtimeType == Command &&
+ listEqual(
+ arguments, other.arguments, (Object? a, Object? b) => a == b) &&
+ command == other.command &&
+ title == other.title;
}
@override
@@ -5206,17 +5114,14 @@
@override
bool operator ==(Object other) {
- if (other is CompletionClientCapabilities &&
- other.runtimeType == CompletionClientCapabilities) {
- return completionItem == other.completionItem &&
- completionItemKind == other.completionItemKind &&
- completionList == other.completionList &&
- contextSupport == other.contextSupport &&
- dynamicRegistration == other.dynamicRegistration &&
- insertTextMode == other.insertTextMode &&
- true;
- }
- return false;
+ return other is CompletionClientCapabilities &&
+ other.runtimeType == CompletionClientCapabilities &&
+ completionItem == other.completionItem &&
+ completionItemKind == other.completionItemKind &&
+ completionList == other.completionList &&
+ contextSupport == other.contextSupport &&
+ dynamicRegistration == other.dynamicRegistration &&
+ insertTextMode == other.insertTextMode;
}
@override
@@ -5511,22 +5416,19 @@
@override
bool operator ==(Object other) {
- if (other is CompletionClientCapabilitiesCompletionItem &&
- other.runtimeType == CompletionClientCapabilitiesCompletionItem) {
- return commitCharactersSupport == other.commitCharactersSupport &&
- deprecatedSupport == other.deprecatedSupport &&
- listEqual(documentationFormat, other.documentationFormat,
- (MarkupKind a, MarkupKind b) => a == b) &&
- insertReplaceSupport == other.insertReplaceSupport &&
- insertTextModeSupport == other.insertTextModeSupport &&
- labelDetailsSupport == other.labelDetailsSupport &&
- preselectSupport == other.preselectSupport &&
- resolveSupport == other.resolveSupport &&
- snippetSupport == other.snippetSupport &&
- tagSupport == other.tagSupport &&
- true;
- }
- return false;
+ return other is CompletionClientCapabilitiesCompletionItem &&
+ other.runtimeType == CompletionClientCapabilitiesCompletionItem &&
+ commitCharactersSupport == other.commitCharactersSupport &&
+ deprecatedSupport == other.deprecatedSupport &&
+ listEqual(documentationFormat, other.documentationFormat,
+ (MarkupKind a, MarkupKind b) => a == b) &&
+ insertReplaceSupport == other.insertReplaceSupport &&
+ insertTextModeSupport == other.insertTextModeSupport &&
+ labelDetailsSupport == other.labelDetailsSupport &&
+ preselectSupport == other.preselectSupport &&
+ resolveSupport == other.resolveSupport &&
+ snippetSupport == other.snippetSupport &&
+ tagSupport == other.tagSupport;
}
@override
@@ -5610,13 +5512,10 @@
@override
bool operator ==(Object other) {
- if (other is CompletionClientCapabilitiesCompletionItemKind &&
- other.runtimeType == CompletionClientCapabilitiesCompletionItemKind) {
- return listEqual(valueSet, other.valueSet,
- (CompletionItemKind a, CompletionItemKind b) => a == b) &&
- true;
- }
- return false;
+ return other is CompletionClientCapabilitiesCompletionItemKind &&
+ other.runtimeType == CompletionClientCapabilitiesCompletionItemKind &&
+ listEqual(valueSet, other.valueSet,
+ (CompletionItemKind a, CompletionItemKind b) => a == b);
}
@override
@@ -5688,13 +5587,10 @@
@override
bool operator ==(Object other) {
- if (other is CompletionClientCapabilitiesCompletionList &&
- other.runtimeType == CompletionClientCapabilitiesCompletionList) {
- return listEqual(itemDefaults, other.itemDefaults,
- (String a, String b) => a == b) &&
- true;
- }
- return false;
+ return other is CompletionClientCapabilitiesCompletionList &&
+ other.runtimeType == CompletionClientCapabilitiesCompletionList &&
+ listEqual(
+ itemDefaults, other.itemDefaults, (String a, String b) => a == b);
}
@override
@@ -5783,12 +5679,10 @@
@override
bool operator ==(Object other) {
- if (other is CompletionContext && other.runtimeType == CompletionContext) {
- return triggerCharacter == other.triggerCharacter &&
- triggerKind == other.triggerKind &&
- true;
- }
- return false;
+ return other is CompletionContext &&
+ other.runtimeType == CompletionContext &&
+ triggerCharacter == other.triggerCharacter &&
+ triggerKind == other.triggerKind;
}
@override
@@ -6347,32 +6241,30 @@
@override
bool operator ==(Object other) {
- if (other is CompletionItem && other.runtimeType == CompletionItem) {
- return listEqual(additionalTextEdits, other.additionalTextEdits,
- (TextEdit a, TextEdit b) => a == b) &&
- command == other.command &&
- listEqual(commitCharacters, other.commitCharacters,
- (String a, String b) => a == b) &&
- data == other.data &&
- deprecated == other.deprecated &&
- detail == other.detail &&
- documentation == other.documentation &&
- filterText == other.filterText &&
- insertText == other.insertText &&
- insertTextFormat == other.insertTextFormat &&
- insertTextMode == other.insertTextMode &&
- kind == other.kind &&
- label == other.label &&
- labelDetails == other.labelDetails &&
- preselect == other.preselect &&
- sortText == other.sortText &&
- listEqual(tags, other.tags,
- (CompletionItemTag a, CompletionItemTag b) => a == b) &&
- textEdit == other.textEdit &&
- textEditText == other.textEditText &&
- true;
- }
- return false;
+ return other is CompletionItem &&
+ other.runtimeType == CompletionItem &&
+ listEqual(additionalTextEdits, other.additionalTextEdits,
+ (TextEdit a, TextEdit b) => a == b) &&
+ command == other.command &&
+ listEqual(commitCharacters, other.commitCharacters,
+ (String a, String b) => a == b) &&
+ data == other.data &&
+ deprecated == other.deprecated &&
+ detail == other.detail &&
+ documentation == other.documentation &&
+ filterText == other.filterText &&
+ insertText == other.insertText &&
+ insertTextFormat == other.insertTextFormat &&
+ insertTextMode == other.insertTextMode &&
+ kind == other.kind &&
+ label == other.label &&
+ labelDetails == other.labelDetails &&
+ preselect == other.preselect &&
+ sortText == other.sortText &&
+ listEqual(tags, other.tags,
+ (CompletionItemTag a, CompletionItemTag b) => a == b) &&
+ textEdit == other.textEdit &&
+ textEditText == other.textEditText;
}
@override
@@ -6481,11 +6373,10 @@
@override
bool operator ==(Object other) {
- if (other is CompletionItemEditRange &&
- other.runtimeType == CompletionItemEditRange) {
- return insert == other.insert && replace == other.replace && true;
- }
- return false;
+ return other is CompletionItemEditRange &&
+ other.runtimeType == CompletionItemEditRange &&
+ insert == other.insert &&
+ replace == other.replace;
}
@override
@@ -6558,13 +6449,10 @@
@override
bool operator ==(Object other) {
- if (other is CompletionItemInsertTextModeSupport &&
- other.runtimeType == CompletionItemInsertTextModeSupport) {
- return listEqual(valueSet, other.valueSet,
- (InsertTextMode a, InsertTextMode b) => a == b) &&
- true;
- }
- return false;
+ return other is CompletionItemInsertTextModeSupport &&
+ other.runtimeType == CompletionItemInsertTextModeSupport &&
+ listEqual(valueSet, other.valueSet,
+ (InsertTextMode a, InsertTextMode b) => a == b);
}
@override
@@ -6703,11 +6591,10 @@
@override
bool operator ==(Object other) {
- if (other is CompletionItemLabelDetails &&
- other.runtimeType == CompletionItemLabelDetails) {
- return description == other.description && detail == other.detail && true;
- }
- return false;
+ return other is CompletionItemLabelDetails &&
+ other.runtimeType == CompletionItemLabelDetails &&
+ description == other.description &&
+ detail == other.detail;
}
@override
@@ -6779,13 +6666,9 @@
@override
bool operator ==(Object other) {
- if (other is CompletionItemResolveSupport &&
- other.runtimeType == CompletionItemResolveSupport) {
- return listEqual(
- properties, other.properties, (String a, String b) => a == b) &&
- true;
- }
- return false;
+ return other is CompletionItemResolveSupport &&
+ other.runtimeType == CompletionItemResolveSupport &&
+ listEqual(properties, other.properties, (String a, String b) => a == b);
}
@override
@@ -6886,13 +6769,10 @@
@override
bool operator ==(Object other) {
- if (other is CompletionItemTagSupport &&
- other.runtimeType == CompletionItemTagSupport) {
- return listEqual(valueSet, other.valueSet,
- (CompletionItemTag a, CompletionItemTag b) => a == b) &&
- true;
- }
- return false;
+ return other is CompletionItemTagSupport &&
+ other.runtimeType == CompletionItemTagSupport &&
+ listEqual(valueSet, other.valueSet,
+ (CompletionItemTag a, CompletionItemTag b) => a == b);
}
@override
@@ -7027,14 +6907,12 @@
@override
bool operator ==(Object other) {
- if (other is CompletionList && other.runtimeType == CompletionList) {
- return isIncomplete == other.isIncomplete &&
- itemDefaults == other.itemDefaults &&
- listEqual(items, other.items,
- (CompletionItem a, CompletionItem b) => a == b) &&
- true;
- }
- return false;
+ return other is CompletionList &&
+ other.runtimeType == CompletionList &&
+ isIncomplete == other.isIncomplete &&
+ itemDefaults == other.itemDefaults &&
+ listEqual(
+ items, other.items, (CompletionItem a, CompletionItem b) => a == b);
}
@override
@@ -7200,17 +7078,14 @@
@override
bool operator ==(Object other) {
- if (other is CompletionListItemDefaults &&
- other.runtimeType == CompletionListItemDefaults) {
- return listEqual(commitCharacters, other.commitCharacters,
- (String a, String b) => a == b) &&
- data == other.data &&
- editRange == other.editRange &&
- insertTextFormat == other.insertTextFormat &&
- insertTextMode == other.insertTextMode &&
- true;
- }
- return false;
+ return other is CompletionListItemDefaults &&
+ other.runtimeType == CompletionListItemDefaults &&
+ listEqual(commitCharacters, other.commitCharacters,
+ (String a, String b) => a == b) &&
+ data == other.data &&
+ editRange == other.editRange &&
+ insertTextFormat == other.insertTextFormat &&
+ insertTextMode == other.insertTextMode;
}
@override
@@ -7393,17 +7268,15 @@
@override
bool operator ==(Object other) {
- if (other is CompletionOptions && other.runtimeType == CompletionOptions) {
- return listEqual(allCommitCharacters, other.allCommitCharacters,
- (String a, String b) => a == b) &&
- completionItem == other.completionItem &&
- resolveProvider == other.resolveProvider &&
- listEqual(triggerCharacters, other.triggerCharacters,
- (String a, String b) => a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is CompletionOptions &&
+ other.runtimeType == CompletionOptions &&
+ listEqual(allCommitCharacters, other.allCommitCharacters,
+ (String a, String b) => a == b) &&
+ completionItem == other.completionItem &&
+ resolveProvider == other.resolveProvider &&
+ listEqual(triggerCharacters, other.triggerCharacters,
+ (String a, String b) => a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -7473,11 +7346,9 @@
@override
bool operator ==(Object other) {
- if (other is CompletionOptionsCompletionItem &&
- other.runtimeType == CompletionOptionsCompletionItem) {
- return labelDetailsSupport == other.labelDetailsSupport && true;
- }
- return false;
+ return other is CompletionOptionsCompletionItem &&
+ other.runtimeType == CompletionOptionsCompletionItem &&
+ labelDetailsSupport == other.labelDetailsSupport;
}
@override
@@ -7661,15 +7532,13 @@
@override
bool operator ==(Object other) {
- if (other is CompletionParams && other.runtimeType == CompletionParams) {
- return context == other.context &&
- partialResultToken == other.partialResultToken &&
- position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is CompletionParams &&
+ other.runtimeType == CompletionParams &&
+ context == other.context &&
+ partialResultToken == other.partialResultToken &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -7885,24 +7754,20 @@
@override
bool operator ==(Object other) {
- if (other is CompletionRegistrationOptions &&
- other.runtimeType == CompletionRegistrationOptions) {
- return listEqual(allCommitCharacters, other.allCommitCharacters,
- (String a, String b) => a == b) &&
- completionItem == other.completionItem &&
- listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- resolveProvider == other.resolveProvider &&
- listEqual(triggerCharacters, other.triggerCharacters,
- (String a, String b) => a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is CompletionRegistrationOptions &&
+ other.runtimeType == CompletionRegistrationOptions &&
+ listEqual(allCommitCharacters, other.allCommitCharacters,
+ (String a, String b) => a == b) &&
+ completionItem == other.completionItem &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ resolveProvider == other.resolveProvider &&
+ listEqual(triggerCharacters, other.triggerCharacters,
+ (String a, String b) => a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -8031,10 +7896,10 @@
@override
bool operator ==(Object other) {
- if (other is ConfigurationItem && other.runtimeType == ConfigurationItem) {
- return scopeUri == other.scopeUri && section == other.section && true;
- }
- return false;
+ return other is ConfigurationItem &&
+ other.runtimeType == ConfigurationItem &&
+ scopeUri == other.scopeUri &&
+ section == other.section;
}
@override
@@ -8106,13 +7971,10 @@
@override
bool operator ==(Object other) {
- if (other is ConfigurationParams &&
- other.runtimeType == ConfigurationParams) {
- return listEqual(items, other.items,
- (ConfigurationItem a, ConfigurationItem b) => a == b) &&
- true;
- }
- return false;
+ return other is ConfigurationParams &&
+ other.runtimeType == ConfigurationParams &&
+ listEqual(items, other.items,
+ (ConfigurationItem a, ConfigurationItem b) => a == b);
}
@override
@@ -8255,14 +8117,12 @@
@override
bool operator ==(Object other) {
- if (other is CreateFile && other.runtimeType == CreateFile) {
- return annotationId == other.annotationId &&
- kind == other.kind &&
- options == other.options &&
- uri == other.uri &&
- true;
- }
- return false;
+ return other is CreateFile &&
+ other.runtimeType == CreateFile &&
+ annotationId == other.annotationId &&
+ kind == other.kind &&
+ options == other.options &&
+ uri == other.uri;
}
@override
@@ -8348,12 +8208,10 @@
@override
bool operator ==(Object other) {
- if (other is CreateFileOptions && other.runtimeType == CreateFileOptions) {
- return ignoreIfExists == other.ignoreIfExists &&
- overwrite == other.overwrite &&
- true;
- }
- return false;
+ return other is CreateFileOptions &&
+ other.runtimeType == CreateFileOptions &&
+ ignoreIfExists == other.ignoreIfExists &&
+ overwrite == other.overwrite;
}
@override
@@ -8429,12 +8287,9 @@
@override
bool operator ==(Object other) {
- if (other is CreateFilesParams && other.runtimeType == CreateFilesParams) {
- return listEqual(
- files, other.files, (FileCreate a, FileCreate b) => a == b) &&
- true;
- }
- return false;
+ return other is CreateFilesParams &&
+ other.runtimeType == CreateFilesParams &&
+ listEqual(files, other.files, (FileCreate a, FileCreate b) => a == b);
}
@override
@@ -8517,13 +8372,10 @@
@override
bool operator ==(Object other) {
- if (other is DeclarationClientCapabilities &&
- other.runtimeType == DeclarationClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- linkSupport == other.linkSupport &&
- true;
- }
- return false;
+ return other is DeclarationClientCapabilities &&
+ other.runtimeType == DeclarationClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ linkSupport == other.linkSupport;
}
@override
@@ -8589,11 +8441,9 @@
@override
bool operator ==(Object other) {
- if (other is DeclarationOptions &&
- other.runtimeType == DeclarationOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is DeclarationOptions &&
+ other.runtimeType == DeclarationOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -8752,14 +8602,12 @@
@override
bool operator ==(Object other) {
- if (other is DeclarationParams && other.runtimeType == DeclarationParams) {
- return partialResultToken == other.partialResultToken &&
- position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is DeclarationParams &&
+ other.runtimeType == DeclarationParams &&
+ partialResultToken == other.partialResultToken &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -8881,19 +8729,15 @@
@override
bool operator ==(Object other) {
- if (other is DeclarationRegistrationOptions &&
- other.runtimeType == DeclarationRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is DeclarationRegistrationOptions &&
+ other.runtimeType == DeclarationRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -8980,13 +8824,10 @@
@override
bool operator ==(Object other) {
- if (other is DefinitionClientCapabilities &&
- other.runtimeType == DefinitionClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- linkSupport == other.linkSupport &&
- true;
- }
- return false;
+ return other is DefinitionClientCapabilities &&
+ other.runtimeType == DefinitionClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ linkSupport == other.linkSupport;
}
@override
@@ -9053,10 +8894,9 @@
@override
bool operator ==(Object other) {
- if (other is DefinitionOptions && other.runtimeType == DefinitionOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is DefinitionOptions &&
+ other.runtimeType == DefinitionOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -9216,14 +9056,12 @@
@override
bool operator ==(Object other) {
- if (other is DefinitionParams && other.runtimeType == DefinitionParams) {
- return partialResultToken == other.partialResultToken &&
- position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is DefinitionParams &&
+ other.runtimeType == DefinitionParams &&
+ partialResultToken == other.partialResultToken &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -9320,18 +9158,14 @@
@override
bool operator ==(Object other) {
- if (other is DefinitionRegistrationOptions &&
- other.runtimeType == DefinitionRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is DefinitionRegistrationOptions &&
+ other.runtimeType == DefinitionRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -9477,14 +9311,12 @@
@override
bool operator ==(Object other) {
- if (other is DeleteFile && other.runtimeType == DeleteFile) {
- return annotationId == other.annotationId &&
- kind == other.kind &&
- options == other.options &&
- uri == other.uri &&
- true;
- }
- return false;
+ return other is DeleteFile &&
+ other.runtimeType == DeleteFile &&
+ annotationId == other.annotationId &&
+ kind == other.kind &&
+ options == other.options &&
+ uri == other.uri;
}
@override
@@ -9570,12 +9402,10 @@
@override
bool operator ==(Object other) {
- if (other is DeleteFileOptions && other.runtimeType == DeleteFileOptions) {
- return ignoreIfNotExists == other.ignoreIfNotExists &&
- recursive == other.recursive &&
- true;
- }
- return false;
+ return other is DeleteFileOptions &&
+ other.runtimeType == DeleteFileOptions &&
+ ignoreIfNotExists == other.ignoreIfNotExists &&
+ recursive == other.recursive;
}
@override
@@ -9651,12 +9481,9 @@
@override
bool operator ==(Object other) {
- if (other is DeleteFilesParams && other.runtimeType == DeleteFilesParams) {
- return listEqual(
- files, other.files, (FileDelete a, FileDelete b) => a == b) &&
- true;
- }
- return false;
+ return other is DeleteFilesParams &&
+ other.runtimeType == DeleteFilesParams &&
+ listEqual(files, other.files, (FileDelete a, FileDelete b) => a == b);
}
@override
@@ -9910,25 +9737,22 @@
@override
bool operator ==(Object other) {
- if (other is Diagnostic && other.runtimeType == Diagnostic) {
- return code == other.code &&
- codeDescription == other.codeDescription &&
- data == other.data &&
- message == other.message &&
- range == other.range &&
- listEqual(
- relatedInformation,
- other.relatedInformation,
- (DiagnosticRelatedInformation a,
- DiagnosticRelatedInformation b) =>
- a == b) &&
- severity == other.severity &&
- source == other.source &&
- listEqual(
- tags, other.tags, (DiagnosticTag a, DiagnosticTag b) => a == b) &&
- true;
- }
- return false;
+ return other is Diagnostic &&
+ other.runtimeType == Diagnostic &&
+ code == other.code &&
+ codeDescription == other.codeDescription &&
+ data == other.data &&
+ message == other.message &&
+ range == other.range &&
+ listEqual(
+ relatedInformation,
+ other.relatedInformation,
+ (DiagnosticRelatedInformation a, DiagnosticRelatedInformation b) =>
+ a == b) &&
+ severity == other.severity &&
+ source == other.source &&
+ listEqual(
+ tags, other.tags, (DiagnosticTag a, DiagnosticTag b) => a == b);
}
@override
@@ -10025,13 +9849,10 @@
@override
bool operator ==(Object other) {
- if (other is DiagnosticClientCapabilities &&
- other.runtimeType == DiagnosticClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- relatedDocumentSupport == other.relatedDocumentSupport &&
- true;
- }
- return false;
+ return other is DiagnosticClientCapabilities &&
+ other.runtimeType == DiagnosticClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ relatedDocumentSupport == other.relatedDocumentSupport;
}
@override
@@ -10175,14 +9996,12 @@
@override
bool operator ==(Object other) {
- if (other is DiagnosticOptions && other.runtimeType == DiagnosticOptions) {
- return identifier == other.identifier &&
- interFileDependencies == other.interFileDependencies &&
- workDoneProgress == other.workDoneProgress &&
- workspaceDiagnostics == other.workspaceDiagnostics &&
- true;
- }
- return false;
+ return other is DiagnosticOptions &&
+ other.runtimeType == DiagnosticOptions &&
+ identifier == other.identifier &&
+ interFileDependencies == other.interFileDependencies &&
+ workDoneProgress == other.workDoneProgress &&
+ workspaceDiagnostics == other.workspaceDiagnostics;
}
@override
@@ -10386,22 +10205,18 @@
@override
bool operator ==(Object other) {
- if (other is DiagnosticRegistrationOptions &&
- other.runtimeType == DiagnosticRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- identifier == other.identifier &&
- interFileDependencies == other.interFileDependencies &&
- workDoneProgress == other.workDoneProgress &&
- workspaceDiagnostics == other.workspaceDiagnostics &&
- true;
- }
- return false;
+ return other is DiagnosticRegistrationOptions &&
+ other.runtimeType == DiagnosticRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ identifier == other.identifier &&
+ interFileDependencies == other.interFileDependencies &&
+ workDoneProgress == other.workDoneProgress &&
+ workspaceDiagnostics == other.workspaceDiagnostics;
}
@override
@@ -10503,11 +10318,10 @@
@override
bool operator ==(Object other) {
- if (other is DiagnosticRelatedInformation &&
- other.runtimeType == DiagnosticRelatedInformation) {
- return location == other.location && message == other.message && true;
- }
- return false;
+ return other is DiagnosticRelatedInformation &&
+ other.runtimeType == DiagnosticRelatedInformation &&
+ location == other.location &&
+ message == other.message;
}
@override
@@ -10578,11 +10392,9 @@
@override
bool operator ==(Object other) {
- if (other is DiagnosticServerCancellationData &&
- other.runtimeType == DiagnosticServerCancellationData) {
- return retriggerRequest == other.retriggerRequest && true;
- }
- return false;
+ return other is DiagnosticServerCancellationData &&
+ other.runtimeType == DiagnosticServerCancellationData &&
+ retriggerRequest == other.retriggerRequest;
}
@override
@@ -10728,11 +10540,9 @@
@override
bool operator ==(Object other) {
- if (other is DiagnosticWorkspaceClientCapabilities &&
- other.runtimeType == DiagnosticWorkspaceClientCapabilities) {
- return refreshSupport == other.refreshSupport && true;
- }
- return false;
+ return other is DiagnosticWorkspaceClientCapabilities &&
+ other.runtimeType == DiagnosticWorkspaceClientCapabilities &&
+ refreshSupport == other.refreshSupport;
}
@override
@@ -10794,11 +10604,9 @@
@override
bool operator ==(Object other) {
- if (other is DidChangeConfigurationClientCapabilities &&
- other.runtimeType == DidChangeConfigurationClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is DidChangeConfigurationClientCapabilities &&
+ other.runtimeType == DidChangeConfigurationClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -10847,11 +10655,9 @@
@override
bool operator ==(Object other) {
- if (other is DidChangeConfigurationParams &&
- other.runtimeType == DidChangeConfigurationParams) {
- return settings == other.settings && true;
- }
- return false;
+ return other is DidChangeConfigurationParams &&
+ other.runtimeType == DidChangeConfigurationParams &&
+ settings == other.settings;
}
@override
@@ -10967,13 +10773,10 @@
@override
bool operator ==(Object other) {
- if (other is DidChangeNotebookDocumentParams &&
- other.runtimeType == DidChangeNotebookDocumentParams) {
- return change == other.change &&
- notebookDocument == other.notebookDocument &&
- true;
- }
- return false;
+ return other is DidChangeNotebookDocumentParams &&
+ other.runtimeType == DidChangeNotebookDocumentParams &&
+ change == other.change &&
+ notebookDocument == other.notebookDocument;
}
@override
@@ -11102,22 +10905,19 @@
@override
bool operator ==(Object other) {
- if (other is DidChangeTextDocumentParams &&
- other.runtimeType == DidChangeTextDocumentParams) {
- return listEqual(
- contentChanges,
- other.contentChanges,
- (Either2<TextDocumentContentChangeEvent1,
- TextDocumentContentChangeEvent2>
- a,
- Either2<TextDocumentContentChangeEvent1,
- TextDocumentContentChangeEvent2>
- b) =>
- a == b) &&
- textDocument == other.textDocument &&
- true;
- }
- return false;
+ return other is DidChangeTextDocumentParams &&
+ other.runtimeType == DidChangeTextDocumentParams &&
+ listEqual(
+ contentChanges,
+ other.contentChanges,
+ (Either2<TextDocumentContentChangeEvent1,
+ TextDocumentContentChangeEvent2>
+ a,
+ Either2<TextDocumentContentChangeEvent1,
+ TextDocumentContentChangeEvent2>
+ b) =>
+ a == b) &&
+ textDocument == other.textDocument;
}
@override
@@ -11208,13 +11008,10 @@
@override
bool operator ==(Object other) {
- if (other is DidChangeWatchedFilesClientCapabilities &&
- other.runtimeType == DidChangeWatchedFilesClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- relativePatternSupport == other.relativePatternSupport &&
- true;
- }
- return false;
+ return other is DidChangeWatchedFilesClientCapabilities &&
+ other.runtimeType == DidChangeWatchedFilesClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ relativePatternSupport == other.relativePatternSupport;
}
@override
@@ -11287,13 +11084,9 @@
@override
bool operator ==(Object other) {
- if (other is DidChangeWatchedFilesParams &&
- other.runtimeType == DidChangeWatchedFilesParams) {
- return listEqual(
- changes, other.changes, (FileEvent a, FileEvent b) => a == b) &&
- true;
- }
- return false;
+ return other is DidChangeWatchedFilesParams &&
+ other.runtimeType == DidChangeWatchedFilesParams &&
+ listEqual(changes, other.changes, (FileEvent a, FileEvent b) => a == b);
}
@override
@@ -11366,13 +11159,10 @@
@override
bool operator ==(Object other) {
- if (other is DidChangeWatchedFilesRegistrationOptions &&
- other.runtimeType == DidChangeWatchedFilesRegistrationOptions) {
- return listEqual(watchers, other.watchers,
- (FileSystemWatcher a, FileSystemWatcher b) => a == b) &&
- true;
- }
- return false;
+ return other is DidChangeWatchedFilesRegistrationOptions &&
+ other.runtimeType == DidChangeWatchedFilesRegistrationOptions &&
+ listEqual(watchers, other.watchers,
+ (FileSystemWatcher a, FileSystemWatcher b) => a == b);
}
@override
@@ -11440,11 +11230,9 @@
@override
bool operator ==(Object other) {
- if (other is DidChangeWorkspaceFoldersParams &&
- other.runtimeType == DidChangeWorkspaceFoldersParams) {
- return event == other.event && true;
- }
- return false;
+ return other is DidChangeWorkspaceFoldersParams &&
+ other.runtimeType == DidChangeWorkspaceFoldersParams &&
+ event == other.event;
}
@override
@@ -11547,14 +11335,11 @@
@override
bool operator ==(Object other) {
- if (other is DidCloseNotebookDocumentParams &&
- other.runtimeType == DidCloseNotebookDocumentParams) {
- return listEqual(cellTextDocuments, other.cellTextDocuments,
- (TextDocumentIdentifier a, TextDocumentIdentifier b) => a == b) &&
- notebookDocument == other.notebookDocument &&
- true;
- }
- return false;
+ return other is DidCloseNotebookDocumentParams &&
+ other.runtimeType == DidCloseNotebookDocumentParams &&
+ listEqual(cellTextDocuments, other.cellTextDocuments,
+ (TextDocumentIdentifier a, TextDocumentIdentifier b) => a == b) &&
+ notebookDocument == other.notebookDocument;
}
@override
@@ -11625,11 +11410,9 @@
@override
bool operator ==(Object other) {
- if (other is DidCloseTextDocumentParams &&
- other.runtimeType == DidCloseTextDocumentParams) {
- return textDocument == other.textDocument && true;
- }
- return false;
+ return other is DidCloseTextDocumentParams &&
+ other.runtimeType == DidCloseTextDocumentParams &&
+ textDocument == other.textDocument;
}
@override
@@ -11730,14 +11513,11 @@
@override
bool operator ==(Object other) {
- if (other is DidOpenNotebookDocumentParams &&
- other.runtimeType == DidOpenNotebookDocumentParams) {
- return listEqual(cellTextDocuments, other.cellTextDocuments,
- (TextDocumentItem a, TextDocumentItem b) => a == b) &&
- notebookDocument == other.notebookDocument &&
- true;
- }
- return false;
+ return other is DidOpenNotebookDocumentParams &&
+ other.runtimeType == DidOpenNotebookDocumentParams &&
+ listEqual(cellTextDocuments, other.cellTextDocuments,
+ (TextDocumentItem a, TextDocumentItem b) => a == b) &&
+ notebookDocument == other.notebookDocument;
}
@override
@@ -11808,11 +11588,9 @@
@override
bool operator ==(Object other) {
- if (other is DidOpenTextDocumentParams &&
- other.runtimeType == DidOpenTextDocumentParams) {
- return textDocument == other.textDocument && true;
- }
- return false;
+ return other is DidOpenTextDocumentParams &&
+ other.runtimeType == DidOpenTextDocumentParams &&
+ textDocument == other.textDocument;
}
@override
@@ -11882,11 +11660,9 @@
@override
bool operator ==(Object other) {
- if (other is DidSaveNotebookDocumentParams &&
- other.runtimeType == DidSaveNotebookDocumentParams) {
- return notebookDocument == other.notebookDocument && true;
- }
- return false;
+ return other is DidSaveNotebookDocumentParams &&
+ other.runtimeType == DidSaveNotebookDocumentParams &&
+ notebookDocument == other.notebookDocument;
}
@override
@@ -11975,11 +11751,10 @@
@override
bool operator ==(Object other) {
- if (other is DidSaveTextDocumentParams &&
- other.runtimeType == DidSaveTextDocumentParams) {
- return text == other.text && textDocument == other.textDocument && true;
- }
- return false;
+ return other is DidSaveTextDocumentParams &&
+ other.runtimeType == DidSaveTextDocumentParams &&
+ text == other.text &&
+ textDocument == other.textDocument;
}
@override
@@ -12044,11 +11819,9 @@
@override
bool operator ==(Object other) {
- if (other is DocumentColorClientCapabilities &&
- other.runtimeType == DocumentColorClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is DocumentColorClientCapabilities &&
+ other.runtimeType == DocumentColorClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -12111,11 +11884,9 @@
@override
bool operator ==(Object other) {
- if (other is DocumentColorOptions &&
- other.runtimeType == DocumentColorOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is DocumentColorOptions &&
+ other.runtimeType == DocumentColorOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -12243,14 +12014,11 @@
@override
bool operator ==(Object other) {
- if (other is DocumentColorParams &&
- other.runtimeType == DocumentColorParams) {
- return partialResultToken == other.partialResultToken &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is DocumentColorParams &&
+ other.runtimeType == DocumentColorParams &&
+ partialResultToken == other.partialResultToken &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -12371,19 +12139,15 @@
@override
bool operator ==(Object other) {
- if (other is DocumentColorRegistrationOptions &&
- other.runtimeType == DocumentColorRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is DocumentColorRegistrationOptions &&
+ other.runtimeType == DocumentColorRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -12557,16 +12321,13 @@
@override
bool operator ==(Object other) {
- if (other is DocumentDiagnosticParams &&
- other.runtimeType == DocumentDiagnosticParams) {
- return identifier == other.identifier &&
- partialResultToken == other.partialResultToken &&
- previousResultId == other.previousResultId &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is DocumentDiagnosticParams &&
+ other.runtimeType == DocumentDiagnosticParams &&
+ identifier == other.identifier &&
+ partialResultToken == other.partialResultToken &&
+ previousResultId == other.previousResultId &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -12664,21 +12425,18 @@
@override
bool operator ==(Object other) {
- if (other is DocumentDiagnosticReportPartialResult &&
- other.runtimeType == DocumentDiagnosticReportPartialResult) {
- return mapEqual(
- relatedDocuments,
- other.relatedDocuments,
- (Either2<FullDocumentDiagnosticReport,
- UnchangedDocumentDiagnosticReport>
- a,
- Either2<FullDocumentDiagnosticReport,
- UnchangedDocumentDiagnosticReport>
- b) =>
- a == b) &&
- true;
- }
- return false;
+ return other is DocumentDiagnosticReportPartialResult &&
+ other.runtimeType == DocumentDiagnosticReportPartialResult &&
+ mapEqual(
+ relatedDocuments,
+ other.relatedDocuments,
+ (Either2<FullDocumentDiagnosticReport,
+ UnchangedDocumentDiagnosticReport>
+ a,
+ Either2<FullDocumentDiagnosticReport,
+ UnchangedDocumentDiagnosticReport>
+ b) =>
+ a == b);
}
@override
@@ -12741,11 +12499,9 @@
@override
bool operator ==(Object other) {
- if (other is DocumentFormattingClientCapabilities &&
- other.runtimeType == DocumentFormattingClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is DocumentFormattingClientCapabilities &&
+ other.runtimeType == DocumentFormattingClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -12810,11 +12566,9 @@
@override
bool operator ==(Object other) {
- if (other is DocumentFormattingOptions &&
- other.runtimeType == DocumentFormattingOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is DocumentFormattingOptions &&
+ other.runtimeType == DocumentFormattingOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -12938,14 +12692,11 @@
@override
bool operator ==(Object other) {
- if (other is DocumentFormattingParams &&
- other.runtimeType == DocumentFormattingParams) {
- return options == other.options &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is DocumentFormattingParams &&
+ other.runtimeType == DocumentFormattingParams &&
+ options == other.options &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -13046,18 +12797,14 @@
@override
bool operator ==(Object other) {
- if (other is DocumentFormattingRegistrationOptions &&
- other.runtimeType == DocumentFormattingRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is DocumentFormattingRegistrationOptions &&
+ other.runtimeType == DocumentFormattingRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -13151,10 +12898,10 @@
@override
bool operator ==(Object other) {
- if (other is DocumentHighlight && other.runtimeType == DocumentHighlight) {
- return kind == other.kind && range == other.range && true;
- }
- return false;
+ return other is DocumentHighlight &&
+ other.runtimeType == DocumentHighlight &&
+ kind == other.kind &&
+ range == other.range;
}
@override
@@ -13220,11 +12967,9 @@
@override
bool operator ==(Object other) {
- if (other is DocumentHighlightClientCapabilities &&
- other.runtimeType == DocumentHighlightClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is DocumentHighlightClientCapabilities &&
+ other.runtimeType == DocumentHighlightClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -13323,11 +13068,9 @@
@override
bool operator ==(Object other) {
- if (other is DocumentHighlightOptions &&
- other.runtimeType == DocumentHighlightOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is DocumentHighlightOptions &&
+ other.runtimeType == DocumentHighlightOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -13487,15 +13230,12 @@
@override
bool operator ==(Object other) {
- if (other is DocumentHighlightParams &&
- other.runtimeType == DocumentHighlightParams) {
- return partialResultToken == other.partialResultToken &&
- position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is DocumentHighlightParams &&
+ other.runtimeType == DocumentHighlightParams &&
+ partialResultToken == other.partialResultToken &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -13597,18 +13337,14 @@
@override
bool operator ==(Object other) {
- if (other is DocumentHighlightRegistrationOptions &&
- other.runtimeType == DocumentHighlightRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is DocumentHighlightRegistrationOptions &&
+ other.runtimeType == DocumentHighlightRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -13737,14 +13473,12 @@
@override
bool operator ==(Object other) {
- if (other is DocumentLink && other.runtimeType == DocumentLink) {
- return data == other.data &&
- range == other.range &&
- target == other.target &&
- tooltip == other.tooltip &&
- true;
- }
- return false;
+ return other is DocumentLink &&
+ other.runtimeType == DocumentLink &&
+ data == other.data &&
+ range == other.range &&
+ target == other.target &&
+ tooltip == other.tooltip;
}
@override
@@ -13832,13 +13566,10 @@
@override
bool operator ==(Object other) {
- if (other is DocumentLinkClientCapabilities &&
- other.runtimeType == DocumentLinkClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- tooltipSupport == other.tooltipSupport &&
- true;
- }
- return false;
+ return other is DocumentLinkClientCapabilities &&
+ other.runtimeType == DocumentLinkClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ tooltipSupport == other.tooltipSupport;
}
@override
@@ -13924,13 +13655,10 @@
@override
bool operator ==(Object other) {
- if (other is DocumentLinkOptions &&
- other.runtimeType == DocumentLinkOptions) {
- return resolveProvider == other.resolveProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is DocumentLinkOptions &&
+ other.runtimeType == DocumentLinkOptions &&
+ resolveProvider == other.resolveProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -14061,14 +13789,11 @@
@override
bool operator ==(Object other) {
- if (other is DocumentLinkParams &&
- other.runtimeType == DocumentLinkParams) {
- return partialResultToken == other.partialResultToken &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is DocumentLinkParams &&
+ other.runtimeType == DocumentLinkParams &&
+ partialResultToken == other.partialResultToken &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -14188,19 +13913,15 @@
@override
bool operator ==(Object other) {
- if (other is DocumentLinkRegistrationOptions &&
- other.runtimeType == DocumentLinkRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- resolveProvider == other.resolveProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is DocumentLinkRegistrationOptions &&
+ other.runtimeType == DocumentLinkRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ resolveProvider == other.resolveProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -14267,11 +13988,9 @@
@override
bool operator ==(Object other) {
- if (other is DocumentOnTypeFormattingClientCapabilities &&
- other.runtimeType == DocumentOnTypeFormattingClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is DocumentOnTypeFormattingClientCapabilities &&
+ other.runtimeType == DocumentOnTypeFormattingClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -14366,14 +14085,11 @@
@override
bool operator ==(Object other) {
- if (other is DocumentOnTypeFormattingOptions &&
- other.runtimeType == DocumentOnTypeFormattingOptions) {
- return firstTriggerCharacter == other.firstTriggerCharacter &&
- listEqual(moreTriggerCharacter, other.moreTriggerCharacter,
- (String a, String b) => a == b) &&
- true;
- }
- return false;
+ return other is DocumentOnTypeFormattingOptions &&
+ other.runtimeType == DocumentOnTypeFormattingOptions &&
+ firstTriggerCharacter == other.firstTriggerCharacter &&
+ listEqual(moreTriggerCharacter, other.moreTriggerCharacter,
+ (String a, String b) => a == b);
}
@override
@@ -14528,15 +14244,12 @@
@override
bool operator ==(Object other) {
- if (other is DocumentOnTypeFormattingParams &&
- other.runtimeType == DocumentOnTypeFormattingParams) {
- return ch == other.ch &&
- options == other.options &&
- position == other.position &&
- textDocument == other.textDocument &&
- true;
- }
- return false;
+ return other is DocumentOnTypeFormattingParams &&
+ other.runtimeType == DocumentOnTypeFormattingParams &&
+ ch == other.ch &&
+ options == other.options &&
+ position == other.position &&
+ textDocument == other.textDocument;
}
@override
@@ -14671,20 +14384,16 @@
@override
bool operator ==(Object other) {
- if (other is DocumentOnTypeFormattingRegistrationOptions &&
- other.runtimeType == DocumentOnTypeFormattingRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- firstTriggerCharacter == other.firstTriggerCharacter &&
- listEqual(moreTriggerCharacter, other.moreTriggerCharacter,
- (String a, String b) => a == b) &&
- true;
- }
- return false;
+ return other is DocumentOnTypeFormattingRegistrationOptions &&
+ other.runtimeType == DocumentOnTypeFormattingRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ firstTriggerCharacter == other.firstTriggerCharacter &&
+ listEqual(moreTriggerCharacter, other.moreTriggerCharacter,
+ (String a, String b) => a == b);
}
@override
@@ -14751,11 +14460,9 @@
@override
bool operator ==(Object other) {
- if (other is DocumentRangeFormattingClientCapabilities &&
- other.runtimeType == DocumentRangeFormattingClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is DocumentRangeFormattingClientCapabilities &&
+ other.runtimeType == DocumentRangeFormattingClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -14821,11 +14528,9 @@
@override
bool operator ==(Object other) {
- if (other is DocumentRangeFormattingOptions &&
- other.runtimeType == DocumentRangeFormattingOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is DocumentRangeFormattingOptions &&
+ other.runtimeType == DocumentRangeFormattingOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -14976,15 +14681,12 @@
@override
bool operator ==(Object other) {
- if (other is DocumentRangeFormattingParams &&
- other.runtimeType == DocumentRangeFormattingParams) {
- return options == other.options &&
- range == other.range &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is DocumentRangeFormattingParams &&
+ other.runtimeType == DocumentRangeFormattingParams &&
+ options == other.options &&
+ range == other.range &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -15086,18 +14788,14 @@
@override
bool operator ==(Object other) {
- if (other is DocumentRangeFormattingRegistrationOptions &&
- other.runtimeType == DocumentRangeFormattingRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is DocumentRangeFormattingRegistrationOptions &&
+ other.runtimeType == DocumentRangeFormattingRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -15348,19 +15046,17 @@
@override
bool operator ==(Object other) {
- if (other is DocumentSymbol && other.runtimeType == DocumentSymbol) {
- return listEqual(children, other.children,
- (DocumentSymbol a, DocumentSymbol b) => a == b) &&
- deprecated == other.deprecated &&
- detail == other.detail &&
- kind == other.kind &&
- name == other.name &&
- range == other.range &&
- selectionRange == other.selectionRange &&
- listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b) &&
- true;
- }
- return false;
+ return other is DocumentSymbol &&
+ other.runtimeType == DocumentSymbol &&
+ listEqual(children, other.children,
+ (DocumentSymbol a, DocumentSymbol b) => a == b) &&
+ deprecated == other.deprecated &&
+ detail == other.detail &&
+ kind == other.kind &&
+ name == other.name &&
+ range == other.range &&
+ selectionRange == other.selectionRange &&
+ listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b);
}
@override
@@ -15535,17 +15231,14 @@
@override
bool operator ==(Object other) {
- if (other is DocumentSymbolClientCapabilities &&
- other.runtimeType == DocumentSymbolClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- hierarchicalDocumentSymbolSupport ==
- other.hierarchicalDocumentSymbolSupport &&
- labelSupport == other.labelSupport &&
- symbolKind == other.symbolKind &&
- tagSupport == other.tagSupport &&
- true;
- }
- return false;
+ return other is DocumentSymbolClientCapabilities &&
+ other.runtimeType == DocumentSymbolClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ hierarchicalDocumentSymbolSupport ==
+ other.hierarchicalDocumentSymbolSupport &&
+ labelSupport == other.labelSupport &&
+ symbolKind == other.symbolKind &&
+ tagSupport == other.tagSupport;
}
@override
@@ -15622,13 +15315,10 @@
@override
bool operator ==(Object other) {
- if (other is DocumentSymbolClientCapabilitiesSymbolKind &&
- other.runtimeType == DocumentSymbolClientCapabilitiesSymbolKind) {
- return listEqual(valueSet, other.valueSet,
- (SymbolKind a, SymbolKind b) => a == b) &&
- true;
- }
- return false;
+ return other is DocumentSymbolClientCapabilitiesSymbolKind &&
+ other.runtimeType == DocumentSymbolClientCapabilitiesSymbolKind &&
+ listEqual(
+ valueSet, other.valueSet, (SymbolKind a, SymbolKind b) => a == b);
}
@override
@@ -15699,13 +15389,10 @@
@override
bool operator ==(Object other) {
- if (other is DocumentSymbolClientCapabilitiesTagSupport &&
- other.runtimeType == DocumentSymbolClientCapabilitiesTagSupport) {
- return listEqual(
- valueSet, other.valueSet, (SymbolTag a, SymbolTag b) => a == b) &&
- true;
- }
- return false;
+ return other is DocumentSymbolClientCapabilitiesTagSupport &&
+ other.runtimeType == DocumentSymbolClientCapabilitiesTagSupport &&
+ listEqual(
+ valueSet, other.valueSet, (SymbolTag a, SymbolTag b) => a == b);
}
@override
@@ -15791,13 +15478,10 @@
@override
bool operator ==(Object other) {
- if (other is DocumentSymbolOptions &&
- other.runtimeType == DocumentSymbolOptions) {
- return label == other.label &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is DocumentSymbolOptions &&
+ other.runtimeType == DocumentSymbolOptions &&
+ label == other.label &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -15928,14 +15612,11 @@
@override
bool operator ==(Object other) {
- if (other is DocumentSymbolParams &&
- other.runtimeType == DocumentSymbolParams) {
- return partialResultToken == other.partialResultToken &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is DocumentSymbolParams &&
+ other.runtimeType == DocumentSymbolParams &&
+ partialResultToken == other.partialResultToken &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -16058,19 +15739,15 @@
@override
bool operator ==(Object other) {
- if (other is DocumentSymbolRegistrationOptions &&
- other.runtimeType == DocumentSymbolRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- label == other.label &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is DocumentSymbolRegistrationOptions &&
+ other.runtimeType == DocumentSymbolRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ label == other.label &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -16221,11 +15898,9 @@
@override
bool operator ==(Object other) {
- if (other is ExecuteCommandClientCapabilities &&
- other.runtimeType == ExecuteCommandClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is ExecuteCommandClientCapabilities &&
+ other.runtimeType == ExecuteCommandClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -16316,14 +15991,10 @@
@override
bool operator ==(Object other) {
- if (other is ExecuteCommandOptions &&
- other.runtimeType == ExecuteCommandOptions) {
- return listEqual(
- commands, other.commands, (String a, String b) => a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is ExecuteCommandOptions &&
+ other.runtimeType == ExecuteCommandOptions &&
+ listEqual(commands, other.commands, (String a, String b) => a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -16444,15 +16115,12 @@
@override
bool operator ==(Object other) {
- if (other is ExecuteCommandParams &&
- other.runtimeType == ExecuteCommandParams) {
- return listEqual(
- arguments, other.arguments, (Object? a, Object? b) => a == b) &&
- command == other.command &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is ExecuteCommandParams &&
+ other.runtimeType == ExecuteCommandParams &&
+ listEqual(
+ arguments, other.arguments, (Object? a, Object? b) => a == b) &&
+ command == other.command &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -16546,14 +16214,10 @@
@override
bool operator ==(Object other) {
- if (other is ExecuteCommandRegistrationOptions &&
- other.runtimeType == ExecuteCommandRegistrationOptions) {
- return listEqual(
- commands, other.commands, (String a, String b) => a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is ExecuteCommandRegistrationOptions &&
+ other.runtimeType == ExecuteCommandRegistrationOptions &&
+ listEqual(commands, other.commands, (String a, String b) => a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -16643,12 +16307,10 @@
@override
bool operator ==(Object other) {
- if (other is ExecutionSummary && other.runtimeType == ExecutionSummary) {
- return executionOrder == other.executionOrder &&
- success == other.success &&
- true;
- }
- return false;
+ return other is ExecutionSummary &&
+ other.runtimeType == ExecutionSummary &&
+ executionOrder == other.executionOrder &&
+ success == other.success;
}
@override
@@ -16804,10 +16466,9 @@
@override
bool operator ==(Object other) {
- if (other is FileCreate && other.runtimeType == FileCreate) {
- return uri == other.uri && true;
- }
- return false;
+ return other is FileCreate &&
+ other.runtimeType == FileCreate &&
+ uri == other.uri;
}
@override
@@ -16876,10 +16537,9 @@
@override
bool operator ==(Object other) {
- if (other is FileDelete && other.runtimeType == FileDelete) {
- return uri == other.uri && true;
- }
- return false;
+ return other is FileDelete &&
+ other.runtimeType == FileDelete &&
+ uri == other.uri;
}
@override
@@ -16972,10 +16632,10 @@
@override
bool operator ==(Object other) {
- if (other is FileEvent && other.runtimeType == FileEvent) {
- return type == other.type && uri == other.uri && true;
- }
- return false;
+ return other is FileEvent &&
+ other.runtimeType == FileEvent &&
+ type == other.type &&
+ uri == other.uri;
}
@override
@@ -17166,18 +16826,15 @@
@override
bool operator ==(Object other) {
- if (other is FileOperationClientCapabilities &&
- other.runtimeType == FileOperationClientCapabilities) {
- return didCreate == other.didCreate &&
- didDelete == other.didDelete &&
- didRename == other.didRename &&
- dynamicRegistration == other.dynamicRegistration &&
- willCreate == other.willCreate &&
- willDelete == other.willDelete &&
- willRename == other.willRename &&
- true;
- }
- return false;
+ return other is FileOperationClientCapabilities &&
+ other.runtimeType == FileOperationClientCapabilities &&
+ didCreate == other.didCreate &&
+ didDelete == other.didDelete &&
+ didRename == other.didRename &&
+ dynamicRegistration == other.dynamicRegistration &&
+ willCreate == other.willCreate &&
+ willDelete == other.willDelete &&
+ willRename == other.willRename;
}
@override
@@ -17276,11 +16933,10 @@
@override
bool operator ==(Object other) {
- if (other is FileOperationFilter &&
- other.runtimeType == FileOperationFilter) {
- return pattern == other.pattern && scheme == other.scheme && true;
- }
- return false;
+ return other is FileOperationFilter &&
+ other.runtimeType == FileOperationFilter &&
+ pattern == other.pattern &&
+ scheme == other.scheme;
}
@override
@@ -17476,17 +17132,14 @@
@override
bool operator ==(Object other) {
- if (other is FileOperationOptions &&
- other.runtimeType == FileOperationOptions) {
- return didCreate == other.didCreate &&
- didDelete == other.didDelete &&
- didRename == other.didRename &&
- willCreate == other.willCreate &&
- willDelete == other.willDelete &&
- willRename == other.willRename &&
- true;
- }
- return false;
+ return other is FileOperationOptions &&
+ other.runtimeType == FileOperationOptions &&
+ didCreate == other.didCreate &&
+ didDelete == other.didDelete &&
+ didRename == other.didRename &&
+ willCreate == other.willCreate &&
+ willDelete == other.willDelete &&
+ willRename == other.willRename;
}
@override
@@ -17622,14 +17275,11 @@
@override
bool operator ==(Object other) {
- if (other is FileOperationPattern &&
- other.runtimeType == FileOperationPattern) {
- return glob == other.glob &&
- matches == other.matches &&
- options == other.options &&
- true;
- }
- return false;
+ return other is FileOperationPattern &&
+ other.runtimeType == FileOperationPattern &&
+ glob == other.glob &&
+ matches == other.matches &&
+ options == other.options;
}
@override
@@ -17729,11 +17379,9 @@
@override
bool operator ==(Object other) {
- if (other is FileOperationPatternOptions &&
- other.runtimeType == FileOperationPatternOptions) {
- return ignoreCase == other.ignoreCase && true;
- }
- return false;
+ return other is FileOperationPatternOptions &&
+ other.runtimeType == FileOperationPatternOptions &&
+ ignoreCase == other.ignoreCase;
}
@override
@@ -17807,13 +17455,10 @@
@override
bool operator ==(Object other) {
- if (other is FileOperationRegistrationOptions &&
- other.runtimeType == FileOperationRegistrationOptions) {
- return listEqual(filters, other.filters,
- (FileOperationFilter a, FileOperationFilter b) => a == b) &&
- true;
- }
- return false;
+ return other is FileOperationRegistrationOptions &&
+ other.runtimeType == FileOperationRegistrationOptions &&
+ listEqual(filters, other.filters,
+ (FileOperationFilter a, FileOperationFilter b) => a == b);
}
@override
@@ -17908,10 +17553,10 @@
@override
bool operator ==(Object other) {
- if (other is FileRename && other.runtimeType == FileRename) {
- return newUri == other.newUri && oldUri == other.oldUri && true;
- }
- return false;
+ return other is FileRename &&
+ other.runtimeType == FileRename &&
+ newUri == other.newUri &&
+ oldUri == other.oldUri;
}
@override
@@ -18011,10 +17656,10 @@
@override
bool operator ==(Object other) {
- if (other is FileSystemWatcher && other.runtimeType == FileSystemWatcher) {
- return globPattern == other.globPattern && kind == other.kind && true;
- }
- return false;
+ return other is FileSystemWatcher &&
+ other.runtimeType == FileSystemWatcher &&
+ globPattern == other.globPattern &&
+ kind == other.kind;
}
@override
@@ -18206,16 +17851,14 @@
@override
bool operator ==(Object other) {
- if (other is FoldingRange && other.runtimeType == FoldingRange) {
- return collapsedText == other.collapsedText &&
- endCharacter == other.endCharacter &&
- endLine == other.endLine &&
- kind == other.kind &&
- startCharacter == other.startCharacter &&
- startLine == other.startLine &&
- true;
- }
- return false;
+ return other is FoldingRange &&
+ other.runtimeType == FoldingRange &&
+ collapsedText == other.collapsedText &&
+ endCharacter == other.endCharacter &&
+ endLine == other.endLine &&
+ kind == other.kind &&
+ startCharacter == other.startCharacter &&
+ startLine == other.startLine;
}
@override
@@ -18385,16 +18028,13 @@
@override
bool operator ==(Object other) {
- if (other is FoldingRangeClientCapabilities &&
- other.runtimeType == FoldingRangeClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- foldingRange == other.foldingRange &&
- foldingRangeKind == other.foldingRangeKind &&
- lineFoldingOnly == other.lineFoldingOnly &&
- rangeLimit == other.rangeLimit &&
- true;
- }
- return false;
+ return other is FoldingRangeClientCapabilities &&
+ other.runtimeType == FoldingRangeClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ foldingRange == other.foldingRange &&
+ foldingRangeKind == other.foldingRangeKind &&
+ lineFoldingOnly == other.lineFoldingOnly &&
+ rangeLimit == other.rangeLimit;
}
@override
@@ -18465,11 +18105,9 @@
@override
bool operator ==(Object other) {
- if (other is FoldingRangeClientCapabilitiesFoldingRange &&
- other.runtimeType == FoldingRangeClientCapabilitiesFoldingRange) {
- return collapsedText == other.collapsedText && true;
- }
- return false;
+ return other is FoldingRangeClientCapabilitiesFoldingRange &&
+ other.runtimeType == FoldingRangeClientCapabilitiesFoldingRange &&
+ collapsedText == other.collapsedText;
}
@override
@@ -18538,13 +18176,10 @@
@override
bool operator ==(Object other) {
- if (other is FoldingRangeClientCapabilitiesFoldingRangeKind &&
- other.runtimeType == FoldingRangeClientCapabilitiesFoldingRangeKind) {
- return listEqual(valueSet, other.valueSet,
- (FoldingRangeKind a, FoldingRangeKind b) => a == b) &&
- true;
- }
- return false;
+ return other is FoldingRangeClientCapabilitiesFoldingRangeKind &&
+ other.runtimeType == FoldingRangeClientCapabilitiesFoldingRangeKind &&
+ listEqual(valueSet, other.valueSet,
+ (FoldingRangeKind a, FoldingRangeKind b) => a == b);
}
@override
@@ -18641,11 +18276,9 @@
@override
bool operator ==(Object other) {
- if (other is FoldingRangeOptions &&
- other.runtimeType == FoldingRangeOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is FoldingRangeOptions &&
+ other.runtimeType == FoldingRangeOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -18773,14 +18406,11 @@
@override
bool operator ==(Object other) {
- if (other is FoldingRangeParams &&
- other.runtimeType == FoldingRangeParams) {
- return partialResultToken == other.partialResultToken &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is FoldingRangeParams &&
+ other.runtimeType == FoldingRangeParams &&
+ partialResultToken == other.partialResultToken &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -18901,19 +18531,15 @@
@override
bool operator ==(Object other) {
- if (other is FoldingRangeRegistrationOptions &&
- other.runtimeType == FoldingRangeRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is FoldingRangeRegistrationOptions &&
+ other.runtimeType == FoldingRangeRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -19076,15 +18702,13 @@
@override
bool operator ==(Object other) {
- if (other is FormattingOptions && other.runtimeType == FormattingOptions) {
- return insertFinalNewline == other.insertFinalNewline &&
- insertSpaces == other.insertSpaces &&
- tabSize == other.tabSize &&
- trimFinalNewlines == other.trimFinalNewlines &&
- trimTrailingWhitespace == other.trimTrailingWhitespace &&
- true;
- }
- return false;
+ return other is FormattingOptions &&
+ other.runtimeType == FormattingOptions &&
+ insertFinalNewline == other.insertFinalNewline &&
+ insertSpaces == other.insertSpaces &&
+ tabSize == other.tabSize &&
+ trimFinalNewlines == other.trimFinalNewlines &&
+ trimTrailingWhitespace == other.trimTrailingWhitespace;
}
@override
@@ -19221,15 +18845,11 @@
@override
bool operator ==(Object other) {
- if (other is FullDocumentDiagnosticReport &&
- other.runtimeType == FullDocumentDiagnosticReport) {
- return listEqual(
- items, other.items, (Diagnostic a, Diagnostic b) => a == b) &&
- kind == other.kind &&
- resultId == other.resultId &&
- true;
- }
- return false;
+ return other is FullDocumentDiagnosticReport &&
+ other.runtimeType == FullDocumentDiagnosticReport &&
+ listEqual(items, other.items, (Diagnostic a, Diagnostic b) => a == b) &&
+ kind == other.kind &&
+ resultId == other.resultId;
}
@override
@@ -19401,16 +19021,13 @@
@override
bool operator ==(Object other) {
- if (other is GeneralClientCapabilities &&
- other.runtimeType == GeneralClientCapabilities) {
- return markdown == other.markdown &&
- listEqual(positionEncodings, other.positionEncodings,
- (PositionEncodingKind a, PositionEncodingKind b) => a == b) &&
- regularExpressions == other.regularExpressions &&
- staleRequestSupport == other.staleRequestSupport &&
- true;
- }
- return false;
+ return other is GeneralClientCapabilities &&
+ other.runtimeType == GeneralClientCapabilities &&
+ markdown == other.markdown &&
+ listEqual(positionEncodings, other.positionEncodings,
+ (PositionEncodingKind a, PositionEncodingKind b) => a == b) &&
+ regularExpressions == other.regularExpressions &&
+ staleRequestSupport == other.staleRequestSupport;
}
@override
@@ -19513,14 +19130,11 @@
@override
bool operator ==(Object other) {
- if (other is GeneralClientCapabilitiesStaleRequestSupport &&
- other.runtimeType == GeneralClientCapabilitiesStaleRequestSupport) {
- return cancel == other.cancel &&
- listEqual(retryOnContentModified, other.retryOnContentModified,
- (String a, String b) => a == b) &&
- true;
- }
- return false;
+ return other is GeneralClientCapabilitiesStaleRequestSupport &&
+ other.runtimeType == GeneralClientCapabilitiesStaleRequestSupport &&
+ cancel == other.cancel &&
+ listEqual(retryOnContentModified, other.retryOnContentModified,
+ (String a, String b) => a == b);
}
@override
@@ -19620,10 +19234,10 @@
@override
bool operator ==(Object other) {
- if (other is Hover && other.runtimeType == Hover) {
- return contents == other.contents && range == other.range && true;
- }
- return false;
+ return other is Hover &&
+ other.runtimeType == Hover &&
+ contents == other.contents &&
+ range == other.range;
}
@override
@@ -19713,14 +19327,11 @@
@override
bool operator ==(Object other) {
- if (other is HoverClientCapabilities &&
- other.runtimeType == HoverClientCapabilities) {
- return listEqual(contentFormat, other.contentFormat,
- (MarkupKind a, MarkupKind b) => a == b) &&
- dynamicRegistration == other.dynamicRegistration &&
- true;
- }
- return false;
+ return other is HoverClientCapabilities &&
+ other.runtimeType == HoverClientCapabilities &&
+ listEqual(contentFormat, other.contentFormat,
+ (MarkupKind a, MarkupKind b) => a == b) &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -19787,10 +19398,9 @@
@override
bool operator ==(Object other) {
- if (other is HoverOptions && other.runtimeType == HoverOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is HoverOptions &&
+ other.runtimeType == HoverOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -19916,13 +19526,11 @@
@override
bool operator ==(Object other) {
- if (other is HoverParams && other.runtimeType == HoverParams) {
- return position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is HoverParams &&
+ other.runtimeType == HoverParams &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -20018,18 +19626,14 @@
@override
bool operator ==(Object other) {
- if (other is HoverRegistrationOptions &&
- other.runtimeType == HoverRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is HoverRegistrationOptions &&
+ other.runtimeType == HoverRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -20117,13 +19721,10 @@
@override
bool operator ==(Object other) {
- if (other is ImplementationClientCapabilities &&
- other.runtimeType == ImplementationClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- linkSupport == other.linkSupport &&
- true;
- }
- return false;
+ return other is ImplementationClientCapabilities &&
+ other.runtimeType == ImplementationClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ linkSupport == other.linkSupport;
}
@override
@@ -20189,11 +19790,9 @@
@override
bool operator ==(Object other) {
- if (other is ImplementationOptions &&
- other.runtimeType == ImplementationOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is ImplementationOptions &&
+ other.runtimeType == ImplementationOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -20352,15 +19951,12 @@
@override
bool operator ==(Object other) {
- if (other is ImplementationParams &&
- other.runtimeType == ImplementationParams) {
- return partialResultToken == other.partialResultToken &&
- position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is ImplementationParams &&
+ other.runtimeType == ImplementationParams &&
+ partialResultToken == other.partialResultToken &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -20482,19 +20078,15 @@
@override
bool operator ==(Object other) {
- if (other is ImplementationRegistrationOptions &&
- other.runtimeType == ImplementationRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is ImplementationRegistrationOptions &&
+ other.runtimeType == ImplementationRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -20789,21 +20381,19 @@
@override
bool operator ==(Object other) {
- if (other is InitializeParams && other.runtimeType == InitializeParams) {
- return capabilities == other.capabilities &&
- clientInfo == other.clientInfo &&
- initializationOptions == other.initializationOptions &&
- locale == other.locale &&
- processId == other.processId &&
- rootPath == other.rootPath &&
- rootUri == other.rootUri &&
- trace == other.trace &&
- workDoneToken == other.workDoneToken &&
- listEqual(workspaceFolders, other.workspaceFolders,
- (WorkspaceFolder a, WorkspaceFolder b) => a == b) &&
- true;
- }
- return false;
+ return other is InitializeParams &&
+ other.runtimeType == InitializeParams &&
+ capabilities == other.capabilities &&
+ clientInfo == other.clientInfo &&
+ initializationOptions == other.initializationOptions &&
+ locale == other.locale &&
+ processId == other.processId &&
+ rootPath == other.rootPath &&
+ rootUri == other.rootUri &&
+ trace == other.trace &&
+ workDoneToken == other.workDoneToken &&
+ listEqual(workspaceFolders, other.workspaceFolders,
+ (WorkspaceFolder a, WorkspaceFolder b) => a == b);
}
@override
@@ -20900,11 +20490,10 @@
@override
bool operator ==(Object other) {
- if (other is InitializeParamsClientInfo &&
- other.runtimeType == InitializeParamsClientInfo) {
- return name == other.name && version == other.version && true;
- }
- return false;
+ return other is InitializeParamsClientInfo &&
+ other.runtimeType == InitializeParamsClientInfo &&
+ name == other.name &&
+ version == other.version;
}
@override
@@ -21001,12 +20590,10 @@
@override
bool operator ==(Object other) {
- if (other is InitializeResult && other.runtimeType == InitializeResult) {
- return capabilities == other.capabilities &&
- serverInfo == other.serverInfo &&
- true;
- }
- return false;
+ return other is InitializeResult &&
+ other.runtimeType == InitializeResult &&
+ capabilities == other.capabilities &&
+ serverInfo == other.serverInfo;
}
@override
@@ -21095,11 +20682,10 @@
@override
bool operator ==(Object other) {
- if (other is InitializeResultServerInfo &&
- other.runtimeType == InitializeResultServerInfo) {
- return name == other.name && version == other.version && true;
- }
- return false;
+ return other is InitializeResultServerInfo &&
+ other.runtimeType == InitializeResultServerInfo &&
+ name == other.name &&
+ version == other.version;
}
@override
@@ -21136,10 +20722,7 @@
@override
bool operator ==(Object other) {
- if (other is InitializedParams && other.runtimeType == InitializedParams) {
- return true;
- }
- return false;
+ return other is InitializedParams && other.runtimeType == InitializedParams;
}
@override
@@ -21388,19 +20971,17 @@
@override
bool operator ==(Object other) {
- if (other is InlayHint && other.runtimeType == InlayHint) {
- return data == other.data &&
- kind == other.kind &&
- label == other.label &&
- paddingLeft == other.paddingLeft &&
- paddingRight == other.paddingRight &&
- position == other.position &&
- listEqual(
- textEdits, other.textEdits, (TextEdit a, TextEdit b) => a == b) &&
- tooltip == other.tooltip &&
- true;
- }
- return false;
+ return other is InlayHint &&
+ other.runtimeType == InlayHint &&
+ data == other.data &&
+ kind == other.kind &&
+ label == other.label &&
+ paddingLeft == other.paddingLeft &&
+ paddingRight == other.paddingRight &&
+ position == other.position &&
+ listEqual(
+ textEdits, other.textEdits, (TextEdit a, TextEdit b) => a == b) &&
+ tooltip == other.tooltip;
}
@override
@@ -21498,13 +21079,10 @@
@override
bool operator ==(Object other) {
- if (other is InlayHintClientCapabilities &&
- other.runtimeType == InlayHintClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- resolveSupport == other.resolveSupport &&
- true;
- }
- return false;
+ return other is InlayHintClientCapabilities &&
+ other.runtimeType == InlayHintClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ resolveSupport == other.resolveSupport;
}
@override
@@ -21578,13 +21156,9 @@
@override
bool operator ==(Object other) {
- if (other is InlayHintClientCapabilitiesResolveSupport &&
- other.runtimeType == InlayHintClientCapabilitiesResolveSupport) {
- return listEqual(
- properties, other.properties, (String a, String b) => a == b) &&
- true;
- }
- return false;
+ return other is InlayHintClientCapabilitiesResolveSupport &&
+ other.runtimeType == InlayHintClientCapabilitiesResolveSupport &&
+ listEqual(properties, other.properties, (String a, String b) => a == b);
}
@override
@@ -21775,15 +21349,12 @@
@override
bool operator ==(Object other) {
- if (other is InlayHintLabelPart &&
- other.runtimeType == InlayHintLabelPart) {
- return command == other.command &&
- location == other.location &&
- tooltip == other.tooltip &&
- value == other.value &&
- true;
- }
- return false;
+ return other is InlayHintLabelPart &&
+ other.runtimeType == InlayHintLabelPart &&
+ command == other.command &&
+ location == other.location &&
+ tooltip == other.tooltip &&
+ value == other.value;
}
@override
@@ -21874,12 +21445,10 @@
@override
bool operator ==(Object other) {
- if (other is InlayHintOptions && other.runtimeType == InlayHintOptions) {
- return resolveProvider == other.resolveProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is InlayHintOptions &&
+ other.runtimeType == InlayHintOptions &&
+ resolveProvider == other.resolveProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -22007,13 +21576,11 @@
@override
bool operator ==(Object other) {
- if (other is InlayHintParams && other.runtimeType == InlayHintParams) {
- return range == other.range &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is InlayHintParams &&
+ other.runtimeType == InlayHintParams &&
+ range == other.range &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -22159,20 +21726,16 @@
@override
bool operator ==(Object other) {
- if (other is InlayHintRegistrationOptions &&
- other.runtimeType == InlayHintRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- resolveProvider == other.resolveProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is InlayHintRegistrationOptions &&
+ other.runtimeType == InlayHintRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ resolveProvider == other.resolveProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -22248,11 +21811,9 @@
@override
bool operator ==(Object other) {
- if (other is InlayHintWorkspaceClientCapabilities &&
- other.runtimeType == InlayHintWorkspaceClientCapabilities) {
- return refreshSupport == other.refreshSupport && true;
- }
- return false;
+ return other is InlayHintWorkspaceClientCapabilities &&
+ other.runtimeType == InlayHintWorkspaceClientCapabilities &&
+ refreshSupport == other.refreshSupport;
}
@override
@@ -22316,11 +21877,9 @@
@override
bool operator ==(Object other) {
- if (other is InlineValueClientCapabilities &&
- other.runtimeType == InlineValueClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is InlineValueClientCapabilities &&
+ other.runtimeType == InlineValueClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -22415,13 +21974,10 @@
@override
bool operator ==(Object other) {
- if (other is InlineValueContext &&
- other.runtimeType == InlineValueContext) {
- return frameId == other.frameId &&
- stoppedLocation == other.stoppedLocation &&
- true;
- }
- return false;
+ return other is InlineValueContext &&
+ other.runtimeType == InlineValueContext &&
+ frameId == other.frameId &&
+ stoppedLocation == other.stoppedLocation;
}
@override
@@ -22516,11 +22072,10 @@
@override
bool operator ==(Object other) {
- if (other is InlineValueEvaluatableExpression &&
- other.runtimeType == InlineValueEvaluatableExpression) {
- return expression == other.expression && range == other.range && true;
- }
- return false;
+ return other is InlineValueEvaluatableExpression &&
+ other.runtimeType == InlineValueEvaluatableExpression &&
+ expression == other.expression &&
+ range == other.range;
}
@override
@@ -22589,11 +22144,9 @@
@override
bool operator ==(Object other) {
- if (other is InlineValueOptions &&
- other.runtimeType == InlineValueOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is InlineValueOptions &&
+ other.runtimeType == InlineValueOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -22746,14 +22299,12 @@
@override
bool operator ==(Object other) {
- if (other is InlineValueParams && other.runtimeType == InlineValueParams) {
- return context == other.context &&
- range == other.range &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is InlineValueParams &&
+ other.runtimeType == InlineValueParams &&
+ context == other.context &&
+ range == other.range &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -22878,19 +22429,15 @@
@override
bool operator ==(Object other) {
- if (other is InlineValueRegistrationOptions &&
- other.runtimeType == InlineValueRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is InlineValueRegistrationOptions &&
+ other.runtimeType == InlineValueRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -22989,10 +22536,10 @@
@override
bool operator ==(Object other) {
- if (other is InlineValueText && other.runtimeType == InlineValueText) {
- return range == other.range && text == other.text && true;
- }
- return false;
+ return other is InlineValueText &&
+ other.runtimeType == InlineValueText &&
+ range == other.range &&
+ text == other.text;
}
@override
@@ -23113,14 +22660,11 @@
@override
bool operator ==(Object other) {
- if (other is InlineValueVariableLookup &&
- other.runtimeType == InlineValueVariableLookup) {
- return caseSensitiveLookup == other.caseSensitiveLookup &&
- range == other.range &&
- variableName == other.variableName &&
- true;
- }
- return false;
+ return other is InlineValueVariableLookup &&
+ other.runtimeType == InlineValueVariableLookup &&
+ caseSensitiveLookup == other.caseSensitiveLookup &&
+ range == other.range &&
+ variableName == other.variableName;
}
@override
@@ -23195,11 +22739,9 @@
@override
bool operator ==(Object other) {
- if (other is InlineValueWorkspaceClientCapabilities &&
- other.runtimeType == InlineValueWorkspaceClientCapabilities) {
- return refreshSupport == other.refreshSupport && true;
- }
- return false;
+ return other is InlineValueWorkspaceClientCapabilities &&
+ other.runtimeType == InlineValueWorkspaceClientCapabilities &&
+ refreshSupport == other.refreshSupport;
}
@override
@@ -23320,13 +22862,11 @@
@override
bool operator ==(Object other) {
- if (other is InsertReplaceEdit && other.runtimeType == InsertReplaceEdit) {
- return insert == other.insert &&
- newText == other.newText &&
- replace == other.replace &&
- true;
- }
- return false;
+ return other is InsertReplaceEdit &&
+ other.runtimeType == InsertReplaceEdit &&
+ insert == other.insert &&
+ newText == other.newText &&
+ replace == other.replace;
}
@override
@@ -23484,11 +23024,9 @@
@override
bool operator ==(Object other) {
- if (other is LinkedEditingRangeClientCapabilities &&
- other.runtimeType == LinkedEditingRangeClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is LinkedEditingRangeClientCapabilities &&
+ other.runtimeType == LinkedEditingRangeClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -23552,11 +23090,9 @@
@override
bool operator ==(Object other) {
- if (other is LinkedEditingRangeOptions &&
- other.runtimeType == LinkedEditingRangeOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is LinkedEditingRangeOptions &&
+ other.runtimeType == LinkedEditingRangeOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -23681,14 +23217,11 @@
@override
bool operator ==(Object other) {
- if (other is LinkedEditingRangeParams &&
- other.runtimeType == LinkedEditingRangeParams) {
- return position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is LinkedEditingRangeParams &&
+ other.runtimeType == LinkedEditingRangeParams &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -23811,19 +23344,15 @@
@override
bool operator ==(Object other) {
- if (other is LinkedEditingRangeRegistrationOptions &&
- other.runtimeType == LinkedEditingRangeRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is LinkedEditingRangeRegistrationOptions &&
+ other.runtimeType == LinkedEditingRangeRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -23923,13 +23452,10 @@
@override
bool operator ==(Object other) {
- if (other is LinkedEditingRanges &&
- other.runtimeType == LinkedEditingRanges) {
- return listEqual(ranges, other.ranges, (Range a, Range b) => a == b) &&
- wordPattern == other.wordPattern &&
- true;
- }
- return false;
+ return other is LinkedEditingRanges &&
+ other.runtimeType == LinkedEditingRanges &&
+ listEqual(ranges, other.ranges, (Range a, Range b) => a == b) &&
+ wordPattern == other.wordPattern;
}
@override
@@ -24022,10 +23548,10 @@
@override
bool operator ==(Object other) {
- if (other is Location && other.runtimeType == Location) {
- return range == other.range && uri == other.uri && true;
- }
- return false;
+ return other is Location &&
+ other.runtimeType == Location &&
+ range == other.range &&
+ uri == other.uri;
}
@override
@@ -24181,14 +23707,12 @@
@override
bool operator ==(Object other) {
- if (other is LocationLink && other.runtimeType == LocationLink) {
- return originSelectionRange == other.originSelectionRange &&
- targetRange == other.targetRange &&
- targetSelectionRange == other.targetSelectionRange &&
- targetUri == other.targetUri &&
- true;
- }
- return false;
+ return other is LocationLink &&
+ other.runtimeType == LocationLink &&
+ originSelectionRange == other.originSelectionRange &&
+ targetRange == other.targetRange &&
+ targetSelectionRange == other.targetSelectionRange &&
+ targetUri == other.targetUri;
}
@override
@@ -24286,10 +23810,10 @@
@override
bool operator ==(Object other) {
- if (other is LogMessageParams && other.runtimeType == LogMessageParams) {
- return message == other.message && type == other.type && true;
- }
- return false;
+ return other is LogMessageParams &&
+ other.runtimeType == LogMessageParams &&
+ message == other.message &&
+ type == other.type;
}
@override
@@ -24375,10 +23899,10 @@
@override
bool operator ==(Object other) {
- if (other is LogTraceParams && other.runtimeType == LogTraceParams) {
- return message == other.message && verbose == other.verbose && true;
- }
- return false;
+ return other is LogTraceParams &&
+ other.runtimeType == LogTraceParams &&
+ message == other.message &&
+ verbose == other.verbose;
}
@override
@@ -24496,15 +24020,12 @@
@override
bool operator ==(Object other) {
- if (other is MarkdownClientCapabilities &&
- other.runtimeType == MarkdownClientCapabilities) {
- return listEqual(
- allowedTags, other.allowedTags, (String a, String b) => a == b) &&
- parser == other.parser &&
- version == other.version &&
- true;
- }
- return false;
+ return other is MarkdownClientCapabilities &&
+ other.runtimeType == MarkdownClientCapabilities &&
+ listEqual(
+ allowedTags, other.allowedTags, (String a, String b) => a == b) &&
+ parser == other.parser &&
+ version == other.version;
}
@override
@@ -24624,10 +24145,10 @@
@override
bool operator ==(Object other) {
- if (other is MarkupContent && other.runtimeType == MarkupContent) {
- return kind == other.kind && value == other.value && true;
- }
- return false;
+ return other is MarkupContent &&
+ other.runtimeType == MarkupContent &&
+ kind == other.kind &&
+ value == other.value;
}
@override
@@ -24736,10 +24257,9 @@
@override
bool operator ==(Object other) {
- if (other is MessageActionItem && other.runtimeType == MessageActionItem) {
- return title == other.title && true;
- }
- return false;
+ return other is MessageActionItem &&
+ other.runtimeType == MessageActionItem &&
+ title == other.title;
}
@override
@@ -25247,14 +24767,12 @@
@override
bool operator ==(Object other) {
- if (other is Moniker && other.runtimeType == Moniker) {
- return identifier == other.identifier &&
- kind == other.kind &&
- scheme == other.scheme &&
- unique == other.unique &&
- true;
- }
- return false;
+ return other is Moniker &&
+ other.runtimeType == Moniker &&
+ identifier == other.identifier &&
+ kind == other.kind &&
+ scheme == other.scheme &&
+ unique == other.unique;
}
@override
@@ -25324,11 +24842,9 @@
@override
bool operator ==(Object other) {
- if (other is MonikerClientCapabilities &&
- other.runtimeType == MonikerClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is MonikerClientCapabilities &&
+ other.runtimeType == MonikerClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -25428,10 +24944,9 @@
@override
bool operator ==(Object other) {
- if (other is MonikerOptions && other.runtimeType == MonikerOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is MonikerOptions &&
+ other.runtimeType == MonikerOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -25590,14 +25105,12 @@
@override
bool operator ==(Object other) {
- if (other is MonikerParams && other.runtimeType == MonikerParams) {
- return partialResultToken == other.partialResultToken &&
- position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is MonikerParams &&
+ other.runtimeType == MonikerParams &&
+ partialResultToken == other.partialResultToken &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -25693,18 +25206,14 @@
@override
bool operator ==(Object other) {
- if (other is MonikerRegistrationOptions &&
- other.runtimeType == MonikerRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is MonikerRegistrationOptions &&
+ other.runtimeType == MonikerRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -25842,14 +25351,12 @@
@override
bool operator ==(Object other) {
- if (other is NotebookCell && other.runtimeType == NotebookCell) {
- return document == other.document &&
- executionSummary == other.executionSummary &&
- kind == other.kind &&
- metadata == other.metadata &&
- true;
- }
- return false;
+ return other is NotebookCell &&
+ other.runtimeType == NotebookCell &&
+ document == other.document &&
+ executionSummary == other.executionSummary &&
+ kind == other.kind &&
+ metadata == other.metadata;
}
@override
@@ -25973,15 +25480,12 @@
@override
bool operator ==(Object other) {
- if (other is NotebookCellArrayChange &&
- other.runtimeType == NotebookCellArrayChange) {
- return listEqual(
- cells, other.cells, (NotebookCell a, NotebookCell b) => a == b) &&
- deleteCount == other.deleteCount &&
- start == other.start &&
- true;
- }
- return false;
+ return other is NotebookCellArrayChange &&
+ other.runtimeType == NotebookCellArrayChange &&
+ listEqual(
+ cells, other.cells, (NotebookCell a, NotebookCell b) => a == b) &&
+ deleteCount == other.deleteCount &&
+ start == other.start;
}
@override
@@ -26134,11 +25638,10 @@
@override
bool operator ==(Object other) {
- if (other is NotebookCellTextDocumentFilter &&
- other.runtimeType == NotebookCellTextDocumentFilter) {
- return language == other.language && notebook == other.notebook && true;
- }
- return false;
+ return other is NotebookCellTextDocumentFilter &&
+ other.runtimeType == NotebookCellTextDocumentFilter &&
+ language == other.language &&
+ notebook == other.notebook;
}
@override
@@ -26304,16 +25807,14 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocument && other.runtimeType == NotebookDocument) {
- return listEqual(
- cells, other.cells, (NotebookCell a, NotebookCell b) => a == b) &&
- metadata == other.metadata &&
- notebookType == other.notebookType &&
- uri == other.uri &&
- version == other.version &&
- true;
- }
- return false;
+ return other is NotebookDocument &&
+ other.runtimeType == NotebookDocument &&
+ listEqual(
+ cells, other.cells, (NotebookCell a, NotebookCell b) => a == b) &&
+ metadata == other.metadata &&
+ notebookType == other.notebookType &&
+ uri == other.uri &&
+ version == other.version;
}
@override
@@ -26399,11 +25900,10 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentChangeEvent &&
- other.runtimeType == NotebookDocumentChangeEvent) {
- return cells == other.cells && metadata == other.metadata && true;
- }
- return false;
+ return other is NotebookDocumentChangeEvent &&
+ other.runtimeType == NotebookDocumentChangeEvent &&
+ cells == other.cells &&
+ metadata == other.metadata;
}
@override
@@ -26526,20 +26026,17 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentChangeEventCells &&
- other.runtimeType == NotebookDocumentChangeEventCells) {
- return listEqual(
- data, other.data, (NotebookCell a, NotebookCell b) => a == b) &&
- structure == other.structure &&
- listEqual(
- textContent,
- other.textContent,
- (NotebookDocumentChangeEventCellsTextContent a,
- NotebookDocumentChangeEventCellsTextContent b) =>
- a == b) &&
- true;
- }
- return false;
+ return other is NotebookDocumentChangeEventCells &&
+ other.runtimeType == NotebookDocumentChangeEventCells &&
+ listEqual(
+ data, other.data, (NotebookCell a, NotebookCell b) => a == b) &&
+ structure == other.structure &&
+ listEqual(
+ textContent,
+ other.textContent,
+ (NotebookDocumentChangeEventCellsTextContent a,
+ NotebookDocumentChangeEventCellsTextContent b) =>
+ a == b);
}
@override
@@ -26663,16 +26160,13 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentChangeEventCellsStructure &&
- other.runtimeType == NotebookDocumentChangeEventCellsStructure) {
- return array == other.array &&
- listEqual(didClose, other.didClose,
- (TextDocumentIdentifier a, TextDocumentIdentifier b) => a == b) &&
- listEqual(didOpen, other.didOpen,
- (TextDocumentItem a, TextDocumentItem b) => a == b) &&
- true;
- }
- return false;
+ return other is NotebookDocumentChangeEventCellsStructure &&
+ other.runtimeType == NotebookDocumentChangeEventCellsStructure &&
+ array == other.array &&
+ listEqual(didClose, other.didClose,
+ (TextDocumentIdentifier a, TextDocumentIdentifier b) => a == b) &&
+ listEqual(didOpen, other.didOpen,
+ (TextDocumentItem a, TextDocumentItem b) => a == b);
}
@override
@@ -26786,22 +26280,19 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentChangeEventCellsTextContent &&
- other.runtimeType == NotebookDocumentChangeEventCellsTextContent) {
- return listEqual(
- changes,
- other.changes,
- (Either2<TextDocumentContentChangeEvent1,
- TextDocumentContentChangeEvent2>
- a,
- Either2<TextDocumentContentChangeEvent1,
- TextDocumentContentChangeEvent2>
- b) =>
- a == b) &&
- document == other.document &&
- true;
- }
- return false;
+ return other is NotebookDocumentChangeEventCellsTextContent &&
+ other.runtimeType == NotebookDocumentChangeEventCellsTextContent &&
+ listEqual(
+ changes,
+ other.changes,
+ (Either2<TextDocumentContentChangeEvent1,
+ TextDocumentContentChangeEvent2>
+ a,
+ Either2<TextDocumentContentChangeEvent1,
+ TextDocumentContentChangeEvent2>
+ b) =>
+ a == b) &&
+ document == other.document;
}
@override
@@ -26880,11 +26371,9 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentClientCapabilities &&
- other.runtimeType == NotebookDocumentClientCapabilities) {
- return synchronization == other.synchronization && true;
- }
- return false;
+ return other is NotebookDocumentClientCapabilities &&
+ other.runtimeType == NotebookDocumentClientCapabilities &&
+ synchronization == other.synchronization;
}
@override
@@ -26990,14 +26479,11 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentFilter1 &&
- other.runtimeType == NotebookDocumentFilter1) {
- return notebookType == other.notebookType &&
- pattern == other.pattern &&
- scheme == other.scheme &&
- true;
- }
- return false;
+ return other is NotebookDocumentFilter1 &&
+ other.runtimeType == NotebookDocumentFilter1 &&
+ notebookType == other.notebookType &&
+ pattern == other.pattern &&
+ scheme == other.scheme;
}
@override
@@ -27107,14 +26593,11 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentFilter2 &&
- other.runtimeType == NotebookDocumentFilter2) {
- return notebookType == other.notebookType &&
- pattern == other.pattern &&
- scheme == other.scheme &&
- true;
- }
- return false;
+ return other is NotebookDocumentFilter2 &&
+ other.runtimeType == NotebookDocumentFilter2 &&
+ notebookType == other.notebookType &&
+ pattern == other.pattern &&
+ scheme == other.scheme;
}
@override
@@ -27224,14 +26707,11 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentFilter3 &&
- other.runtimeType == NotebookDocumentFilter3) {
- return notebookType == other.notebookType &&
- pattern == other.pattern &&
- scheme == other.scheme &&
- true;
- }
- return false;
+ return other is NotebookDocumentFilter3 &&
+ other.runtimeType == NotebookDocumentFilter3 &&
+ notebookType == other.notebookType &&
+ pattern == other.pattern &&
+ scheme == other.scheme;
}
@override
@@ -27304,11 +26784,9 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentIdentifier &&
- other.runtimeType == NotebookDocumentIdentifier) {
- return uri == other.uri && true;
- }
- return false;
+ return other is NotebookDocumentIdentifier &&
+ other.runtimeType == NotebookDocumentIdentifier &&
+ uri == other.uri;
}
@override
@@ -27397,13 +26875,10 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentSyncClientCapabilities &&
- other.runtimeType == NotebookDocumentSyncClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- executionSummarySupport == other.executionSummarySupport &&
- true;
- }
- return false;
+ return other is NotebookDocumentSyncClientCapabilities &&
+ other.runtimeType == NotebookDocumentSyncClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ executionSummarySupport == other.executionSummarySupport;
}
@override
@@ -27526,22 +27001,19 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentSyncOptions &&
- other.runtimeType == NotebookDocumentSyncOptions) {
- return listEqual(
- notebookSelector,
- other.notebookSelector,
- (Either2<NotebookDocumentSyncOptionsNotebookSelector,
- NotebookDocumentSyncOptionsNotebookSelector2>
- a,
- Either2<NotebookDocumentSyncOptionsNotebookSelector,
- NotebookDocumentSyncOptionsNotebookSelector2>
- b) =>
- a == b) &&
- save == other.save &&
- true;
- }
- return false;
+ return other is NotebookDocumentSyncOptions &&
+ other.runtimeType == NotebookDocumentSyncOptions &&
+ listEqual(
+ notebookSelector,
+ other.notebookSelector,
+ (Either2<NotebookDocumentSyncOptionsNotebookSelector,
+ NotebookDocumentSyncOptionsNotebookSelector2>
+ a,
+ Either2<NotebookDocumentSyncOptionsNotebookSelector,
+ NotebookDocumentSyncOptionsNotebookSelector2>
+ b) =>
+ a == b) &&
+ save == other.save;
}
@override
@@ -27663,18 +27135,15 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentSyncOptionsNotebookSelector &&
- other.runtimeType == NotebookDocumentSyncOptionsNotebookSelector) {
- return listEqual(
- cells,
- other.cells,
- (NotebookDocumentSyncOptionsNotebookSelectorCells a,
- NotebookDocumentSyncOptionsNotebookSelectorCells b) =>
- a == b) &&
- notebook == other.notebook &&
- true;
- }
- return false;
+ return other is NotebookDocumentSyncOptionsNotebookSelector &&
+ other.runtimeType == NotebookDocumentSyncOptionsNotebookSelector &&
+ listEqual(
+ cells,
+ other.cells,
+ (NotebookDocumentSyncOptionsNotebookSelectorCells a,
+ NotebookDocumentSyncOptionsNotebookSelectorCells b) =>
+ a == b) &&
+ notebook == other.notebook;
}
@override
@@ -27798,18 +27267,15 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentSyncOptionsNotebookSelector2 &&
- other.runtimeType == NotebookDocumentSyncOptionsNotebookSelector2) {
- return listEqual(
- cells,
- other.cells,
- (NotebookDocumentSyncOptionsNotebookSelector2Cells a,
- NotebookDocumentSyncOptionsNotebookSelector2Cells b) =>
- a == b) &&
- notebook == other.notebook &&
- true;
- }
- return false;
+ return other is NotebookDocumentSyncOptionsNotebookSelector2 &&
+ other.runtimeType == NotebookDocumentSyncOptionsNotebookSelector2 &&
+ listEqual(
+ cells,
+ other.cells,
+ (NotebookDocumentSyncOptionsNotebookSelector2Cells a,
+ NotebookDocumentSyncOptionsNotebookSelector2Cells b) =>
+ a == b) &&
+ notebook == other.notebook;
}
@override
@@ -27879,12 +27345,10 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentSyncOptionsNotebookSelector2Cells &&
+ return other is NotebookDocumentSyncOptionsNotebookSelector2Cells &&
other.runtimeType ==
- NotebookDocumentSyncOptionsNotebookSelector2Cells) {
- return language == other.language && true;
- }
- return false;
+ NotebookDocumentSyncOptionsNotebookSelector2Cells &&
+ language == other.language;
}
@override
@@ -27951,11 +27415,9 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentSyncOptionsNotebookSelectorCells &&
- other.runtimeType == NotebookDocumentSyncOptionsNotebookSelectorCells) {
- return language == other.language && true;
- }
- return false;
+ return other is NotebookDocumentSyncOptionsNotebookSelectorCells &&
+ other.runtimeType == NotebookDocumentSyncOptionsNotebookSelectorCells &&
+ language == other.language;
}
@override
@@ -28094,23 +27556,20 @@
@override
bool operator ==(Object other) {
- if (other is NotebookDocumentSyncRegistrationOptions &&
- other.runtimeType == NotebookDocumentSyncRegistrationOptions) {
- return id == other.id &&
- listEqual(
- notebookSelector,
- other.notebookSelector,
- (Either2<NotebookDocumentSyncOptionsNotebookSelector,
- NotebookDocumentSyncOptionsNotebookSelector2>
- a,
- Either2<NotebookDocumentSyncOptionsNotebookSelector,
- NotebookDocumentSyncOptionsNotebookSelector2>
- b) =>
- a == b) &&
- save == other.save &&
- true;
- }
- return false;
+ return other is NotebookDocumentSyncRegistrationOptions &&
+ other.runtimeType == NotebookDocumentSyncRegistrationOptions &&
+ id == other.id &&
+ listEqual(
+ notebookSelector,
+ other.notebookSelector,
+ (Either2<NotebookDocumentSyncOptionsNotebookSelector,
+ NotebookDocumentSyncOptionsNotebookSelector2>
+ a,
+ Either2<NotebookDocumentSyncOptionsNotebookSelector,
+ NotebookDocumentSyncOptionsNotebookSelector2>
+ b) =>
+ a == b) &&
+ save == other.save;
}
@override
@@ -28213,11 +27672,10 @@
@override
bool operator ==(Object other) {
- if (other is OptionalVersionedTextDocumentIdentifier &&
- other.runtimeType == OptionalVersionedTextDocumentIdentifier) {
- return uri == other.uri && version == other.version && true;
- }
- return false;
+ return other is OptionalVersionedTextDocumentIdentifier &&
+ other.runtimeType == OptionalVersionedTextDocumentIdentifier &&
+ uri == other.uri &&
+ version == other.version;
}
@override
@@ -28328,13 +27786,10 @@
@override
bool operator ==(Object other) {
- if (other is ParameterInformation &&
- other.runtimeType == ParameterInformation) {
- return documentation == other.documentation &&
- label == other.label &&
- true;
- }
- return false;
+ return other is ParameterInformation &&
+ other.runtimeType == ParameterInformation &&
+ documentation == other.documentation &&
+ label == other.label;
}
@override
@@ -28484,11 +27939,9 @@
@override
bool operator ==(Object other) {
- if (other is PartialResultParams &&
- other.runtimeType == PartialResultParams) {
- return partialResultToken == other.partialResultToken && true;
- }
- return false;
+ return other is PartialResultParams &&
+ other.runtimeType == PartialResultParams &&
+ partialResultToken == other.partialResultToken;
}
@override
@@ -28577,11 +28030,10 @@
@override
bool operator ==(Object other) {
- if (other is PlaceholderAndRange &&
- other.runtimeType == PlaceholderAndRange) {
- return placeholder == other.placeholder && range == other.range && true;
- }
- return false;
+ return other is PlaceholderAndRange &&
+ other.runtimeType == PlaceholderAndRange &&
+ placeholder == other.placeholder &&
+ range == other.range;
}
@override
@@ -28712,10 +28164,10 @@
@override
bool operator ==(Object other) {
- if (other is Position && other.runtimeType == Position) {
- return character == other.character && line == other.line && true;
- }
- return false;
+ return other is Position &&
+ other.runtimeType == Position &&
+ character == other.character &&
+ line == other.line;
}
@override
@@ -28885,14 +28337,11 @@
@override
bool operator ==(Object other) {
- if (other is PrepareRenameParams &&
- other.runtimeType == PrepareRenameParams) {
- return position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is PrepareRenameParams &&
+ other.runtimeType == PrepareRenameParams &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -28961,11 +28410,9 @@
@override
bool operator ==(Object other) {
- if (other is PrepareRenameResult2 &&
- other.runtimeType == PrepareRenameResult2) {
- return defaultBehavior == other.defaultBehavior && true;
- }
- return false;
+ return other is PrepareRenameResult2 &&
+ other.runtimeType == PrepareRenameResult2 &&
+ defaultBehavior == other.defaultBehavior;
}
@override
@@ -29088,10 +28535,10 @@
@override
bool operator ==(Object other) {
- if (other is PreviousResultId && other.runtimeType == PreviousResultId) {
- return uri == other.uri && value == other.value && true;
- }
- return false;
+ return other is PreviousResultId &&
+ other.runtimeType == PreviousResultId &&
+ uri == other.uri &&
+ value == other.value;
}
@override
@@ -29172,10 +28619,10 @@
@override
bool operator ==(Object other) {
- if (other is ProgressParams && other.runtimeType == ProgressParams) {
- return token == other.token && value == other.value && true;
- }
- return false;
+ return other is ProgressParams &&
+ other.runtimeType == ProgressParams &&
+ token == other.token &&
+ value == other.value;
}
@override
@@ -29339,16 +28786,13 @@
@override
bool operator ==(Object other) {
- if (other is PublishDiagnosticsClientCapabilities &&
- other.runtimeType == PublishDiagnosticsClientCapabilities) {
- return codeDescriptionSupport == other.codeDescriptionSupport &&
- dataSupport == other.dataSupport &&
- relatedInformation == other.relatedInformation &&
- tagSupport == other.tagSupport &&
- versionSupport == other.versionSupport &&
- true;
- }
- return false;
+ return other is PublishDiagnosticsClientCapabilities &&
+ other.runtimeType == PublishDiagnosticsClientCapabilities &&
+ codeDescriptionSupport == other.codeDescriptionSupport &&
+ dataSupport == other.dataSupport &&
+ relatedInformation == other.relatedInformation &&
+ tagSupport == other.tagSupport &&
+ versionSupport == other.versionSupport;
}
@override
@@ -29425,13 +28869,10 @@
@override
bool operator ==(Object other) {
- if (other is PublishDiagnosticsClientCapabilitiesTagSupport &&
- other.runtimeType == PublishDiagnosticsClientCapabilitiesTagSupport) {
- return listEqual(valueSet, other.valueSet,
- (DiagnosticTag a, DiagnosticTag b) => a == b) &&
- true;
- }
- return false;
+ return other is PublishDiagnosticsClientCapabilitiesTagSupport &&
+ other.runtimeType == PublishDiagnosticsClientCapabilitiesTagSupport &&
+ listEqual(valueSet, other.valueSet,
+ (DiagnosticTag a, DiagnosticTag b) => a == b);
}
@override
@@ -29550,15 +28991,12 @@
@override
bool operator ==(Object other) {
- if (other is PublishDiagnosticsParams &&
- other.runtimeType == PublishDiagnosticsParams) {
- return listEqual(diagnostics, other.diagnostics,
- (Diagnostic a, Diagnostic b) => a == b) &&
- uri == other.uri &&
- version == other.version &&
- true;
- }
- return false;
+ return other is PublishDiagnosticsParams &&
+ other.runtimeType == PublishDiagnosticsParams &&
+ listEqual(diagnostics, other.diagnostics,
+ (Diagnostic a, Diagnostic b) => a == b) &&
+ uri == other.uri &&
+ version == other.version;
}
@override
@@ -29666,10 +29104,10 @@
@override
bool operator ==(Object other) {
- if (other is Range && other.runtimeType == Range) {
- return end == other.end && start == other.start && true;
- }
- return false;
+ return other is Range &&
+ other.runtimeType == Range &&
+ end == other.end &&
+ start == other.start;
}
@override
@@ -29733,11 +29171,9 @@
@override
bool operator ==(Object other) {
- if (other is ReferenceClientCapabilities &&
- other.runtimeType == ReferenceClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is ReferenceClientCapabilities &&
+ other.runtimeType == ReferenceClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -29805,10 +29241,9 @@
@override
bool operator ==(Object other) {
- if (other is ReferenceContext && other.runtimeType == ReferenceContext) {
- return includeDeclaration == other.includeDeclaration && true;
- }
- return false;
+ return other is ReferenceContext &&
+ other.runtimeType == ReferenceContext &&
+ includeDeclaration == other.includeDeclaration;
}
@override
@@ -29872,10 +29307,9 @@
@override
bool operator ==(Object other) {
- if (other is ReferenceOptions && other.runtimeType == ReferenceOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is ReferenceOptions &&
+ other.runtimeType == ReferenceOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -30061,15 +29495,13 @@
@override
bool operator ==(Object other) {
- if (other is ReferenceParams && other.runtimeType == ReferenceParams) {
- return context == other.context &&
- partialResultToken == other.partialResultToken &&
- position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is ReferenceParams &&
+ other.runtimeType == ReferenceParams &&
+ context == other.context &&
+ partialResultToken == other.partialResultToken &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -30167,18 +29599,14 @@
@override
bool operator ==(Object other) {
- if (other is ReferenceRegistrationOptions &&
- other.runtimeType == ReferenceRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is ReferenceRegistrationOptions &&
+ other.runtimeType == ReferenceRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -30286,13 +29714,11 @@
@override
bool operator ==(Object other) {
- if (other is Registration && other.runtimeType == Registration) {
- return id == other.id &&
- method == other.method &&
- registerOptions == other.registerOptions &&
- true;
- }
- return false;
+ return other is Registration &&
+ other.runtimeType == Registration &&
+ id == other.id &&
+ method == other.method &&
+ registerOptions == other.registerOptions;
}
@override
@@ -30366,13 +29792,10 @@
@override
bool operator ==(Object other) {
- if (other is RegistrationParams &&
- other.runtimeType == RegistrationParams) {
- return listEqual(registrations, other.registrations,
- (Registration a, Registration b) => a == b) &&
- true;
- }
- return false;
+ return other is RegistrationParams &&
+ other.runtimeType == RegistrationParams &&
+ listEqual(registrations, other.registrations,
+ (Registration a, Registration b) => a == b);
}
@override
@@ -30463,11 +29886,10 @@
@override
bool operator ==(Object other) {
- if (other is RegularExpressionsClientCapabilities &&
- other.runtimeType == RegularExpressionsClientCapabilities) {
- return engine == other.engine && version == other.version && true;
- }
- return false;
+ return other is RegularExpressionsClientCapabilities &&
+ other.runtimeType == RegularExpressionsClientCapabilities &&
+ engine == other.engine &&
+ version == other.version;
}
@override
@@ -30649,25 +30071,21 @@
@override
bool operator ==(Object other) {
- if (other is RelatedFullDocumentDiagnosticReport &&
- other.runtimeType == RelatedFullDocumentDiagnosticReport) {
- return listEqual(
- items, other.items, (Diagnostic a, Diagnostic b) => a == b) &&
- kind == other.kind &&
- mapEqual(
- relatedDocuments,
- other.relatedDocuments,
- (Either2<FullDocumentDiagnosticReport,
- UnchangedDocumentDiagnosticReport>
- a,
- Either2<FullDocumentDiagnosticReport,
- UnchangedDocumentDiagnosticReport>
- b) =>
- a == b) &&
- resultId == other.resultId &&
- true;
- }
- return false;
+ return other is RelatedFullDocumentDiagnosticReport &&
+ other.runtimeType == RelatedFullDocumentDiagnosticReport &&
+ listEqual(items, other.items, (Diagnostic a, Diagnostic b) => a == b) &&
+ kind == other.kind &&
+ mapEqual(
+ relatedDocuments,
+ other.relatedDocuments,
+ (Either2<FullDocumentDiagnosticReport,
+ UnchangedDocumentDiagnosticReport>
+ a,
+ Either2<FullDocumentDiagnosticReport,
+ UnchangedDocumentDiagnosticReport>
+ b) =>
+ a == b) &&
+ resultId == other.resultId;
}
@override
@@ -30828,23 +30246,20 @@
@override
bool operator ==(Object other) {
- if (other is RelatedUnchangedDocumentDiagnosticReport &&
- other.runtimeType == RelatedUnchangedDocumentDiagnosticReport) {
- return kind == other.kind &&
- mapEqual(
- relatedDocuments,
- other.relatedDocuments,
- (Either2<FullDocumentDiagnosticReport,
- UnchangedDocumentDiagnosticReport>
- a,
- Either2<FullDocumentDiagnosticReport,
- UnchangedDocumentDiagnosticReport>
- b) =>
- a == b) &&
- resultId == other.resultId &&
- true;
- }
- return false;
+ return other is RelatedUnchangedDocumentDiagnosticReport &&
+ other.runtimeType == RelatedUnchangedDocumentDiagnosticReport &&
+ kind == other.kind &&
+ mapEqual(
+ relatedDocuments,
+ other.relatedDocuments,
+ (Either2<FullDocumentDiagnosticReport,
+ UnchangedDocumentDiagnosticReport>
+ a,
+ Either2<FullDocumentDiagnosticReport,
+ UnchangedDocumentDiagnosticReport>
+ b) =>
+ a == b) &&
+ resultId == other.resultId;
}
@override
@@ -30953,10 +30368,10 @@
@override
bool operator ==(Object other) {
- if (other is RelativePattern && other.runtimeType == RelativePattern) {
- return baseUri == other.baseUri && pattern == other.pattern && true;
- }
- return false;
+ return other is RelativePattern &&
+ other.runtimeType == RelativePattern &&
+ baseUri == other.baseUri &&
+ pattern == other.pattern;
}
@override
@@ -31101,16 +30516,12 @@
@override
bool operator ==(Object other) {
- if (other is RenameClientCapabilities &&
- other.runtimeType == RenameClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- honorsChangeAnnotations == other.honorsChangeAnnotations &&
- prepareSupport == other.prepareSupport &&
- prepareSupportDefaultBehavior ==
- other.prepareSupportDefaultBehavior &&
- true;
- }
- return false;
+ return other is RenameClientCapabilities &&
+ other.runtimeType == RenameClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ honorsChangeAnnotations == other.honorsChangeAnnotations &&
+ prepareSupport == other.prepareSupport &&
+ prepareSupportDefaultBehavior == other.prepareSupportDefaultBehavior;
}
@override
@@ -31284,15 +30695,13 @@
@override
bool operator ==(Object other) {
- if (other is RenameFile && other.runtimeType == RenameFile) {
- return annotationId == other.annotationId &&
- kind == other.kind &&
- newUri == other.newUri &&
- oldUri == other.oldUri &&
- options == other.options &&
- true;
- }
- return false;
+ return other is RenameFile &&
+ other.runtimeType == RenameFile &&
+ annotationId == other.annotationId &&
+ kind == other.kind &&
+ newUri == other.newUri &&
+ oldUri == other.oldUri &&
+ options == other.options;
}
@override
@@ -31379,12 +30788,10 @@
@override
bool operator ==(Object other) {
- if (other is RenameFileOptions && other.runtimeType == RenameFileOptions) {
- return ignoreIfExists == other.ignoreIfExists &&
- overwrite == other.overwrite &&
- true;
- }
- return false;
+ return other is RenameFileOptions &&
+ other.runtimeType == RenameFileOptions &&
+ ignoreIfExists == other.ignoreIfExists &&
+ overwrite == other.overwrite;
}
@override
@@ -31461,12 +30868,9 @@
@override
bool operator ==(Object other) {
- if (other is RenameFilesParams && other.runtimeType == RenameFilesParams) {
- return listEqual(
- files, other.files, (FileRename a, FileRename b) => a == b) &&
- true;
- }
- return false;
+ return other is RenameFilesParams &&
+ other.runtimeType == RenameFilesParams &&
+ listEqual(files, other.files, (FileRename a, FileRename b) => a == b);
}
@override
@@ -31551,12 +30955,10 @@
@override
bool operator ==(Object other) {
- if (other is RenameOptions && other.runtimeType == RenameOptions) {
- return prepareProvider == other.prepareProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is RenameOptions &&
+ other.runtimeType == RenameOptions &&
+ prepareProvider == other.prepareProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -31709,14 +31111,12 @@
@override
bool operator ==(Object other) {
- if (other is RenameParams && other.runtimeType == RenameParams) {
- return newName == other.newName &&
- position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is RenameParams &&
+ other.runtimeType == RenameParams &&
+ newName == other.newName &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -31836,19 +31236,15 @@
@override
bool operator ==(Object other) {
- if (other is RenameRegistrationOptions &&
- other.runtimeType == RenameRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- prepareProvider == other.prepareProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is RenameRegistrationOptions &&
+ other.runtimeType == RenameRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ prepareProvider == other.prepareProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -31950,10 +31346,10 @@
@override
bool operator ==(Object other) {
- if (other is ResourceOperation && other.runtimeType == ResourceOperation) {
- return annotationId == other.annotationId && kind == other.kind && true;
- }
- return false;
+ return other is ResourceOperation &&
+ other.runtimeType == ResourceOperation &&
+ annotationId == other.annotationId &&
+ kind == other.kind;
}
@override
@@ -32060,10 +31456,9 @@
@override
bool operator ==(Object other) {
- if (other is SaveOptions && other.runtimeType == SaveOptions) {
- return includeText == other.includeText && true;
- }
- return false;
+ return other is SaveOptions &&
+ other.runtimeType == SaveOptions &&
+ includeText == other.includeText;
}
@override
@@ -32154,10 +31549,10 @@
@override
bool operator ==(Object other) {
- if (other is SelectionRange && other.runtimeType == SelectionRange) {
- return parent == other.parent && range == other.range && true;
- }
- return false;
+ return other is SelectionRange &&
+ other.runtimeType == SelectionRange &&
+ parent == other.parent &&
+ range == other.range;
}
@override
@@ -32223,11 +31618,9 @@
@override
bool operator ==(Object other) {
- if (other is SelectionRangeClientCapabilities &&
- other.runtimeType == SelectionRangeClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is SelectionRangeClientCapabilities &&
+ other.runtimeType == SelectionRangeClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -32290,11 +31683,9 @@
@override
bool operator ==(Object other) {
- if (other is SelectionRangeOptions &&
- other.runtimeType == SelectionRangeOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is SelectionRangeOptions &&
+ other.runtimeType == SelectionRangeOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -32451,16 +31842,13 @@
@override
bool operator ==(Object other) {
- if (other is SelectionRangeParams &&
- other.runtimeType == SelectionRangeParams) {
- return partialResultToken == other.partialResultToken &&
- listEqual(
- positions, other.positions, (Position a, Position b) => a == b) &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is SelectionRangeParams &&
+ other.runtimeType == SelectionRangeParams &&
+ partialResultToken == other.partialResultToken &&
+ listEqual(
+ positions, other.positions, (Position a, Position b) => a == b) &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -32582,19 +31970,15 @@
@override
bool operator ==(Object other) {
- if (other is SelectionRangeRegistrationOptions &&
- other.runtimeType == SelectionRangeRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is SelectionRangeRegistrationOptions &&
+ other.runtimeType == SelectionRangeRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -32785,12 +32169,10 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokens && other.runtimeType == SemanticTokens) {
- return listEqual(data, other.data, (int a, int b) => a == b) &&
- resultId == other.resultId &&
- true;
- }
- return false;
+ return other is SemanticTokens &&
+ other.runtimeType == SemanticTokens &&
+ listEqual(data, other.data, (int a, int b) => a == b) &&
+ resultId == other.resultId;
}
@override
@@ -33072,23 +32454,19 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensClientCapabilities &&
- other.runtimeType == SemanticTokensClientCapabilities) {
- return augmentsSyntaxTokens == other.augmentsSyntaxTokens &&
- dynamicRegistration == other.dynamicRegistration &&
- listEqual(formats, other.formats,
- (TokenFormat a, TokenFormat b) => a == b) &&
- multilineTokenSupport == other.multilineTokenSupport &&
- overlappingTokenSupport == other.overlappingTokenSupport &&
- requests == other.requests &&
- serverCancelSupport == other.serverCancelSupport &&
- listEqual(tokenModifiers, other.tokenModifiers,
- (String a, String b) => a == b) &&
- listEqual(
- tokenTypes, other.tokenTypes, (String a, String b) => a == b) &&
- true;
- }
- return false;
+ return other is SemanticTokensClientCapabilities &&
+ other.runtimeType == SemanticTokensClientCapabilities &&
+ augmentsSyntaxTokens == other.augmentsSyntaxTokens &&
+ dynamicRegistration == other.dynamicRegistration &&
+ listEqual(
+ formats, other.formats, (TokenFormat a, TokenFormat b) => a == b) &&
+ multilineTokenSupport == other.multilineTokenSupport &&
+ overlappingTokenSupport == other.overlappingTokenSupport &&
+ requests == other.requests &&
+ serverCancelSupport == other.serverCancelSupport &&
+ listEqual(tokenModifiers, other.tokenModifiers,
+ (String a, String b) => a == b) &&
+ listEqual(tokenTypes, other.tokenTypes, (String a, String b) => a == b);
}
@override
@@ -33212,11 +32590,10 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensClientCapabilitiesRequests &&
- other.runtimeType == SemanticTokensClientCapabilitiesRequests) {
- return full == other.full && range == other.range && true;
- }
- return false;
+ return other is SemanticTokensClientCapabilitiesRequests &&
+ other.runtimeType == SemanticTokensClientCapabilitiesRequests &&
+ full == other.full &&
+ range == other.range;
}
@override
@@ -33282,11 +32659,9 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensClientCapabilitiesRequestsFull &&
- other.runtimeType == SemanticTokensClientCapabilitiesRequestsFull) {
- return delta == other.delta && true;
- }
- return false;
+ return other is SemanticTokensClientCapabilitiesRequestsFull &&
+ other.runtimeType == SemanticTokensClientCapabilitiesRequestsFull &&
+ delta == other.delta;
}
@override
@@ -33322,11 +32697,8 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensClientCapabilitiesRequestsRange &&
- other.runtimeType == SemanticTokensClientCapabilitiesRequestsRange) {
- return true;
- }
- return false;
+ return other is SemanticTokensClientCapabilitiesRequestsRange &&
+ other.runtimeType == SemanticTokensClientCapabilitiesRequestsRange;
}
@override
@@ -33415,14 +32787,11 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensDelta &&
- other.runtimeType == SemanticTokensDelta) {
- return listEqual(edits, other.edits,
- (SemanticTokensEdit a, SemanticTokensEdit b) => a == b) &&
- resultId == other.resultId &&
- true;
- }
- return false;
+ return other is SemanticTokensDelta &&
+ other.runtimeType == SemanticTokensDelta &&
+ listEqual(edits, other.edits,
+ (SemanticTokensEdit a, SemanticTokensEdit b) => a == b) &&
+ resultId == other.resultId;
}
@override
@@ -33580,15 +32949,12 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensDeltaParams &&
- other.runtimeType == SemanticTokensDeltaParams) {
- return partialResultToken == other.partialResultToken &&
- previousResultId == other.previousResultId &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is SemanticTokensDeltaParams &&
+ other.runtimeType == SemanticTokensDeltaParams &&
+ partialResultToken == other.partialResultToken &&
+ previousResultId == other.previousResultId &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -33663,13 +33029,10 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensDeltaPartialResult &&
- other.runtimeType == SemanticTokensDeltaPartialResult) {
- return listEqual(edits, other.edits,
- (SemanticTokensEdit a, SemanticTokensEdit b) => a == b) &&
- true;
- }
- return false;
+ return other is SemanticTokensDeltaPartialResult &&
+ other.runtimeType == SemanticTokensDeltaPartialResult &&
+ listEqual(edits, other.edits,
+ (SemanticTokensEdit a, SemanticTokensEdit b) => a == b);
}
@override
@@ -33784,14 +33147,11 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensEdit &&
- other.runtimeType == SemanticTokensEdit) {
- return listEqual(data, other.data, (int a, int b) => a == b) &&
- deleteCount == other.deleteCount &&
- start == other.start &&
- true;
- }
- return false;
+ return other is SemanticTokensEdit &&
+ other.runtimeType == SemanticTokensEdit &&
+ listEqual(data, other.data, (int a, int b) => a == b) &&
+ deleteCount == other.deleteCount &&
+ start == other.start;
}
@override
@@ -33894,15 +33254,11 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensLegend &&
- other.runtimeType == SemanticTokensLegend) {
- return listEqual(tokenModifiers, other.tokenModifiers,
- (String a, String b) => a == b) &&
- listEqual(
- tokenTypes, other.tokenTypes, (String a, String b) => a == b) &&
- true;
- }
- return false;
+ return other is SemanticTokensLegend &&
+ other.runtimeType == SemanticTokensLegend &&
+ listEqual(tokenModifiers, other.tokenModifiers,
+ (String a, String b) => a == b) &&
+ listEqual(tokenTypes, other.tokenTypes, (String a, String b) => a == b);
}
@override
@@ -34059,15 +33415,12 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensOptions &&
- other.runtimeType == SemanticTokensOptions) {
- return full == other.full &&
- legend == other.legend &&
- range == other.range &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is SemanticTokensOptions &&
+ other.runtimeType == SemanticTokensOptions &&
+ full == other.full &&
+ legend == other.legend &&
+ range == other.range &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -34132,11 +33485,9 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensOptionsFull &&
- other.runtimeType == SemanticTokensOptionsFull) {
- return delta == other.delta && true;
- }
- return false;
+ return other is SemanticTokensOptionsFull &&
+ other.runtimeType == SemanticTokensOptionsFull &&
+ delta == other.delta;
}
@override
@@ -34170,11 +33521,8 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensOptionsRange &&
- other.runtimeType == SemanticTokensOptionsRange) {
- return true;
- }
- return false;
+ return other is SemanticTokensOptionsRange &&
+ other.runtimeType == SemanticTokensOptionsRange;
}
@override
@@ -34302,14 +33650,11 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensParams &&
- other.runtimeType == SemanticTokensParams) {
- return partialResultToken == other.partialResultToken &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is SemanticTokensParams &&
+ other.runtimeType == SemanticTokensParams &&
+ partialResultToken == other.partialResultToken &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -34380,11 +33725,9 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensPartialResult &&
- other.runtimeType == SemanticTokensPartialResult) {
- return listEqual(data, other.data, (int a, int b) => a == b) && true;
- }
- return false;
+ return other is SemanticTokensPartialResult &&
+ other.runtimeType == SemanticTokensPartialResult &&
+ listEqual(data, other.data, (int a, int b) => a == b);
}
@override
@@ -34538,15 +33881,12 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensRangeParams &&
- other.runtimeType == SemanticTokensRangeParams) {
- return partialResultToken == other.partialResultToken &&
- range == other.range &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is SemanticTokensRangeParams &&
+ other.runtimeType == SemanticTokensRangeParams &&
+ partialResultToken == other.partialResultToken &&
+ range == other.range &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -34763,22 +34103,18 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensRegistrationOptions &&
- other.runtimeType == SemanticTokensRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- full == other.full &&
- id == other.id &&
- legend == other.legend &&
- range == other.range &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is SemanticTokensRegistrationOptions &&
+ other.runtimeType == SemanticTokensRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ full == other.full &&
+ id == other.id &&
+ legend == other.legend &&
+ range == other.range &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -34854,11 +34190,9 @@
@override
bool operator ==(Object other) {
- if (other is SemanticTokensWorkspaceClientCapabilities &&
- other.runtimeType == SemanticTokensWorkspaceClientCapabilities) {
- return refreshSupport == other.refreshSupport && true;
- }
- return false;
+ return other is SemanticTokensWorkspaceClientCapabilities &&
+ other.runtimeType == SemanticTokensWorkspaceClientCapabilities &&
+ refreshSupport == other.refreshSupport;
}
@override
@@ -36103,48 +35437,45 @@
@override
bool operator ==(Object other) {
- if (other is ServerCapabilities &&
- other.runtimeType == ServerCapabilities) {
- return callHierarchyProvider == other.callHierarchyProvider &&
- codeActionProvider == other.codeActionProvider &&
- codeLensProvider == other.codeLensProvider &&
- colorProvider == other.colorProvider &&
- completionProvider == other.completionProvider &&
- declarationProvider == other.declarationProvider &&
- definitionProvider == other.definitionProvider &&
- diagnosticProvider == other.diagnosticProvider &&
- documentFormattingProvider == other.documentFormattingProvider &&
- documentHighlightProvider == other.documentHighlightProvider &&
- documentLinkProvider == other.documentLinkProvider &&
- documentOnTypeFormattingProvider ==
- other.documentOnTypeFormattingProvider &&
- documentRangeFormattingProvider ==
- other.documentRangeFormattingProvider &&
- documentSymbolProvider == other.documentSymbolProvider &&
- executeCommandProvider == other.executeCommandProvider &&
- experimental == other.experimental &&
- foldingRangeProvider == other.foldingRangeProvider &&
- hoverProvider == other.hoverProvider &&
- implementationProvider == other.implementationProvider &&
- inlayHintProvider == other.inlayHintProvider &&
- inlineValueProvider == other.inlineValueProvider &&
- linkedEditingRangeProvider == other.linkedEditingRangeProvider &&
- monikerProvider == other.monikerProvider &&
- notebookDocumentSync == other.notebookDocumentSync &&
- positionEncoding == other.positionEncoding &&
- referencesProvider == other.referencesProvider &&
- renameProvider == other.renameProvider &&
- selectionRangeProvider == other.selectionRangeProvider &&
- semanticTokensProvider == other.semanticTokensProvider &&
- signatureHelpProvider == other.signatureHelpProvider &&
- textDocumentSync == other.textDocumentSync &&
- typeDefinitionProvider == other.typeDefinitionProvider &&
- typeHierarchyProvider == other.typeHierarchyProvider &&
- workspace == other.workspace &&
- workspaceSymbolProvider == other.workspaceSymbolProvider &&
- true;
- }
- return false;
+ return other is ServerCapabilities &&
+ other.runtimeType == ServerCapabilities &&
+ callHierarchyProvider == other.callHierarchyProvider &&
+ codeActionProvider == other.codeActionProvider &&
+ codeLensProvider == other.codeLensProvider &&
+ colorProvider == other.colorProvider &&
+ completionProvider == other.completionProvider &&
+ declarationProvider == other.declarationProvider &&
+ definitionProvider == other.definitionProvider &&
+ diagnosticProvider == other.diagnosticProvider &&
+ documentFormattingProvider == other.documentFormattingProvider &&
+ documentHighlightProvider == other.documentHighlightProvider &&
+ documentLinkProvider == other.documentLinkProvider &&
+ documentOnTypeFormattingProvider ==
+ other.documentOnTypeFormattingProvider &&
+ documentRangeFormattingProvider ==
+ other.documentRangeFormattingProvider &&
+ documentSymbolProvider == other.documentSymbolProvider &&
+ executeCommandProvider == other.executeCommandProvider &&
+ experimental == other.experimental &&
+ foldingRangeProvider == other.foldingRangeProvider &&
+ hoverProvider == other.hoverProvider &&
+ implementationProvider == other.implementationProvider &&
+ inlayHintProvider == other.inlayHintProvider &&
+ inlineValueProvider == other.inlineValueProvider &&
+ linkedEditingRangeProvider == other.linkedEditingRangeProvider &&
+ monikerProvider == other.monikerProvider &&
+ notebookDocumentSync == other.notebookDocumentSync &&
+ positionEncoding == other.positionEncoding &&
+ referencesProvider == other.referencesProvider &&
+ renameProvider == other.renameProvider &&
+ selectionRangeProvider == other.selectionRangeProvider &&
+ semanticTokensProvider == other.semanticTokensProvider &&
+ signatureHelpProvider == other.signatureHelpProvider &&
+ textDocumentSync == other.textDocumentSync &&
+ typeDefinitionProvider == other.typeDefinitionProvider &&
+ typeHierarchyProvider == other.typeHierarchyProvider &&
+ workspace == other.workspace &&
+ workspaceSymbolProvider == other.workspaceSymbolProvider;
}
@override
@@ -36275,13 +35606,10 @@
@override
bool operator ==(Object other) {
- if (other is ServerCapabilitiesWorkspace &&
- other.runtimeType == ServerCapabilitiesWorkspace) {
- return fileOperations == other.fileOperations &&
- workspaceFolders == other.workspaceFolders &&
- true;
- }
- return false;
+ return other is ServerCapabilitiesWorkspace &&
+ other.runtimeType == ServerCapabilitiesWorkspace &&
+ fileOperations == other.fileOperations &&
+ workspaceFolders == other.workspaceFolders;
}
@override
@@ -36349,10 +35677,9 @@
@override
bool operator ==(Object other) {
- if (other is SetTraceParams && other.runtimeType == SetTraceParams) {
- return value == other.value && true;
- }
- return false;
+ return other is SetTraceParams &&
+ other.runtimeType == SetTraceParams &&
+ value == other.value;
}
@override
@@ -36421,11 +35748,9 @@
@override
bool operator ==(Object other) {
- if (other is ShowDocumentClientCapabilities &&
- other.runtimeType == ShowDocumentClientCapabilities) {
- return support == other.support && true;
- }
- return false;
+ return other is ShowDocumentClientCapabilities &&
+ other.runtimeType == ShowDocumentClientCapabilities &&
+ support == other.support;
}
@override
@@ -36562,15 +35887,12 @@
@override
bool operator ==(Object other) {
- if (other is ShowDocumentParams &&
- other.runtimeType == ShowDocumentParams) {
- return external == other.external &&
- selection == other.selection &&
- takeFocus == other.takeFocus &&
- uri == other.uri &&
- true;
- }
- return false;
+ return other is ShowDocumentParams &&
+ other.runtimeType == ShowDocumentParams &&
+ external == other.external &&
+ selection == other.selection &&
+ takeFocus == other.takeFocus &&
+ uri == other.uri;
}
@override
@@ -36644,11 +35966,9 @@
@override
bool operator ==(Object other) {
- if (other is ShowDocumentResult &&
- other.runtimeType == ShowDocumentResult) {
- return success == other.success && true;
- }
- return false;
+ return other is ShowDocumentResult &&
+ other.runtimeType == ShowDocumentResult &&
+ success == other.success;
}
@override
@@ -36741,10 +36061,10 @@
@override
bool operator ==(Object other) {
- if (other is ShowMessageParams && other.runtimeType == ShowMessageParams) {
- return message == other.message && type == other.type && true;
- }
- return false;
+ return other is ShowMessageParams &&
+ other.runtimeType == ShowMessageParams &&
+ message == other.message &&
+ type == other.type;
}
@override
@@ -36817,11 +36137,9 @@
@override
bool operator ==(Object other) {
- if (other is ShowMessageRequestClientCapabilities &&
- other.runtimeType == ShowMessageRequestClientCapabilities) {
- return messageActionItem == other.messageActionItem && true;
- }
- return false;
+ return other is ShowMessageRequestClientCapabilities &&
+ other.runtimeType == ShowMessageRequestClientCapabilities &&
+ messageActionItem == other.messageActionItem;
}
@override
@@ -36887,13 +36205,10 @@
@override
bool operator ==(Object other) {
- if (other is ShowMessageRequestClientCapabilitiesMessageActionItem &&
+ return other is ShowMessageRequestClientCapabilitiesMessageActionItem &&
other.runtimeType ==
- ShowMessageRequestClientCapabilitiesMessageActionItem) {
- return additionalPropertiesSupport == other.additionalPropertiesSupport &&
- true;
- }
- return false;
+ ShowMessageRequestClientCapabilitiesMessageActionItem &&
+ additionalPropertiesSupport == other.additionalPropertiesSupport;
}
@override
@@ -37011,15 +36326,12 @@
@override
bool operator ==(Object other) {
- if (other is ShowMessageRequestParams &&
- other.runtimeType == ShowMessageRequestParams) {
- return listEqual(actions, other.actions,
- (MessageActionItem a, MessageActionItem b) => a == b) &&
- message == other.message &&
- type == other.type &&
- true;
- }
- return false;
+ return other is ShowMessageRequestParams &&
+ other.runtimeType == ShowMessageRequestParams &&
+ listEqual(actions, other.actions,
+ (MessageActionItem a, MessageActionItem b) => a == b) &&
+ message == other.message &&
+ type == other.type;
}
@override
@@ -37149,14 +36461,12 @@
@override
bool operator ==(Object other) {
- if (other is SignatureHelp && other.runtimeType == SignatureHelp) {
- return activeParameter == other.activeParameter &&
- activeSignature == other.activeSignature &&
- listEqual(signatures, other.signatures,
- (SignatureInformation a, SignatureInformation b) => a == b) &&
- true;
- }
- return false;
+ return other is SignatureHelp &&
+ other.runtimeType == SignatureHelp &&
+ activeParameter == other.activeParameter &&
+ activeSignature == other.activeSignature &&
+ listEqual(signatures, other.signatures,
+ (SignatureInformation a, SignatureInformation b) => a == b);
}
@override
@@ -37274,14 +36584,11 @@
@override
bool operator ==(Object other) {
- if (other is SignatureHelpClientCapabilities &&
- other.runtimeType == SignatureHelpClientCapabilities) {
- return contextSupport == other.contextSupport &&
- dynamicRegistration == other.dynamicRegistration &&
- signatureInformation == other.signatureInformation &&
- true;
- }
- return false;
+ return other is SignatureHelpClientCapabilities &&
+ other.runtimeType == SignatureHelpClientCapabilities &&
+ contextSupport == other.contextSupport &&
+ dynamicRegistration == other.dynamicRegistration &&
+ signatureInformation == other.signatureInformation;
}
@override
@@ -37404,16 +36711,13 @@
@override
bool operator ==(Object other) {
- if (other is SignatureHelpClientCapabilitiesSignatureInformation &&
+ return other is SignatureHelpClientCapabilitiesSignatureInformation &&
other.runtimeType ==
- SignatureHelpClientCapabilitiesSignatureInformation) {
- return activeParameterSupport == other.activeParameterSupport &&
- listEqual(documentationFormat, other.documentationFormat,
- (MarkupKind a, MarkupKind b) => a == b) &&
- parameterInformation == other.parameterInformation &&
- true;
- }
- return false;
+ SignatureHelpClientCapabilitiesSignatureInformation &&
+ activeParameterSupport == other.activeParameterSupport &&
+ listEqual(documentationFormat, other.documentationFormat,
+ (MarkupKind a, MarkupKind b) => a == b) &&
+ parameterInformation == other.parameterInformation;
}
@override
@@ -37568,15 +36872,12 @@
@override
bool operator ==(Object other) {
- if (other is SignatureHelpContext &&
- other.runtimeType == SignatureHelpContext) {
- return activeSignatureHelp == other.activeSignatureHelp &&
- isRetrigger == other.isRetrigger &&
- triggerCharacter == other.triggerCharacter &&
- triggerKind == other.triggerKind &&
- true;
- }
- return false;
+ return other is SignatureHelpContext &&
+ other.runtimeType == SignatureHelpContext &&
+ activeSignatureHelp == other.activeSignatureHelp &&
+ isRetrigger == other.isRetrigger &&
+ triggerCharacter == other.triggerCharacter &&
+ triggerKind == other.triggerKind;
}
@override
@@ -37697,16 +36998,13 @@
@override
bool operator ==(Object other) {
- if (other is SignatureHelpOptions &&
- other.runtimeType == SignatureHelpOptions) {
- return listEqual(retriggerCharacters, other.retriggerCharacters,
- (String a, String b) => a == b) &&
- listEqual(triggerCharacters, other.triggerCharacters,
- (String a, String b) => a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is SignatureHelpOptions &&
+ other.runtimeType == SignatureHelpOptions &&
+ listEqual(retriggerCharacters, other.retriggerCharacters,
+ (String a, String b) => a == b) &&
+ listEqual(triggerCharacters, other.triggerCharacters,
+ (String a, String b) => a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -37863,15 +37161,12 @@
@override
bool operator ==(Object other) {
- if (other is SignatureHelpParams &&
- other.runtimeType == SignatureHelpParams) {
- return context == other.context &&
- position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is SignatureHelpParams &&
+ other.runtimeType == SignatureHelpParams &&
+ context == other.context &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -38026,22 +37321,18 @@
@override
bool operator ==(Object other) {
- if (other is SignatureHelpRegistrationOptions &&
- other.runtimeType == SignatureHelpRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- listEqual(retriggerCharacters, other.retriggerCharacters,
- (String a, String b) => a == b) &&
- listEqual(triggerCharacters, other.triggerCharacters,
- (String a, String b) => a == b) &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is SignatureHelpRegistrationOptions &&
+ other.runtimeType == SignatureHelpRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ listEqual(retriggerCharacters, other.retriggerCharacters,
+ (String a, String b) => a == b) &&
+ listEqual(triggerCharacters, other.triggerCharacters,
+ (String a, String b) => a == b) &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -38232,16 +37523,13 @@
@override
bool operator ==(Object other) {
- if (other is SignatureInformation &&
- other.runtimeType == SignatureInformation) {
- return activeParameter == other.activeParameter &&
- documentation == other.documentation &&
- label == other.label &&
- listEqual(parameters, other.parameters,
- (ParameterInformation a, ParameterInformation b) => a == b) &&
- true;
- }
- return false;
+ return other is SignatureInformation &&
+ other.runtimeType == SignatureInformation &&
+ activeParameter == other.activeParameter &&
+ documentation == other.documentation &&
+ label == other.label &&
+ listEqual(parameters, other.parameters,
+ (ParameterInformation a, ParameterInformation b) => a == b);
}
@override
@@ -38311,11 +37599,9 @@
@override
bool operator ==(Object other) {
- if (other is SignatureInformationParameterInformation &&
- other.runtimeType == SignatureInformationParameterInformation) {
- return labelOffsetSupport == other.labelOffsetSupport && true;
- }
- return false;
+ return other is SignatureInformationParameterInformation &&
+ other.runtimeType == SignatureInformationParameterInformation &&
+ labelOffsetSupport == other.labelOffsetSupport;
}
@override
@@ -38421,11 +37707,9 @@
@override
bool operator ==(Object other) {
- if (other is StaticRegistrationOptions &&
- other.runtimeType == StaticRegistrationOptions) {
- return id == other.id && true;
- }
- return false;
+ return other is StaticRegistrationOptions &&
+ other.runtimeType == StaticRegistrationOptions &&
+ id == other.id;
}
@override
@@ -38628,16 +37912,14 @@
@override
bool operator ==(Object other) {
- if (other is SymbolInformation && other.runtimeType == SymbolInformation) {
- return containerName == other.containerName &&
- deprecated == other.deprecated &&
- kind == other.kind &&
- location == other.location &&
- name == other.name &&
- listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b) &&
- true;
- }
- return false;
+ return other is SymbolInformation &&
+ other.runtimeType == SymbolInformation &&
+ containerName == other.containerName &&
+ deprecated == other.deprecated &&
+ kind == other.kind &&
+ location == other.location &&
+ name == other.name &&
+ listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b);
}
@override
@@ -38827,18 +38109,14 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentChangeRegistrationOptions &&
- other.runtimeType == TextDocumentChangeRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- syncKind == other.syncKind &&
- true;
- }
- return false;
+ return other is TextDocumentChangeRegistrationOptions &&
+ other.runtimeType == TextDocumentChangeRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ syncKind == other.syncKind;
}
@override
@@ -39664,41 +38942,38 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentClientCapabilities &&
- other.runtimeType == TextDocumentClientCapabilities) {
- return callHierarchy == other.callHierarchy &&
- codeAction == other.codeAction &&
- codeLens == other.codeLens &&
- colorProvider == other.colorProvider &&
- completion == other.completion &&
- declaration == other.declaration &&
- definition == other.definition &&
- diagnostic == other.diagnostic &&
- documentHighlight == other.documentHighlight &&
- documentLink == other.documentLink &&
- documentSymbol == other.documentSymbol &&
- foldingRange == other.foldingRange &&
- formatting == other.formatting &&
- hover == other.hover &&
- implementation == other.implementation &&
- inlayHint == other.inlayHint &&
- inlineValue == other.inlineValue &&
- linkedEditingRange == other.linkedEditingRange &&
- moniker == other.moniker &&
- onTypeFormatting == other.onTypeFormatting &&
- publishDiagnostics == other.publishDiagnostics &&
- rangeFormatting == other.rangeFormatting &&
- references == other.references &&
- rename == other.rename &&
- selectionRange == other.selectionRange &&
- semanticTokens == other.semanticTokens &&
- signatureHelp == other.signatureHelp &&
- synchronization == other.synchronization &&
- typeDefinition == other.typeDefinition &&
- typeHierarchy == other.typeHierarchy &&
- true;
- }
- return false;
+ return other is TextDocumentClientCapabilities &&
+ other.runtimeType == TextDocumentClientCapabilities &&
+ callHierarchy == other.callHierarchy &&
+ codeAction == other.codeAction &&
+ codeLens == other.codeLens &&
+ colorProvider == other.colorProvider &&
+ completion == other.completion &&
+ declaration == other.declaration &&
+ definition == other.definition &&
+ diagnostic == other.diagnostic &&
+ documentHighlight == other.documentHighlight &&
+ documentLink == other.documentLink &&
+ documentSymbol == other.documentSymbol &&
+ foldingRange == other.foldingRange &&
+ formatting == other.formatting &&
+ hover == other.hover &&
+ implementation == other.implementation &&
+ inlayHint == other.inlayHint &&
+ inlineValue == other.inlineValue &&
+ linkedEditingRange == other.linkedEditingRange &&
+ moniker == other.moniker &&
+ onTypeFormatting == other.onTypeFormatting &&
+ publishDiagnostics == other.publishDiagnostics &&
+ rangeFormatting == other.rangeFormatting &&
+ references == other.references &&
+ rename == other.rename &&
+ selectionRange == other.selectionRange &&
+ semanticTokens == other.semanticTokens &&
+ signatureHelp == other.signatureHelp &&
+ synchronization == other.synchronization &&
+ typeDefinition == other.typeDefinition &&
+ typeHierarchy == other.typeHierarchy;
}
@override
@@ -39843,14 +39118,11 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentContentChangeEvent1 &&
- other.runtimeType == TextDocumentContentChangeEvent1) {
- return range == other.range &&
- rangeLength == other.rangeLength &&
- text == other.text &&
- true;
- }
- return false;
+ return other is TextDocumentContentChangeEvent1 &&
+ other.runtimeType == TextDocumentContentChangeEvent1 &&
+ range == other.range &&
+ rangeLength == other.rangeLength &&
+ text == other.text;
}
@override
@@ -39920,11 +39192,9 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentContentChangeEvent2 &&
- other.runtimeType == TextDocumentContentChangeEvent2) {
- return text == other.text && true;
- }
- return false;
+ return other is TextDocumentContentChangeEvent2 &&
+ other.runtimeType == TextDocumentContentChangeEvent2 &&
+ text == other.text;
}
@override
@@ -40043,18 +39313,15 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentEdit && other.runtimeType == TextDocumentEdit) {
- return listEqual(
- edits,
- other.edits,
- (Either3<AnnotatedTextEdit, SnippetTextEdit, TextEdit> a,
- Either3<AnnotatedTextEdit, SnippetTextEdit, TextEdit>
- b) =>
- a == b) &&
- textDocument == other.textDocument &&
- true;
- }
- return false;
+ return other is TextDocumentEdit &&
+ other.runtimeType == TextDocumentEdit &&
+ listEqual(
+ edits,
+ other.edits,
+ (Either3<AnnotatedTextEdit, SnippetTextEdit, TextEdit> a,
+ Either3<AnnotatedTextEdit, SnippetTextEdit, TextEdit> b) =>
+ a == b) &&
+ textDocument == other.textDocument;
}
@override
@@ -40163,14 +39430,11 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentFilter1 &&
- other.runtimeType == TextDocumentFilter1) {
- return language == other.language &&
- pattern == other.pattern &&
- scheme == other.scheme &&
- true;
- }
- return false;
+ return other is TextDocumentFilter1 &&
+ other.runtimeType == TextDocumentFilter1 &&
+ language == other.language &&
+ pattern == other.pattern &&
+ scheme == other.scheme;
}
@override
@@ -40280,14 +39544,11 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentFilter3 &&
- other.runtimeType == TextDocumentFilter3) {
- return language == other.language &&
- pattern == other.pattern &&
- scheme == other.scheme &&
- true;
- }
- return false;
+ return other is TextDocumentFilter3 &&
+ other.runtimeType == TextDocumentFilter3 &&
+ language == other.language &&
+ pattern == other.pattern &&
+ scheme == other.scheme;
}
@override
@@ -40397,14 +39658,11 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentFilterWithScheme &&
- other.runtimeType == TextDocumentFilterWithScheme) {
- return language == other.language &&
- pattern == other.pattern &&
- scheme == other.scheme &&
- true;
- }
- return false;
+ return other is TextDocumentFilterWithScheme &&
+ other.runtimeType == TextDocumentFilterWithScheme &&
+ language == other.language &&
+ pattern == other.pattern &&
+ scheme == other.scheme;
}
@override
@@ -40482,11 +39740,9 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentIdentifier &&
- other.runtimeType == TextDocumentIdentifier) {
- return uri == other.uri && true;
- }
- return false;
+ return other is TextDocumentIdentifier &&
+ other.runtimeType == TextDocumentIdentifier &&
+ uri == other.uri;
}
@override
@@ -40632,14 +39888,12 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentItem && other.runtimeType == TextDocumentItem) {
- return languageId == other.languageId &&
- text == other.text &&
- uri == other.uri &&
- version == other.version &&
- true;
- }
- return false;
+ return other is TextDocumentItem &&
+ other.runtimeType == TextDocumentItem &&
+ languageId == other.languageId &&
+ text == other.text &&
+ uri == other.uri &&
+ version == other.version;
}
@override
@@ -40781,13 +40035,10 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentPositionParams &&
- other.runtimeType == TextDocumentPositionParams) {
- return position == other.position &&
- textDocument == other.textDocument &&
- true;
- }
- return false;
+ return other is TextDocumentPositionParams &&
+ other.runtimeType == TextDocumentPositionParams &&
+ position == other.position &&
+ textDocument == other.textDocument;
}
@override
@@ -40958,17 +40209,13 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentRegistrationOptions &&
- other.runtimeType == TextDocumentRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- true;
- }
- return false;
+ return other is TextDocumentRegistrationOptions &&
+ other.runtimeType == TextDocumentRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b);
}
@override
@@ -41099,18 +40346,14 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentSaveRegistrationOptions &&
- other.runtimeType == TextDocumentSaveRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- includeText == other.includeText &&
- true;
- }
- return false;
+ return other is TextDocumentSaveRegistrationOptions &&
+ other.runtimeType == TextDocumentSaveRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ includeText == other.includeText;
}
@override
@@ -41237,15 +40480,12 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentSyncClientCapabilities &&
- other.runtimeType == TextDocumentSyncClientCapabilities) {
- return didSave == other.didSave &&
- dynamicRegistration == other.dynamicRegistration &&
- willSave == other.willSave &&
- willSaveWaitUntil == other.willSaveWaitUntil &&
- true;
- }
- return false;
+ return other is TextDocumentSyncClientCapabilities &&
+ other.runtimeType == TextDocumentSyncClientCapabilities &&
+ didSave == other.didSave &&
+ dynamicRegistration == other.dynamicRegistration &&
+ willSave == other.willSave &&
+ willSaveWaitUntil == other.willSaveWaitUntil;
}
@override
@@ -41445,16 +40685,13 @@
@override
bool operator ==(Object other) {
- if (other is TextDocumentSyncOptions &&
- other.runtimeType == TextDocumentSyncOptions) {
- return change == other.change &&
- openClose == other.openClose &&
- save == other.save &&
- willSave == other.willSave &&
- willSaveWaitUntil == other.willSaveWaitUntil &&
- true;
- }
- return false;
+ return other is TextDocumentSyncOptions &&
+ other.runtimeType == TextDocumentSyncOptions &&
+ change == other.change &&
+ openClose == other.openClose &&
+ save == other.save &&
+ willSave == other.willSave &&
+ willSaveWaitUntil == other.willSaveWaitUntil;
}
@override
@@ -41560,10 +40797,10 @@
@override
bool operator ==(Object other) {
- if (other is TextEdit && other.runtimeType == TextEdit) {
- return newText == other.newText && range == other.range && true;
- }
- return false;
+ return other is TextEdit &&
+ other.runtimeType == TextEdit &&
+ newText == other.newText &&
+ range == other.range;
}
@override
@@ -41710,13 +40947,10 @@
@override
bool operator ==(Object other) {
- if (other is TypeDefinitionClientCapabilities &&
- other.runtimeType == TypeDefinitionClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- linkSupport == other.linkSupport &&
- true;
- }
- return false;
+ return other is TypeDefinitionClientCapabilities &&
+ other.runtimeType == TypeDefinitionClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ linkSupport == other.linkSupport;
}
@override
@@ -41782,11 +41016,9 @@
@override
bool operator ==(Object other) {
- if (other is TypeDefinitionOptions &&
- other.runtimeType == TypeDefinitionOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is TypeDefinitionOptions &&
+ other.runtimeType == TypeDefinitionOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -41945,15 +41177,12 @@
@override
bool operator ==(Object other) {
- if (other is TypeDefinitionParams &&
- other.runtimeType == TypeDefinitionParams) {
- return partialResultToken == other.partialResultToken &&
- position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is TypeDefinitionParams &&
+ other.runtimeType == TypeDefinitionParams &&
+ partialResultToken == other.partialResultToken &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -42075,19 +41304,15 @@
@override
bool operator ==(Object other) {
- if (other is TypeDefinitionRegistrationOptions &&
- other.runtimeType == TypeDefinitionRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is TypeDefinitionRegistrationOptions &&
+ other.runtimeType == TypeDefinitionRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -42155,11 +41380,9 @@
@override
bool operator ==(Object other) {
- if (other is TypeHierarchyClientCapabilities &&
- other.runtimeType == TypeHierarchyClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration && true;
- }
- return false;
+ return other is TypeHierarchyClientCapabilities &&
+ other.runtimeType == TypeHierarchyClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration;
}
@override
@@ -42390,18 +41613,16 @@
@override
bool operator ==(Object other) {
- if (other is TypeHierarchyItem && other.runtimeType == TypeHierarchyItem) {
- return data == other.data &&
- detail == other.detail &&
- kind == other.kind &&
- name == other.name &&
- range == other.range &&
- selectionRange == other.selectionRange &&
- listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b) &&
- uri == other.uri &&
- true;
- }
- return false;
+ return other is TypeHierarchyItem &&
+ other.runtimeType == TypeHierarchyItem &&
+ data == other.data &&
+ detail == other.detail &&
+ kind == other.kind &&
+ name == other.name &&
+ range == other.range &&
+ selectionRange == other.selectionRange &&
+ listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b) &&
+ uri == other.uri;
}
@override
@@ -42476,11 +41697,9 @@
@override
bool operator ==(Object other) {
- if (other is TypeHierarchyOptions &&
- other.runtimeType == TypeHierarchyOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is TypeHierarchyOptions &&
+ other.runtimeType == TypeHierarchyOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -42608,14 +41827,11 @@
@override
bool operator ==(Object other) {
- if (other is TypeHierarchyPrepareParams &&
- other.runtimeType == TypeHierarchyPrepareParams) {
- return position == other.position &&
- textDocument == other.textDocument &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is TypeHierarchyPrepareParams &&
+ other.runtimeType == TypeHierarchyPrepareParams &&
+ position == other.position &&
+ textDocument == other.textDocument &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -42739,19 +41955,15 @@
@override
bool operator ==(Object other) {
- if (other is TypeHierarchyRegistrationOptions &&
- other.runtimeType == TypeHierarchyRegistrationOptions) {
- return listEqual(
- documentSelector,
- other.documentSelector,
- (TextDocumentFilterWithScheme a,
- TextDocumentFilterWithScheme b) =>
- a == b) &&
- id == other.id &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is TypeHierarchyRegistrationOptions &&
+ other.runtimeType == TypeHierarchyRegistrationOptions &&
+ listEqual(
+ documentSelector,
+ other.documentSelector,
+ (TextDocumentFilterWithScheme a, TextDocumentFilterWithScheme b) =>
+ a == b) &&
+ id == other.id &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -42883,14 +42095,11 @@
@override
bool operator ==(Object other) {
- if (other is TypeHierarchySubtypesParams &&
- other.runtimeType == TypeHierarchySubtypesParams) {
- return item == other.item &&
- partialResultToken == other.partialResultToken &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is TypeHierarchySubtypesParams &&
+ other.runtimeType == TypeHierarchySubtypesParams &&
+ item == other.item &&
+ partialResultToken == other.partialResultToken &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -43022,14 +42231,11 @@
@override
bool operator ==(Object other) {
- if (other is TypeHierarchySupertypesParams &&
- other.runtimeType == TypeHierarchySupertypesParams) {
- return item == other.item &&
- partialResultToken == other.partialResultToken &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is TypeHierarchySupertypesParams &&
+ other.runtimeType == TypeHierarchySupertypesParams &&
+ item == other.item &&
+ partialResultToken == other.partialResultToken &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -43143,11 +42349,10 @@
@override
bool operator ==(Object other) {
- if (other is UnchangedDocumentDiagnosticReport &&
- other.runtimeType == UnchangedDocumentDiagnosticReport) {
- return kind == other.kind && resultId == other.resultId && true;
- }
- return false;
+ return other is UnchangedDocumentDiagnosticReport &&
+ other.runtimeType == UnchangedDocumentDiagnosticReport &&
+ kind == other.kind &&
+ resultId == other.resultId;
}
@override
@@ -43286,10 +42491,10 @@
@override
bool operator ==(Object other) {
- if (other is Unregistration && other.runtimeType == Unregistration) {
- return id == other.id && method == other.method && true;
- }
- return false;
+ return other is Unregistration &&
+ other.runtimeType == Unregistration &&
+ id == other.id &&
+ method == other.method;
}
@override
@@ -43362,13 +42567,10 @@
@override
bool operator ==(Object other) {
- if (other is UnregistrationParams &&
- other.runtimeType == UnregistrationParams) {
- return listEqual(unregisterations, other.unregisterations,
- (Unregistration a, Unregistration b) => a == b) &&
- true;
- }
- return false;
+ return other is UnregistrationParams &&
+ other.runtimeType == UnregistrationParams &&
+ listEqual(unregisterations, other.unregisterations,
+ (Unregistration a, Unregistration b) => a == b);
}
@override
@@ -43465,11 +42667,10 @@
@override
bool operator ==(Object other) {
- if (other is VersionedNotebookDocumentIdentifier &&
- other.runtimeType == VersionedNotebookDocumentIdentifier) {
- return uri == other.uri && version == other.version && true;
- }
- return false;
+ return other is VersionedNotebookDocumentIdentifier &&
+ other.runtimeType == VersionedNotebookDocumentIdentifier &&
+ uri == other.uri &&
+ version == other.version;
}
@override
@@ -43567,11 +42768,10 @@
@override
bool operator ==(Object other) {
- if (other is VersionedTextDocumentIdentifier &&
- other.runtimeType == VersionedTextDocumentIdentifier) {
- return uri == other.uri && version == other.version && true;
- }
- return false;
+ return other is VersionedTextDocumentIdentifier &&
+ other.runtimeType == VersionedTextDocumentIdentifier &&
+ uri == other.uri &&
+ version == other.version;
}
@override
@@ -43701,13 +42901,10 @@
@override
bool operator ==(Object other) {
- if (other is WillSaveTextDocumentParams &&
- other.runtimeType == WillSaveTextDocumentParams) {
- return reason == other.reason &&
- textDocument == other.textDocument &&
- true;
- }
- return false;
+ return other is WillSaveTextDocumentParams &&
+ other.runtimeType == WillSaveTextDocumentParams &&
+ reason == other.reason &&
+ textDocument == other.textDocument;
}
@override
@@ -43832,14 +43029,11 @@
@override
bool operator ==(Object other) {
- if (other is WindowClientCapabilities &&
- other.runtimeType == WindowClientCapabilities) {
- return showDocument == other.showDocument &&
- showMessage == other.showMessage &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is WindowClientCapabilities &&
+ other.runtimeType == WindowClientCapabilities &&
+ showDocument == other.showDocument &&
+ showMessage == other.showMessage &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -44011,16 +43205,13 @@
@override
bool operator ==(Object other) {
- if (other is WorkDoneProgressBegin &&
- other.runtimeType == WorkDoneProgressBegin) {
- return cancellable == other.cancellable &&
- kind == other.kind &&
- message == other.message &&
- percentage == other.percentage &&
- title == other.title &&
- true;
- }
- return false;
+ return other is WorkDoneProgressBegin &&
+ other.runtimeType == WorkDoneProgressBegin &&
+ cancellable == other.cancellable &&
+ kind == other.kind &&
+ message == other.message &&
+ percentage == other.percentage &&
+ title == other.title;
}
@override
@@ -44096,11 +43287,9 @@
@override
bool operator ==(Object other) {
- if (other is WorkDoneProgressCancelParams &&
- other.runtimeType == WorkDoneProgressCancelParams) {
- return token == other.token && true;
- }
- return false;
+ return other is WorkDoneProgressCancelParams &&
+ other.runtimeType == WorkDoneProgressCancelParams &&
+ token == other.token;
}
@override
@@ -44170,11 +43359,9 @@
@override
bool operator ==(Object other) {
- if (other is WorkDoneProgressCreateParams &&
- other.runtimeType == WorkDoneProgressCreateParams) {
- return token == other.token && true;
- }
- return false;
+ return other is WorkDoneProgressCreateParams &&
+ other.runtimeType == WorkDoneProgressCreateParams &&
+ token == other.token;
}
@override
@@ -44264,11 +43451,10 @@
@override
bool operator ==(Object other) {
- if (other is WorkDoneProgressEnd &&
- other.runtimeType == WorkDoneProgressEnd) {
- return kind == other.kind && message == other.message && true;
- }
- return false;
+ return other is WorkDoneProgressEnd &&
+ other.runtimeType == WorkDoneProgressEnd &&
+ kind == other.kind &&
+ message == other.message;
}
@override
@@ -44417,11 +43603,9 @@
@override
bool operator ==(Object other) {
- if (other is WorkDoneProgressOptions &&
- other.runtimeType == WorkDoneProgressOptions) {
- return workDoneProgress == other.workDoneProgress && true;
- }
- return false;
+ return other is WorkDoneProgressOptions &&
+ other.runtimeType == WorkDoneProgressOptions &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -44606,11 +43790,9 @@
@override
bool operator ==(Object other) {
- if (other is WorkDoneProgressParams &&
- other.runtimeType == WorkDoneProgressParams) {
- return workDoneToken == other.workDoneToken && true;
- }
- return false;
+ return other is WorkDoneProgressParams &&
+ other.runtimeType == WorkDoneProgressParams &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -44750,15 +43932,12 @@
@override
bool operator ==(Object other) {
- if (other is WorkDoneProgressReport &&
- other.runtimeType == WorkDoneProgressReport) {
- return cancellable == other.cancellable &&
- kind == other.kind &&
- message == other.message &&
- percentage == other.percentage &&
- true;
- }
- return false;
+ return other is WorkDoneProgressReport &&
+ other.runtimeType == WorkDoneProgressReport &&
+ cancellable == other.cancellable &&
+ kind == other.kind &&
+ message == other.message &&
+ percentage == other.percentage;
}
@override
@@ -45171,25 +44350,22 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceClientCapabilities &&
- other.runtimeType == WorkspaceClientCapabilities) {
- return applyEdit == other.applyEdit &&
- codeLens == other.codeLens &&
- configuration == other.configuration &&
- diagnostics == other.diagnostics &&
- didChangeConfiguration == other.didChangeConfiguration &&
- didChangeWatchedFiles == other.didChangeWatchedFiles &&
- executeCommand == other.executeCommand &&
- fileOperations == other.fileOperations &&
- inlayHint == other.inlayHint &&
- inlineValue == other.inlineValue &&
- semanticTokens == other.semanticTokens &&
- symbol == other.symbol &&
- workspaceEdit == other.workspaceEdit &&
- workspaceFolders == other.workspaceFolders &&
- true;
- }
- return false;
+ return other is WorkspaceClientCapabilities &&
+ other.runtimeType == WorkspaceClientCapabilities &&
+ applyEdit == other.applyEdit &&
+ codeLens == other.codeLens &&
+ configuration == other.configuration &&
+ diagnostics == other.diagnostics &&
+ didChangeConfiguration == other.didChangeConfiguration &&
+ didChangeWatchedFiles == other.didChangeWatchedFiles &&
+ executeCommand == other.executeCommand &&
+ fileOperations == other.fileOperations &&
+ inlayHint == other.inlayHint &&
+ inlineValue == other.inlineValue &&
+ semanticTokens == other.semanticTokens &&
+ symbol == other.symbol &&
+ workspaceEdit == other.workspaceEdit &&
+ workspaceFolders == other.workspaceFolders;
}
@override
@@ -45358,16 +44534,13 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceDiagnosticParams &&
- other.runtimeType == WorkspaceDiagnosticParams) {
- return identifier == other.identifier &&
- partialResultToken == other.partialResultToken &&
- listEqual(previousResultIds, other.previousResultIds,
- (PreviousResultId a, PreviousResultId b) => a == b) &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is WorkspaceDiagnosticParams &&
+ other.runtimeType == WorkspaceDiagnosticParams &&
+ identifier == other.identifier &&
+ partialResultToken == other.partialResultToken &&
+ listEqual(previousResultIds, other.previousResultIds,
+ (PreviousResultId a, PreviousResultId b) => a == b) &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -45460,21 +44633,18 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceDiagnosticReport &&
- other.runtimeType == WorkspaceDiagnosticReport) {
- return listEqual(
- items,
- other.items,
- (Either2<WorkspaceFullDocumentDiagnosticReport,
- WorkspaceUnchangedDocumentDiagnosticReport>
- a,
- Either2<WorkspaceFullDocumentDiagnosticReport,
- WorkspaceUnchangedDocumentDiagnosticReport>
- b) =>
- a == b) &&
- true;
- }
- return false;
+ return other is WorkspaceDiagnosticReport &&
+ other.runtimeType == WorkspaceDiagnosticReport &&
+ listEqual(
+ items,
+ other.items,
+ (Either2<WorkspaceFullDocumentDiagnosticReport,
+ WorkspaceUnchangedDocumentDiagnosticReport>
+ a,
+ Either2<WorkspaceFullDocumentDiagnosticReport,
+ WorkspaceUnchangedDocumentDiagnosticReport>
+ b) =>
+ a == b);
}
@override
@@ -45564,21 +44734,18 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceDiagnosticReportPartialResult &&
- other.runtimeType == WorkspaceDiagnosticReportPartialResult) {
- return listEqual(
- items,
- other.items,
- (Either2<WorkspaceFullDocumentDiagnosticReport,
- WorkspaceUnchangedDocumentDiagnosticReport>
- a,
- Either2<WorkspaceFullDocumentDiagnosticReport,
- WorkspaceUnchangedDocumentDiagnosticReport>
- b) =>
- a == b) &&
- true;
- }
- return false;
+ return other is WorkspaceDiagnosticReportPartialResult &&
+ other.runtimeType == WorkspaceDiagnosticReportPartialResult &&
+ listEqual(
+ items,
+ other.items,
+ (Either2<WorkspaceFullDocumentDiagnosticReport,
+ WorkspaceUnchangedDocumentDiagnosticReport>
+ a,
+ Either2<WorkspaceFullDocumentDiagnosticReport,
+ WorkspaceUnchangedDocumentDiagnosticReport>
+ b) =>
+ a == b);
}
@override
@@ -45754,25 +44921,23 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceEdit && other.runtimeType == WorkspaceEdit) {
- return mapEqual(changeAnnotations, other.changeAnnotations,
- (ChangeAnnotation a, ChangeAnnotation b) => a == b) &&
- mapEqual(
- changes,
- other.changes,
- (List<TextEdit> a, List<TextEdit> b) =>
- listEqual(a, b, (TextEdit a, TextEdit b) => a == b)) &&
- listEqual(
- documentChanges,
- other.documentChanges,
- (Either4<CreateFile, DeleteFile, RenameFile, TextDocumentEdit> a,
- Either4<CreateFile, DeleteFile, RenameFile,
- TextDocumentEdit>
- b) =>
- a == b) &&
- true;
- }
- return false;
+ return other is WorkspaceEdit &&
+ other.runtimeType == WorkspaceEdit &&
+ mapEqual(changeAnnotations, other.changeAnnotations,
+ (ChangeAnnotation a, ChangeAnnotation b) => a == b) &&
+ mapEqual(
+ changes,
+ other.changes,
+ (List<TextEdit> a, List<TextEdit> b) =>
+ listEqual(a, b, (TextEdit a, TextEdit b) => a == b)) &&
+ listEqual(
+ documentChanges,
+ other.documentChanges,
+ (Either4<CreateFile, DeleteFile, RenameFile, TextDocumentEdit> a,
+ Either4<CreateFile, DeleteFile, RenameFile,
+ TextDocumentEdit>
+ b) =>
+ a == b);
}
@override
@@ -45945,17 +45110,14 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceEditClientCapabilities &&
- other.runtimeType == WorkspaceEditClientCapabilities) {
- return changeAnnotationSupport == other.changeAnnotationSupport &&
- documentChanges == other.documentChanges &&
- failureHandling == other.failureHandling &&
- normalizesLineEndings == other.normalizesLineEndings &&
- listEqual(resourceOperations, other.resourceOperations,
- (ResourceOperationKind a, ResourceOperationKind b) => a == b) &&
- true;
- }
- return false;
+ return other is WorkspaceEditClientCapabilities &&
+ other.runtimeType == WorkspaceEditClientCapabilities &&
+ changeAnnotationSupport == other.changeAnnotationSupport &&
+ documentChanges == other.documentChanges &&
+ failureHandling == other.failureHandling &&
+ normalizesLineEndings == other.normalizesLineEndings &&
+ listEqual(resourceOperations, other.resourceOperations,
+ (ResourceOperationKind a, ResourceOperationKind b) => a == b);
}
@override
@@ -46026,12 +45188,10 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceEditClientCapabilitiesChangeAnnotationSupport &&
+ return other is WorkspaceEditClientCapabilitiesChangeAnnotationSupport &&
other.runtimeType ==
- WorkspaceEditClientCapabilitiesChangeAnnotationSupport) {
- return groupsOnLabel == other.groupsOnLabel && true;
- }
- return false;
+ WorkspaceEditClientCapabilitiesChangeAnnotationSupport &&
+ groupsOnLabel == other.groupsOnLabel;
}
@override
@@ -46125,10 +45285,10 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceFolder && other.runtimeType == WorkspaceFolder) {
- return name == other.name && uri == other.uri && true;
- }
- return false;
+ return other is WorkspaceFolder &&
+ other.runtimeType == WorkspaceFolder &&
+ name == other.name &&
+ uri == other.uri;
}
@override
@@ -46230,15 +45390,12 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceFoldersChangeEvent &&
- other.runtimeType == WorkspaceFoldersChangeEvent) {
- return listEqual(added, other.added,
- (WorkspaceFolder a, WorkspaceFolder b) => a == b) &&
- listEqual(removed, other.removed,
- (WorkspaceFolder a, WorkspaceFolder b) => a == b) &&
- true;
- }
- return false;
+ return other is WorkspaceFoldersChangeEvent &&
+ other.runtimeType == WorkspaceFoldersChangeEvent &&
+ listEqual(added, other.added,
+ (WorkspaceFolder a, WorkspaceFolder b) => a == b) &&
+ listEqual(removed, other.removed,
+ (WorkspaceFolder a, WorkspaceFolder b) => a == b);
}
@override
@@ -46336,13 +45493,10 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceFoldersServerCapabilities &&
- other.runtimeType == WorkspaceFoldersServerCapabilities) {
- return changeNotifications == other.changeNotifications &&
- supported == other.supported &&
- true;
- }
- return false;
+ return other is WorkspaceFoldersServerCapabilities &&
+ other.runtimeType == WorkspaceFoldersServerCapabilities &&
+ changeNotifications == other.changeNotifications &&
+ supported == other.supported;
}
@override
@@ -46523,17 +45677,13 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceFullDocumentDiagnosticReport &&
- other.runtimeType == WorkspaceFullDocumentDiagnosticReport) {
- return listEqual(
- items, other.items, (Diagnostic a, Diagnostic b) => a == b) &&
- kind == other.kind &&
- resultId == other.resultId &&
- uri == other.uri &&
- version == other.version &&
- true;
- }
- return false;
+ return other is WorkspaceFullDocumentDiagnosticReport &&
+ other.runtimeType == WorkspaceFullDocumentDiagnosticReport &&
+ listEqual(items, other.items, (Diagnostic a, Diagnostic b) => a == b) &&
+ kind == other.kind &&
+ resultId == other.resultId &&
+ uri == other.uri &&
+ version == other.version;
}
@override
@@ -46739,16 +45889,14 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceSymbol && other.runtimeType == WorkspaceSymbol) {
- return containerName == other.containerName &&
- data == other.data &&
- kind == other.kind &&
- location == other.location &&
- name == other.name &&
- listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b) &&
- true;
- }
- return false;
+ return other is WorkspaceSymbol &&
+ other.runtimeType == WorkspaceSymbol &&
+ containerName == other.containerName &&
+ data == other.data &&
+ kind == other.kind &&
+ location == other.location &&
+ name == other.name &&
+ listEqual(tags, other.tags, (SymbolTag a, SymbolTag b) => a == b);
}
@override
@@ -46902,15 +46050,12 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceSymbolClientCapabilities &&
- other.runtimeType == WorkspaceSymbolClientCapabilities) {
- return dynamicRegistration == other.dynamicRegistration &&
- resolveSupport == other.resolveSupport &&
- symbolKind == other.symbolKind &&
- tagSupport == other.tagSupport &&
- true;
- }
- return false;
+ return other is WorkspaceSymbolClientCapabilities &&
+ other.runtimeType == WorkspaceSymbolClientCapabilities &&
+ dynamicRegistration == other.dynamicRegistration &&
+ resolveSupport == other.resolveSupport &&
+ symbolKind == other.symbolKind &&
+ tagSupport == other.tagSupport;
}
@override
@@ -46986,13 +46131,9 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceSymbolClientCapabilitiesResolveSupport &&
- other.runtimeType == WorkspaceSymbolClientCapabilitiesResolveSupport) {
- return listEqual(
- properties, other.properties, (String a, String b) => a == b) &&
- true;
- }
- return false;
+ return other is WorkspaceSymbolClientCapabilitiesResolveSupport &&
+ other.runtimeType == WorkspaceSymbolClientCapabilitiesResolveSupport &&
+ listEqual(properties, other.properties, (String a, String b) => a == b);
}
@override
@@ -47063,13 +46204,10 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceSymbolClientCapabilitiesSymbolKind &&
- other.runtimeType == WorkspaceSymbolClientCapabilitiesSymbolKind) {
- return listEqual(valueSet, other.valueSet,
- (SymbolKind a, SymbolKind b) => a == b) &&
- true;
- }
- return false;
+ return other is WorkspaceSymbolClientCapabilitiesSymbolKind &&
+ other.runtimeType == WorkspaceSymbolClientCapabilitiesSymbolKind &&
+ listEqual(
+ valueSet, other.valueSet, (SymbolKind a, SymbolKind b) => a == b);
}
@override
@@ -47140,13 +46278,10 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceSymbolClientCapabilitiesTagSupport &&
- other.runtimeType == WorkspaceSymbolClientCapabilitiesTagSupport) {
- return listEqual(
- valueSet, other.valueSet, (SymbolTag a, SymbolTag b) => a == b) &&
- true;
- }
- return false;
+ return other is WorkspaceSymbolClientCapabilitiesTagSupport &&
+ other.runtimeType == WorkspaceSymbolClientCapabilitiesTagSupport &&
+ listEqual(
+ valueSet, other.valueSet, (SymbolTag a, SymbolTag b) => a == b);
}
@override
@@ -47211,11 +46346,9 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceSymbolLocation &&
- other.runtimeType == WorkspaceSymbolLocation) {
- return uri == other.uri && true;
- }
- return false;
+ return other is WorkspaceSymbolLocation &&
+ other.runtimeType == WorkspaceSymbolLocation &&
+ uri == other.uri;
}
@override
@@ -47302,13 +46435,10 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceSymbolOptions &&
- other.runtimeType == WorkspaceSymbolOptions) {
- return resolveProvider == other.resolveProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is WorkspaceSymbolOptions &&
+ other.runtimeType == WorkspaceSymbolOptions &&
+ resolveProvider == other.resolveProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -47439,14 +46569,11 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceSymbolParams &&
- other.runtimeType == WorkspaceSymbolParams) {
- return partialResultToken == other.partialResultToken &&
- query == other.query &&
- workDoneToken == other.workDoneToken &&
- true;
- }
- return false;
+ return other is WorkspaceSymbolParams &&
+ other.runtimeType == WorkspaceSymbolParams &&
+ partialResultToken == other.partialResultToken &&
+ query == other.query &&
+ workDoneToken == other.workDoneToken;
}
@override
@@ -47537,13 +46664,10 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceSymbolRegistrationOptions &&
- other.runtimeType == WorkspaceSymbolRegistrationOptions) {
- return resolveProvider == other.resolveProvider &&
- workDoneProgress == other.workDoneProgress &&
- true;
- }
- return false;
+ return other is WorkspaceSymbolRegistrationOptions &&
+ other.runtimeType == WorkspaceSymbolRegistrationOptions &&
+ resolveProvider == other.resolveProvider &&
+ workDoneProgress == other.workDoneProgress;
}
@override
@@ -47701,15 +46825,12 @@
@override
bool operator ==(Object other) {
- if (other is WorkspaceUnchangedDocumentDiagnosticReport &&
- other.runtimeType == WorkspaceUnchangedDocumentDiagnosticReport) {
- return kind == other.kind &&
- resultId == other.resultId &&
- uri == other.uri &&
- version == other.version &&
- true;
- }
- return false;
+ return other is WorkspaceUnchangedDocumentDiagnosticReport &&
+ other.runtimeType == WorkspaceUnchangedDocumentDiagnosticReport &&
+ kind == other.kind &&
+ resultId == other.resultId &&
+ uri == other.uri &&
+ version == other.version;
}
@override
diff --git a/pkg/analysis_server/lib/src/cider/rename.dart b/pkg/analysis_server/lib/src/cider/rename.dart
index 02902f3..8d967e5 100644
--- a/pkg/analysis_server/lib/src/cider/rename.dart
+++ b/pkg/analysis_server/lib/src/cider/rename.dart
@@ -445,6 +445,13 @@
ReplaceInfo(this.replacementText, this.startPosition, this.length);
@override
+ int get hashCode => Object.hash(
+ replacementText,
+ startPosition,
+ length,
+ );
+
+ @override
bool operator ==(Object other) =>
other is ReplaceInfo &&
replacementText == other.replacementText &&
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
index a19d7e3..3ed9d3a 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
@@ -28,7 +28,7 @@
class CodeActionHandler extends MessageHandler<CodeActionParams,
List<Either2<Command, CodeAction>>> {
// Because server+plugin results are different types and we lose
- // priorites when converting them to CodeActions, store the priorities
+ // priorities when converting them to CodeActions, store the priorities
// against each action in an expando. This avoids wrapping CodeActions in
// another wrapper class (since we can't modify the LSP-spec-generated
// CodeAction class).
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_null_check.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_null_check.dart
index 8883d2b..10e3faa 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_null_check.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_null_check.dart
@@ -7,6 +7,7 @@
import 'package:analyzer/dart/analysis/features.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/precedence.dart';
+import 'package:analyzer/dart/element/nullability_suffix.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/dart/ast/extensions.dart';
import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
@@ -39,6 +40,9 @@
}
} else if (coveredNode is IndexExpression) {
target = coveredNode.realTarget;
+ if (target.staticType?.nullabilitySuffix != NullabilitySuffix.question) {
+ target = coveredNode;
+ }
} else if (coveredNode is Expression &&
coveredNodeParent is FunctionExpressionInvocation) {
target = coveredNode;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/change_to.dart b/pkg/analysis_server/lib/src/services/correction/dart/change_to.dart
index 8acb906..67c2ff4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/change_to.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/change_to.dart
@@ -12,6 +12,7 @@
import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
import 'package:analyzer_plugin/utilities/range_factory.dart';
+import 'package:collection/collection.dart';
/// A predicate is a one-argument function that returns a boolean value.
typedef _ElementPredicate = bool Function(Element argument);
@@ -29,6 +30,9 @@
/// Initialize a newly created instance that will propose classes and mixins.
ChangeTo.classOrMixin() : _kind = _ReplacementKind.classOrMixin;
+ /// Initialize a newly created instance that will propose formal parameters.
+ ChangeTo.formalParameter() : _kind = _ReplacementKind.formalParameter;
+
/// Initialize a newly created instance that will propose functions.
ChangeTo.function() : _kind = _ReplacementKind.function;
@@ -54,6 +58,8 @@
await _proposeAnnotation(builder);
} else if (_kind == _ReplacementKind.classOrMixin) {
await _proposeClassOrMixin(builder, node);
+ } else if (_kind == _ReplacementKind.formalParameter) {
+ await _proposeFormalParameter(builder);
} else if (_kind == _ReplacementKind.function) {
await _proposeFunction(builder);
} else if (_kind == _ReplacementKind.getterOrSetter) {
@@ -63,6 +69,15 @@
}
}
+ Iterable<ParameterElement> _formalParameterSuggestions(
+ FunctionTypedElement element,
+ Iterable<FormalParameter> formalParameters) {
+ return element.parameters.where((superParam) =>
+ superParam.isNamed &&
+ !formalParameters
+ .any((param) => superParam.name == param.identifier?.name));
+ }
+
Future<void> _proposeAnnotation(ChangeBuilder builder) async {
final node = this.node;
if (node is Annotation) {
@@ -104,13 +119,7 @@
}
}
// If we have a close enough element, suggest to use it.
- var foundElementName = finder._element?.name;
- if (foundElementName != null) {
- _proposedName = foundElementName;
- await builder.addDartFileEdit(file, (builder) {
- builder.addSimpleReplacement(range.node(node), _proposedName);
- });
- }
+ await _suggest(builder, node, finder._element?.name);
}
}
@@ -139,14 +148,51 @@
}
}
// if we have close enough element, suggest to use it
- var foundElementName = finder._element?.displayName;
- if (foundElementName != null) {
- _proposedName = foundElementName;
- await builder.addDartFileEdit(file, (builder) {
- builder.addSimpleReplacement(range.node(node), _proposedName);
- });
+ await _suggest(builder, node, finder._element?.displayName);
+ }
+ }
+
+ Future<void> _proposeFormalParameter(ChangeBuilder builder) async {
+ var parent = node.parent;
+ if (parent is! SuperFormalParameter) return;
+
+ var constructorDeclaration =
+ parent.thisOrAncestorOfType<ConstructorDeclaration>();
+ if (constructorDeclaration == null) return;
+
+ var formalParameters = constructorDeclaration.parameters.parameters
+ .whereType<DefaultFormalParameter>();
+
+ var finder =
+ _ClosestElementFinder(parent.identifier.name, (Element e) => true);
+
+ var superInvocation = constructorDeclaration.initializers.lastOrNull;
+
+ if (superInvocation is SuperConstructorInvocation) {
+ var staticElement = superInvocation.staticElement;
+ if (staticElement == null) return;
+
+ var list = _formalParameterSuggestions(staticElement, formalParameters);
+ finder._updateList(list);
+ } else {
+ var targetClassNode = parent.thisOrAncestorOfType<ClassDeclaration>();
+ if (targetClassNode == null) return;
+
+ var targetClassElement = targetClassNode.declaredElement!;
+ var superType = targetClassElement.supertype;
+ if (superType == null) return;
+
+ for (var constructor in superType.constructors) {
+ if (constructor.name.isEmpty) {
+ var list = _formalParameterSuggestions(constructor, formalParameters);
+ finder._updateList(list);
+ break;
+ }
}
}
+
+ // If we have a close enough element, suggest to use it.
+ await _suggest(builder, node, finder._element?.name);
}
Future<void> _proposeFunction(ChangeBuilder builder) async {
@@ -181,13 +227,7 @@
}
}
// If we have a close enough element, suggest to use it.
- var foundElementName = finder._element?.name;
- if (foundElementName != null) {
- _proposedName = foundElementName;
- await builder.addDartFileEdit(file, (builder) {
- builder.addSimpleReplacement(range.node(node), _proposedName);
- });
- }
+ await _suggest(builder, node, finder._element?.name);
}
}
@@ -226,6 +266,16 @@
}
}
+ Future<void> _suggest(
+ ChangeBuilder builder, AstNode node, String? name) async {
+ if (name != null) {
+ _proposedName = name;
+ await builder.addDartFileEdit(file, (builder) {
+ builder.addSimpleReplacement(range.node(node), _proposedName);
+ });
+ }
+ }
+
void _updateFinderWithClassMembers(
_ClosestElementFinder finder, ClassElement clazz) {
var members = getMembers(clazz);
@@ -283,6 +333,7 @@
enum _ReplacementKind {
annotation,
classOrMixin,
+ formalParameter,
function,
getterOrSetter,
method
diff --git a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
index 8122a23..45ad2c3 100644
--- a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
+++ b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
@@ -921,9 +921,7 @@
status: needsFix
since: 2.17
CompileTimeErrorCode.SUPER_FORMAL_PARAMETER_WITHOUT_ASSOCIATED_NAMED:
- status: needsFix
- since: 2.17
- issue: https://github.com/dart-lang/sdk/issues/48480
+ status: hasFix
CompileTimeErrorCode.SUPER_FORMAL_PARAMETER_WITHOUT_ASSOCIATED_POSITIONAL:
status: needsFix
issue: https://github.com/dart-lang/sdk/issues/48359
@@ -1193,8 +1191,6 @@
status: needsEvaluation
FfiCode.PACKED_ANNOTATION_ALIGNMENT:
status: needsEvaluation
-FfiCode.PACKED_NESTING_NON_PACKED:
- status: needsEvaluation
FfiCode.SIZE_ANNOTATION_DIMENSIONS:
status: needsEvaluation
FfiCode.SUBTYPE_OF_FFI_CLASS_IN_EXTENDS:
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 277b609..dfcb63a 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -1046,6 +1046,9 @@
MakeReturnTypeNullable.new,
ReplaceReturnType.new,
],
+ CompileTimeErrorCode.SUPER_FORMAL_PARAMETER_WITHOUT_ASSOCIATED_NAMED: [
+ ChangeTo.formalParameter,
+ ],
CompileTimeErrorCode.SWITCH_CASE_COMPLETES_NORMALLY: [
AddSwitchCaseBreak.new,
],
diff --git a/pkg/analysis_server/lib/src/services/correction/sort_members.dart b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
index 7fdb383..4c8bed4 100644
--- a/pkg/analysis_server/lib/src/services/correction/sort_members.dart
+++ b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
@@ -325,6 +325,13 @@
}
@override
+ int get hashCode => Object.hash(
+ kind,
+ isPrivate,
+ isStatic,
+ );
+
+ @override
bool operator ==(Object obj) {
var other = obj as _PriorityItem;
if (kind == _MemberKind.CLASS_FIELD) {
diff --git a/pkg/analysis_server/lib/src/services/snippets/dart/dart_snippet_producers.dart b/pkg/analysis_server/lib/src/services/snippets/dart/dart_snippet_producers.dart
index 008b8df..b943eda 100644
--- a/pkg/analysis_server/lib/src/services/snippets/dart/dart_snippet_producers.dart
+++ b/pkg/analysis_server/lib/src/services/snippets/dart/dart_snippet_producers.dart
@@ -166,6 +166,47 @@
DartForLoopSnippetProducer._(request);
}
+/// Produces a [Snippet] that creates a function definition.
+class DartFunctionSnippetProducer extends DartSnippetProducer {
+ static const prefix = 'fun';
+ static const label = 'fun';
+
+ DartFunctionSnippetProducer._(super.request);
+
+ @override
+ Future<Snippet> compute() async {
+ final builder = ChangeBuilder(session: request.analysisSession);
+ final indent = utils.getLinePrefix(request.offset);
+
+ await builder.addDartFileEdit(request.filePath, (builder) {
+ builder.addReplacement(request.replacementRange, (builder) {
+ void writeIndented(String string) => builder.write('$indent$string');
+
+ builder.addSimpleLinkedEdit('returnType', 'void');
+ builder.write(' ');
+ builder.addSimpleLinkedEdit('name', 'name');
+ builder.write('(');
+ builder.addSimpleLinkedEdit('params', 'params');
+ builder.writeln(') {');
+ writeIndented(' ');
+ builder.selectHere();
+ builder.writeln();
+ writeIndented('}');
+ });
+ });
+
+ return Snippet(
+ prefix,
+ label,
+ 'Insert a function definition.',
+ builder.sourceChange,
+ );
+ }
+
+ static DartFunctionSnippetProducer newInstance(DartSnippetRequest request) =>
+ DartFunctionSnippetProducer._(request);
+}
+
/// Produces a [Snippet] that creates an if/else statement.
class DartIfElseSnippetProducer extends DartSnippetProducer {
static const prefix = 'ife';
diff --git a/pkg/analysis_server/lib/src/services/snippets/dart/snippet_manager.dart b/pkg/analysis_server/lib/src/services/snippets/dart/snippet_manager.dart
index 914de9f..006870c 100644
--- a/pkg/analysis_server/lib/src/services/snippets/dart/snippet_manager.dart
+++ b/pkg/analysis_server/lib/src/services/snippets/dart/snippet_manager.dart
@@ -29,8 +29,10 @@
FlutterStatefulWidgetWithAnimationControllerSnippetProducer.newInstance,
FlutterStatelessWidgetSnippetProducer.newInstance,
DartClassSnippetProducer.newInstance,
+ DartFunctionSnippetProducer.newInstance,
],
SnippetContext.inBlock: [
+ DartFunctionSnippetProducer.newInstance,
DartDoWhileLoopSnippetProducer.newInstance,
DartForInLoopSnippetProducer.newInstance,
DartForLoopSnippetProducer.newInstance,
@@ -42,6 +44,9 @@
DartTestBlockSnippetProducer.newInstance,
DartTestGroupBlockSnippetProducer.newInstance,
],
+ SnippetContext.inClass: [
+ DartFunctionSnippetProducer.newInstance,
+ ]
};
Future<List<Snippet>> computeSnippets(
diff --git a/pkg/analysis_server/test/lsp/completion_dart_test.dart b/pkg/analysis_server/test/lsp/completion_dart_test.dart
index 648d17a..81b8f26 100644
--- a/pkg/analysis_server/test/lsp/completion_dart_test.dart
+++ b/pkg/analysis_server/test/lsp/completion_dart_test.dart
@@ -2639,6 +2639,71 @@
''');
}
+ Future<void> test_snippets_functionClassMember() async {
+ final content = '''
+class A {
+ fun^
+}
+''';
+
+ await initializeWithSnippetSupport();
+ final updated = await expectAndApplySnippet(
+ content,
+ prefix: DartFunctionSnippetProducer.prefix,
+ label: DartFunctionSnippetProducer.label,
+ );
+
+ expect(updated, r'''
+class A {
+ ${1:void} ${2:name}(${3:params}) {
+ $0
+ }
+}
+''');
+ }
+
+ Future<void> test_snippets_functionNested() async {
+ final content = '''
+void a() {
+ fun^
+}
+''';
+
+ await initializeWithSnippetSupport();
+ final updated = await expectAndApplySnippet(
+ content,
+ prefix: DartFunctionSnippetProducer.prefix,
+ label: DartFunctionSnippetProducer.label,
+ );
+
+ expect(updated, r'''
+void a() {
+ ${1:void} ${2:name}(${3:params}) {
+ $0
+ }
+}
+''');
+ }
+
+ Future<void> test_snippets_functionTopLevel() async {
+ final content = '''
+fun^
+''';
+
+ await initializeWithSnippetSupport();
+ final updated = await expectAndApplySnippet(
+ content,
+ prefix: DartFunctionSnippetProducer.prefix,
+ label: DartFunctionSnippetProducer.label,
+ );
+
+ expect(updated, r'''
+${1:void} ${2:name}(${3:params}) {
+ $0
+}
+''');
+ }
+
Future<void> test_snippets_if() async {
final content = '''
void f() {
diff --git a/pkg/analysis_server/test/services/snippets/dart/dart_snippet_producers_test.dart b/pkg/analysis_server/test/services/snippets/dart/dart_snippet_producers_test.dart
index 4c00dfa..8ce0a7d 100644
--- a/pkg/analysis_server/test/services/snippets/dart/dart_snippet_producers_test.dart
+++ b/pkg/analysis_server/test/services/snippets/dart/dart_snippet_producers_test.dart
@@ -23,6 +23,7 @@
defineReflectiveTests(DartTryCatchSnippetProducerTest);
defineReflectiveTests(DartWhileLoopSnippetProducerTest);
defineReflectiveTests(DartClassSnippetProducerTest);
+ defineReflectiveTests(DartFunctionSnippetProducerTest);
defineReflectiveTests(DartTestBlockSnippetProducerTest);
defineReflectiveTests(DartTestGroupBlockSnippetProducerTest);
});
@@ -216,6 +217,160 @@
}
@reflectiveTest
+class DartFunctionSnippetProducerTest extends DartSnippetProducerTest {
+ @override
+ final generator = DartFunctionSnippetProducer.newInstance;
+
+ @override
+ String get label => DartFunctionSnippetProducer.label;
+
+ @override
+ String get prefix => DartFunctionSnippetProducer.prefix;
+
+ Future<void> test_classMethod() async {
+ var code = r'''
+class A {
+ ^
+}''';
+ final snippet = await expectValidSnippet(code);
+ expect(snippet.prefix, prefix);
+ expect(snippet.label, label);
+ expect(snippet.change.edits, hasLength(1));
+ code = withoutMarkers(code);
+ for (var edit in snippet.change.edits) {
+ code = SourceEdit.applySequence(code, edit.edits);
+ }
+ expect(code, '''
+class A {
+ void name(params) {
+
+ }
+}''');
+ expect(snippet.change.selection!.file, testFile);
+ expect(snippet.change.selection!.offset, 36);
+ expect(snippet.change.linkedEditGroups.map((group) => group.toJson()), [
+ {
+ 'positions': [
+ {'file': testFile, 'offset': 12},
+ ],
+ 'length': 4,
+ 'suggestions': []
+ },
+ {
+ 'positions': [
+ {'file': testFile, 'offset': 17},
+ ],
+ 'length': 4,
+ 'suggestions': []
+ },
+ {
+ 'positions': [
+ {'file': testFile, 'offset': 22},
+ ],
+ 'length': 6,
+ 'suggestions': []
+ },
+ ]);
+ }
+
+ Future<void> test_nested() async {
+ var code = r'''
+void a() {
+ ^
+}''';
+ final snippet = await expectValidSnippet(code);
+ expect(snippet.prefix, prefix);
+ expect(snippet.label, label);
+ expect(snippet.change.edits, hasLength(1));
+ code = withoutMarkers(code);
+ for (var edit in snippet.change.edits) {
+ code = SourceEdit.applySequence(code, edit.edits);
+ }
+ expect(code, '''
+void a() {
+ void name(params) {
+
+ }
+}''');
+ expect(snippet.change.selection!.file, testFile);
+ expect(snippet.change.selection!.offset, 37);
+ expect(snippet.change.linkedEditGroups.map((group) => group.toJson()), [
+ {
+ 'positions': [
+ {'file': testFile, 'offset': 13},
+ ],
+ 'length': 4,
+ 'suggestions': []
+ },
+ {
+ 'positions': [
+ {'file': testFile, 'offset': 18},
+ ],
+ 'length': 4,
+ 'suggestions': []
+ },
+ {
+ 'positions': [
+ {'file': testFile, 'offset': 23},
+ ],
+ 'length': 6,
+ 'suggestions': []
+ },
+ ]);
+ }
+
+ Future<void> test_topLevel() async {
+ var code = r'''
+class A {}
+
+^
+
+class B {}''';
+ final snippet = await expectValidSnippet(code);
+ expect(snippet.prefix, prefix);
+ expect(snippet.label, label);
+ expect(snippet.change.edits, hasLength(1));
+ code = withoutMarkers(code);
+ for (var edit in snippet.change.edits) {
+ code = SourceEdit.applySequence(code, edit.edits);
+ }
+ expect(code, '''
+class A {}
+
+void name(params) {
+
+}
+
+class B {}''');
+ expect(snippet.change.selection!.file, testFile);
+ expect(snippet.change.selection!.offset, 36);
+ expect(snippet.change.linkedEditGroups.map((group) => group.toJson()), [
+ {
+ 'positions': [
+ {'file': testFile, 'offset': 14},
+ ],
+ 'length': 4,
+ 'suggestions': []
+ },
+ {
+ 'positions': [
+ {'file': testFile, 'offset': 19},
+ ],
+ 'length': 4,
+ 'suggestions': []
+ },
+ {
+ 'positions': [
+ {'file': testFile, 'offset': 24},
+ ],
+ 'length': 6,
+ 'suggestions': []
+ },
+ ]);
+ }
+}
+
+@reflectiveTest
class DartIfElseSnippetProducerTest extends DartSnippetProducerTest {
@override
final generator = DartIfElseSnippetProducer.newInstance;
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart
index 65b56f4..57f1f34c 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart
@@ -193,6 +193,19 @@
''');
}
+ Future<void> test_indexExpression_nonNullableTarget() async {
+ await resolveTestCode('''
+void f(Map<String, String> map) {
+ print('' + map['']);
+}
+''');
+ await assertHasFix('''
+void f(Map<String, String> map) {
+ print('' + map['']!);
+}
+''');
+ }
+
Future<void> test_initializer() async {
await resolveTestCode('''
void f(int? x) {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/change_to_test.dart b/pkg/analysis_server/test/src/services/correction/fix/change_to_test.dart
index d71de37..c652290 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/change_to_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/change_to_test.dart
@@ -638,4 +638,130 @@
}
''');
}
+
+ Future<void> test_super_formal_parameter() async {
+ await resolveTestCode('''
+class A {
+ A({int? one});
+}
+
+class B extends A {
+ B({super.oen});
+}
+''');
+ await assertHasFix('''
+class A {
+ A({int? one});
+}
+
+class B extends A {
+ B({super.one});
+}
+''');
+ }
+
+ Future<void> test_super_formal_parameter_initializer() async {
+ await resolveTestCode('''
+class A {
+ A.n1({int? one});
+}
+
+class B extends A {
+ B.n2({super.oen}) : super.n1();
+}
+''');
+ await assertHasFix('''
+class A {
+ A.n1({int? one});
+}
+
+class B extends A {
+ B.n2({super.one}) : super.n1();
+}
+''');
+ }
+
+ Future<void> test_super_formal_parameter_initializer_named() async {
+ await resolveTestCode('''
+class A {
+ A(int? one, {int? done});
+}
+
+class B extends A {
+ B.n({super.ne}) : super(1);
+}
+''');
+ await assertHasFix('''
+class A {
+ A(int? one, {int? done});
+}
+
+class B extends A {
+ B.n({super.done}) : super(1);
+}
+''');
+ }
+
+ Future<void> test_super_formal_parameter_name_empty() async {
+ await resolveTestCode('''
+class A {
+ A(int? one, {int? done});
+}
+
+class B extends A {
+ B(super.one, {super.ne});
+}
+''');
+ await assertHasFix('''
+class A {
+ A(int? one, {int? done});
+}
+
+class B extends A {
+ B(super.one, {super.done});
+}
+''');
+ }
+
+ Future<void> test_super_formal_parameter_named() async {
+ await resolveTestCode('''
+class A {
+ A({int? one});
+}
+
+class B extends A {
+ B.n({super.oen});
+}
+''');
+ await assertHasFix('''
+class A {
+ A({int? one});
+}
+
+class B extends A {
+ B.n({super.one});
+}
+''');
+ }
+
+ Future<void> test_super_formal_parameter_used() async {
+ await resolveTestCode('''
+class A {
+ A({int? one, int? done});
+}
+
+class B extends A {
+ B({super.one, super.ne});
+}
+''');
+ await assertHasFix('''
+class A {
+ A({int? one, int? done});
+}
+
+class B extends A {
+ B({super.one, super.done});
+}
+''');
+ }
}
diff --git a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
index 2c1186e..0b899cb 100644
--- a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
+++ b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
@@ -525,19 +525,17 @@
// We want an exact type match, but also need `is` to have the analyzer
// promote the type to allow access to the fields on `other`.
..writeIndentedln(
- 'if (other is ${interface.name} && other.runtimeType == ${interface.name}) {')
+ 'return other is ${interface.name} && other.runtimeType == ${interface.name}')
..indent()
- ..writeIndented('return ');
+ ..writeIndented('');
for (var field in _getAllFields(interface)) {
+ buffer.write(' && ');
final type = resolveTypeAlias(field.type);
_writeEqualsExpression(buffer, type, field.name, 'other.${field.name}');
- buffer.write(' && ');
}
buffer
- ..writeln('true;')
+ ..writeln(';')
..outdent()
- ..writeIndentedln('}')
- ..writeIndentedln('return false;')
..outdent()
..writeIndentedln('}');
}
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index 46810d4..6d41685 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -539,7 +539,6 @@
FfiCode.NON_SIZED_TYPE_ARGUMENT,
FfiCode.PACKED_ANNOTATION,
FfiCode.PACKED_ANNOTATION_ALIGNMENT,
- FfiCode.PACKED_NESTING_NON_PACKED,
FfiCode.SIZE_ANNOTATION_DIMENSIONS,
FfiCode.SUBTYPE_OF_FFI_CLASS_IN_EXTENDS,
FfiCode.SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS,
diff --git a/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart b/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart
index adb53ee..f6ecb70 100644
--- a/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart
@@ -42,11 +42,12 @@
hasPublishedDocs: true,
);
- /// No parameters.
+ /// Parameters:
+ /// 0: the value of the invalid mapping
static const FfiCode ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED = FfiCode(
'ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED',
- "Only mappings to 'Int8', 'Int16', 'Int32', 'Int64', 'Uint8', 'Uint16', "
- "'UInt32', and 'Uint64' are supported.",
+ "Invalid mapping to '{0}'; only mappings to 'Int8', 'Int16', 'Int32', "
+ "'Int64', 'Uint8', 'Uint16', 'UInt32', and 'Uint64' are supported.",
correctionMessage:
"Try changing the value to 'Int8', 'Int16', 'Int32', 'Int64', 'Uint8', "
"'Uint16', 'UInt32', or 'Uint64'.",
@@ -368,19 +369,6 @@
hasPublishedDocs: true,
);
- /// Parameters:
- /// 0: the name of the outer struct
- /// 1: the name of the struct being nested
- static const FfiCode PACKED_NESTING_NON_PACKED = FfiCode(
- 'PACKED_NESTING_NON_PACKED',
- "Nesting the non-packed or less tightly packed struct '{0}' in a packed "
- "struct '{1}' isn't supported.",
- correctionMessage:
- "Try packing the nested struct or packing the nested struct more "
- "tightly.",
- hasPublishedDocs: true,
- );
-
/// No parameters.
static const FfiCode SIZE_ANNOTATION_DIMENSIONS = FfiCode(
'SIZE_ANNOTATION_DIMENSIONS',
diff --git a/pkg/analyzer/lib/src/generated/ffi_verifier.dart b/pkg/analyzer/lib/src/generated/ffi_verifier.dart
index 3edee4b..5758264 100644
--- a/pkg/analyzer/lib/src/generated/ffi_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/ffi_verifier.dart
@@ -631,8 +631,32 @@
}
}
+ var annotation = ffiPackedAnnotations.first;
+
+ final arguments = annotation.arguments?.arguments;
+ if (arguments == null) {
+ return;
+ }
+
+ for (final argument in arguments) {
+ if (argument is SetOrMapLiteral) {
+ for (final element in argument.elements) {
+ if (element is MapLiteralEntry) {
+ final name = element.value.staticType?.element?.name;
+ if (name != null &&
+ !_primitiveIntegerNativeTypesFixedSize.contains(name)) {
+ _errorReporter.reportErrorForNode(
+ FfiCode.ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED,
+ element.value,
+ [name]);
+ }
+ }
+ }
+ return;
+ }
+ }
final annotationConstant =
- ffiPackedAnnotations.first.elementAnnotation?.computeConstantValue();
+ annotation.elementAnnotation?.computeConstantValue();
final mappingValues = annotationConstant?.getField('mapping')?.toMapValue();
if (mappingValues == null) {
return;
@@ -643,7 +667,8 @@
!_primitiveIntegerNativeTypesFixedSize.contains(nativeTypeName)) {
_errorReporter.reportErrorForNode(
FfiCode.ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED,
- ffiPackedAnnotations.first.name);
+ arguments.first,
+ [nativeTypeName]);
}
}
}
@@ -918,12 +943,6 @@
}
final arrayDimensions = declaredType.arrayDimensions;
_validateSizeOfAnnotation(fieldType, annotations, arrayDimensions);
- final arrayElement = declaredType.arrayElementType;
- if (arrayElement.isCompoundSubtype) {
- final elementClass = (arrayElement as InterfaceType).element;
- _validatePackingNesting(compound!.declaredElement!, elementClass,
- errorNode: fieldType);
- }
} else if (declaredType.isCompoundSubtype) {
final clazz = (declaredType as InterfaceType).element;
if (clazz.isEmptyStruct) {
@@ -932,8 +951,6 @@
clazz.supertype!.getDisplayString(withNullability: false)
]);
}
- _validatePackingNesting(compound!.declaredElement!, clazz,
- errorNode: fieldType);
} else {
_errorReporter.reportErrorForNode(FfiCode.INVALID_FIELD_TYPE_IN_STRUCT,
fieldType, [fieldType.toSource()]);
@@ -1099,28 +1116,6 @@
}
}
- void _validatePackingNesting(ClassElement outer, ClassElement nested,
- {required TypeAnnotation errorNode}) {
- final outerPacking = outer.structPacking;
- if (outerPacking == null) {
- // No packing for outer class, so we're done.
- return;
- }
- bool error = false;
- final nestedPacking = nested.structPacking;
- if (nestedPacking == null) {
- // The outer struct packs, but the nested struct does not.
- error = true;
- } else if (outerPacking < nestedPacking) {
- // The outer struct packs tighter than the nested struct.
- error = true;
- }
- if (error) {
- _errorReporter.reportErrorForNode(FfiCode.PACKED_NESTING_NON_PACKED,
- errorNode, [nested.name, outer.name]);
- }
- }
-
void _validateRefIndexed(IndexExpression node) {
var targetType = node.realTarget.staticType;
if (!_isValidFfiNativeType(targetType,
@@ -1459,17 +1454,6 @@
bool get isFfiClass {
return library.name == FfiVerifier._dartFfiLibraryName;
}
-
- int? get structPacking {
- final packedAnnotations =
- metadata.where((annotation) => annotation.isPacked);
-
- if (packedAnnotations.isEmpty) {
- return null;
- }
-
- return packedAnnotations.first.packedMemberAlignment;
- }
}
extension on ExtensionElement {
@@ -1508,16 +1492,6 @@
return dimensions;
}
- DartType get arrayElementType {
- DartType iterator = this;
- while (iterator is InterfaceType &&
- iterator.element.name == FfiVerifier._arrayClassName &&
- iterator.element.isFfiClass) {
- iterator = iterator.typeArguments.single;
- }
- return iterator;
- }
-
bool get isAbiSpecificInteger {
final self = this;
if (self is InterfaceType) {
diff --git a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
index da702a3..20aa8ab 100644
--- a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
+++ b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
@@ -86,6 +86,10 @@
throw 0;
}
+ factory Stream.value(T value) {
+ throw 0;
+ }
+
Future<T> get first;
StreamSubscription<T> listen(void onData(T event)?,
diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml
index ba11178d..f0e456a 100644
--- a/pkg/analyzer/messages.yaml
+++ b/pkg/analyzer/messages.yaml
@@ -5685,10 +5685,10 @@
The following code produces this diagnostic because the class `A` is used
in both the `extends` and `with` clauses for the class `B`:
-
+
```dart
class A {}
-
+
class B extends A with [!A!] {}
```
@@ -15809,10 +15809,12 @@
}
```
ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED:
- problemMessage: "Only mappings to 'Int8', 'Int16', 'Int32', 'Int64', 'Uint8', 'Uint16', 'UInt32', and 'Uint64' are supported."
+ problemMessage: "Invalid mapping to '{0}'; only mappings to 'Int8', 'Int16', 'Int32', 'Int64', 'Uint8', 'Uint16', 'UInt32', and 'Uint64' are supported."
correctionMessage: Try changing the value to 'Int8', 'Int16', 'Int32', 'Int64', 'Uint8', 'Uint16', 'UInt32', or 'Uint64'.
hasPublishedDocs: true
- comment: No parameters.
+ comment: |-
+ Parameters:
+ 0: the value of the invalid mapping
documentation: |-
#### Description
@@ -15836,7 +15838,7 @@
```dart
import 'dart:ffi';
- @[!AbiSpecificIntegerMapping!]({Abi.macosX64 : Array<Uint8>(4)})
+ @AbiSpecificIntegerMapping({Abi.macosX64 : [!Array<Uint8>(4)!]})
class C extends AbiSpecificInteger {
const C();
}
@@ -17170,91 +17172,6 @@
external Pointer<Uint8> notEmpty;
}
```
- PACKED_NESTING_NON_PACKED:
- problemMessage: "Nesting the non-packed or less tightly packed struct '{0}' in a packed struct '{1}' isn't supported."
- correctionMessage: Try packing the nested struct or packing the nested struct more tightly.
- comment: |-
- Parameters:
- 0: the name of the outer struct
- 1: the name of the struct being nested
- hasPublishedDocs: true
- documentation: |-
- #### Description
-
- The analyzer produces this diagnostic when a subclass of `Struct` that is
- annotated as being `Packed` declares a field whose type is also a subclass
- of `Struct` and the field's type is either not packed or is packed less
- tightly.
-
- For more information about FFI, see [C interop using dart:ffi][ffi].
-
- #### Example
-
- The following code produces this diagnostic because the class `Outer`,
- which is a subclass of `Struct` and is packed on 1-byte boundaries,
- declared a field whose type (`Inner`) is packed on 8-byte boundaries:
-
- ```dart
- import 'dart:ffi';
-
- @Packed(8)
- class Inner extends Struct {
- external Pointer<Uint8> notEmpty;
- }
-
- @Packed(1)
- class Outer extends Struct {
- external Pointer<Uint8> notEmpty;
-
- external [!Inner!] nestedLooselyPacked;
- }
- ```
-
- #### Common fixes
-
- If the inner struct should be packed more tightly, then change the
- argument to the inner struct's `Packed` annotation:
-
- ```dart
- import 'dart:ffi';
-
- @Packed(1)
- class Inner extends Struct {
- external Pointer<Uint8> notEmpty;
- }
-
- @Packed(1)
- class Outer extends Struct {
- external Pointer<Uint8> notEmpty;
-
- external Inner nestedLooselyPacked;
- }
- ```
-
- If the outer struct should be packed less tightly, then change the
- argument to the outer struct's `Packed` annotation:
-
- ```dart
- import 'dart:ffi';
-
- @Packed(8)
- class Inner extends Struct {
- external Pointer<Uint8> notEmpty;
- }
-
- @Packed(8)
- class Outer extends Struct {
- external Pointer<Uint8> notEmpty;
-
- external Inner nestedLooselyPacked;
- }
- ```
-
- If the inner struct doesn't have an annotation and should be packed, then
- add an annotation.
-
- If the inner struct doesn't have an annotation and the outer struct
- shouldn't be packed, then remove its annotation.
SIZE_ANNOTATION_DIMENSIONS:
problemMessage: "'Array's must have an 'Array' annotation that matches the dimensions."
correctionMessage: "Try adjusting the arguments in the 'Array' annotation."
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 00a42fb..66ec302 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -1733,60 +1733,6 @@
''');
}
- test_infer_mixin_new_syntax() async {
- await assertNoErrorsInCode('''
-abstract class A<T> {}
-
-class B {}
-
-mixin M<T> on A<T> {}
-
-class C extends A<B> with M {}
-''');
- CompilationUnit unit = result.unit;
- ClassElement classC = unit.declaredElement!.getType('C')!;
- expect(classC.mixins, hasLength(1));
- assertType(classC.mixins[0], 'M<B>');
- }
-
- test_infer_mixin_with_substitution_functionType_new_syntax() async {
- await assertErrorsInCode('''
-abstract class A<T> {}
-
-class B {}
-
-mixin M<T, U> on A<T Function(U)> {}
-
-class C extends A<int Function(String)> with M {}
-''', [
- error(
- CompileTimeErrorCode.WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE,
- 47,
- 1,
- ),
- ]);
- CompilationUnit unit = result.unit;
- ClassElement classC = unit.declaredElement!.getType('C')!;
- expect(classC.mixins, hasLength(1));
- assertType(classC.mixins[0], 'M<int, String>');
- }
-
- test_infer_mixin_with_substitution_new_syntax() async {
- await assertNoErrorsInCode('''
-abstract class A<T> {}
-
-class B {}
-
-mixin M<T> on A<List<T>> {}
-
-class C extends A<List<B>> with M {}
-''');
- CompilationUnit unit = result.unit;
- ClassElement classC = unit.declaredElement!.getType('C')!;
- expect(classC.mixins, hasLength(1));
- assertType(classC.mixins[0], 'M<B>');
- }
-
test_initializingFormalForNonExistentField() async {
await assertNoErrorsInCode(r'''
class A {
@@ -2393,39 +2339,6 @@
''');
}
- test_mixin_of_mixin_type_argument_inference() async {
- // In the code below, B's superclass constraints don't include A, because
- // superclass constraints are determined from the mixin's superclass, and
- // B's superclass is Object. So no mixin type inference is attempted, and
- // "with B" is interpreted as "with B<dynamic>".
- await assertNoErrorsInCode('''
-class A<T> {}
-class B<T> = Object with A<T>;
-class C = Object with B;
-''');
- var bReference = result.unit.declaredElement!.getType('C')!.mixins[0];
- assertTypeDynamic(bReference.typeArguments[0]);
- }
-
- test_mixin_of_mixin_type_argument_inference_cascaded_mixin() async {
- // In the code below, B has a single superclass constraint, A1, because
- // superclass constraints are determined from the mixin's superclass, and
- // B's superclass is "Object with A1<T>". So mixin type inference succeeds
- // (since C's base class implements A1<int>), and "with B" is interpreted as
- // "with B<int>".
- await assertErrorsInCode('''
-class A1<T> {}
-class A2<T> {}
-class B<T> = Object with A1<T>, A2<T>;
-class Base implements A1<int> {}
-class C = Base with B;
-''', [
- error(CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT, 122, 1),
- ]);
- var bReference = result.unit.declaredElement!.getType('C')!.mixins[0];
- assertType(bReference.typeArguments[0], 'int');
- }
-
test_mixinDeclaresConstructor() async {
await assertNoErrorsInCode(r'''
class A {
@@ -2444,30 +2357,6 @@
''');
}
- test_mixinInference_with_actual_mixins() async {
- await assertNoErrorsInCode('''
-class I<X> {}
-
-mixin M0<T> on I<T> {}
-
-mixin M1<T> on I<T> {
- T foo(T a) => a;
-}
-
-class A = I<int> with M0, M1;
-
-void main () {
- var x = new A().foo(0);
- x;
-}
-''');
- var main = result.unit.declarations.last as FunctionDeclaration;
- var mainBody = main.functionExpression.body as BlockFunctionBody;
- var xDecl = mainBody.block.statements[0] as VariableDeclarationStatement;
- var xElem = xDecl.variables.variables[0].declaredElement!;
- assertType(xElem.type, 'int');
- }
-
test_multipleSuperInitializers_no() async {
await assertNoErrorsInCode(r'''
class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/abi_specific_integer_mapping_test.dart b/pkg/analyzer/test/src/diagnostics/abi_specific_integer_mapping_test.dart
index 746ce71..485e512 100644
--- a/pkg/analyzer/test/src/diagnostics/abi_specific_integer_mapping_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/abi_specific_integer_mapping_test.dart
@@ -40,7 +40,30 @@
const UintPtr();
}
''', [
- error(FfiCode.ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED, 20, 25),
+ error(FfiCode.ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED, 96, 8,
+ messageContains: ["Invalid mapping to 'IntPtr'"]),
+ error(FfiCode.ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED, 125, 9,
+ messageContains: ["Invalid mapping to 'UintPtr'"]),
+ ]);
+ }
+
+ test_invalidMapping_identifier() async {
+ await assertErrorsInCode(r'''
+import 'dart:ffi';
+const c = {
+ Abi.androidArm: Uint32(),
+ Abi.androidArm64: IntPtr(),
+ Abi.androidIA32: UintPtr(),
+};
+@AbiSpecificIntegerMapping(c)
+class UintPtr extends AbiSpecificInteger {
+ const UintPtr();
+}
+''', [
+ error(FfiCode.ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED, 149, 1,
+ messageContains: ["Invalid mapping to 'IntPtr'"]),
+ error(FfiCode.ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED, 149, 1,
+ messageContains: ["Invalid mapping to 'UintPtr'"]),
]);
}
diff --git a/pkg/analyzer/test/src/diagnostics/packed_nesting_non_packed_test.dart b/pkg/analyzer/test/src/diagnostics/packed_nesting_non_packed_test.dart
deleted file mode 100644
index 9751139..0000000
--- a/pkg/analyzer/test/src/diagnostics/packed_nesting_non_packed_test.dart
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/dart/error/ffi_code.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../dart/resolution/context_collection_resolution.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(PackedAnnotationNestingNonPacked);
- });
-}
-
-@reflectiveTest
-class PackedAnnotationNestingNonPacked extends PubPackageResolutionTest {
- test_error_1() async {
- await assertErrorsInCode(r'''
-import 'dart:ffi';
-
-class TestStruct1603 extends Struct {
- external Pointer<Uint8> notEmpty;
-}
-
-@Packed(1)
-class TestStruct1603Packed extends Struct {
- external Pointer<Uint8> notEmpty;
-
- external TestStruct1603 nestedNotPacked;
-}
-''', [
- error(FfiCode.PACKED_NESTING_NON_PACKED, 200, 14),
- ]);
- }
-
- test_error_2() async {
- await assertErrorsInCode(r'''
-import 'dart:ffi';
-
-@Packed(8)
-class TestStruct1604 extends Struct {
- external Pointer<Uint8> notEmpty;
-}
-
-@Packed(1)
-class TestStruct1604Packed extends Struct {
- external Pointer<Uint8> notEmpty;
-
- external TestStruct1604 nestedLooselyPacked;
-}
-''', [
- error(FfiCode.PACKED_NESTING_NON_PACKED, 211, 14),
- ]);
- }
-
- test_error_3() async {
- await assertErrorsInCode(r'''
-import 'dart:ffi';
-
-class TestStruct1603 extends Struct {
- external Pointer<Uint8> notEmpty;
-}
-
-@Packed(1)
-class TestStruct1605Packed extends Struct {
- external Pointer<Uint8> notEmpty;
-
- @Array(2)
- external Array<TestStruct1603> nestedNotPacked;
-}
-''', [
- error(FfiCode.PACKED_NESTING_NON_PACKED, 212, 21),
- ]);
- }
-
- test_error_4() async {
- await assertErrorsInCode(r'''
-import 'dart:ffi';
-
-@Packed(8)
-class TestStruct1604 extends Struct {
- external Pointer<Uint8> notEmpty;
-}
-
-@Packed(1)
-class TestStruct1606Packed extends Struct {
- external Pointer<Uint8> notEmpty;
-
- @Array(2)
- external Array<TestStruct1604> nestedLooselyPacked;
-}
-''', [
- error(FfiCode.PACKED_NESTING_NON_PACKED, 223, 21),
- ]);
- }
-
- test_no_error() async {
- await assertNoErrorsInCode(r'''
-import 'dart:ffi';
-
-@Packed(1)
-class TestStruct1604 extends Struct {
- external Pointer<Uint8> notEmpty;
-}
-
-@Packed(1)
-class TestStruct1606Packed extends Struct {
- external Pointer<Uint8> notEmpty;
-
- @Array(2)
- external Array<TestStruct1604> nestedLooselyPacked;
-}
-''');
- }
-}
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
index 1a9a39d..2e99aee 100644
--- a/pkg/analyzer/test/src/diagnostics/test_all.dart
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -588,7 +588,6 @@
as override_on_non_overriding_setter;
import 'packed_annotation_alignment_test.dart' as packed_annotation_alignment;
import 'packed_annotation_test.dart' as packed_annotation;
-import 'packed_nesting_non_packed_test.dart' as packed_nesting_non_packed;
import 'part_of_different_library_test.dart' as part_of_different_library;
import 'part_of_non_part_test.dart' as part_of_non_part;
import 'positional_super_formal_parameter_with_positional_argument_test.dart'
@@ -1184,7 +1183,6 @@
override_on_non_overriding_setter.main();
packed_annotation.main();
packed_annotation_alignment.main();
- packed_nesting_non_packed.main();
part_of_different_library.main();
part_of_non_part.main();
positional_super_formal_parameter_with_positional_argument.main();
diff --git a/pkg/analyzer/test/src/summary/elements_test.dart b/pkg/analyzer/test/src/summary/elements_test.dart
index 30a655d..7101cab 100644
--- a/pkg/analyzer/test/src/summary/elements_test.dart
+++ b/pkg/analyzer/test/src/summary/elements_test.dart
@@ -30683,6 +30683,129 @@
''');
}
+ test_mixin_inference_classAlias_oneMixin() async {
+ // In the code below, B's superclass constraints don't include A, because
+ // superclass constraints are determined from the mixin's superclass, and
+ // B's superclass is Object. So no mixin type inference is attempted, and
+ // "with B" is interpreted as "with B<dynamic>".
+ var library = await buildLibrary(r'''
+class A<T> {}
+class B<T> = Object with A<T>;
+class C = A<int> with B;
+''');
+ checkElementText(library, r'''
+library
+ definingUnit
+ classes
+ class A @6
+ typeParameters
+ covariant T @8
+ defaultType: dynamic
+ constructors
+ synthetic @-1
+ class alias B @20
+ typeParameters
+ covariant T @22
+ defaultType: dynamic
+ supertype: Object
+ mixins
+ A<T>
+ constructors
+ synthetic const @-1
+ constantInitializers
+ SuperConstructorInvocation
+ superKeyword: super @0
+ argumentList: ArgumentList
+ leftParenthesis: ( @0
+ rightParenthesis: ) @0
+ staticElement: dart:core::@class::Object::@constructor::•
+ class alias C @51
+ supertype: A<int>
+ mixins
+ B<dynamic>
+ constructors
+ synthetic @-1
+ constantInitializers
+ SuperConstructorInvocation
+ superKeyword: super @0
+ argumentList: ArgumentList
+ leftParenthesis: ( @0
+ rightParenthesis: ) @0
+ staticElement: self::@class::A::@constructor::•
+ superConstructor: ConstructorMember
+ base: self::@class::A::@constructor::•
+ substitution: {T: int}
+''');
+ }
+
+ test_mixin_inference_classAlias_twoMixins() async {
+ // In the code below, `B` has a single superclass constraint, A1, because
+ // superclass constraints are determined from the mixin's superclass, and
+ // B's superclass is "Object with A1<T>". So mixin type inference succeeds
+ // (since C's base class implements A1<int>), and "with B" is interpreted as
+ // "with B<int>".
+ var library = await buildLibrary(r'''
+class A1<T> {}
+class A2<T> {}
+class B<T> = Object with A1<T>, A2<T>;
+class Base implements A1<int> {}
+class C = Base with B;
+''');
+ checkElementText(library, r'''
+library
+ definingUnit
+ classes
+ class A1 @6
+ typeParameters
+ covariant T @9
+ defaultType: dynamic
+ constructors
+ synthetic @-1
+ class A2 @21
+ typeParameters
+ covariant T @24
+ defaultType: dynamic
+ constructors
+ synthetic @-1
+ class alias B @36
+ typeParameters
+ covariant T @38
+ defaultType: dynamic
+ supertype: Object
+ mixins
+ A1<T>
+ A2<T>
+ constructors
+ synthetic const @-1
+ constantInitializers
+ SuperConstructorInvocation
+ superKeyword: super @0
+ argumentList: ArgumentList
+ leftParenthesis: ( @0
+ rightParenthesis: ) @0
+ staticElement: dart:core::@class::Object::@constructor::•
+ class Base @75
+ interfaces
+ A1<int>
+ constructors
+ synthetic @-1
+ class alias C @108
+ supertype: Base
+ mixins
+ B<int>
+ constructors
+ synthetic @-1
+ constantInitializers
+ SuperConstructorInvocation
+ superKeyword: super @0
+ argumentList: ArgumentList
+ leftParenthesis: ( @0
+ rightParenthesis: ) @0
+ staticElement: self::@class::Base::@constructor::•
+ superConstructor: self::@class::Base::@constructor::•
+''');
+ }
+
test_mixin_inference_legacy() async {
var library = await buildLibrary(r'''
// @dart = 2.9
@@ -30719,6 +30842,78 @@
''');
}
+ test_mixin_inference_nested_functionType() async {
+ var library = await buildLibrary(r'''
+class A<T> {}
+mixin M<T, U> on A<T Function(U)> {}
+class C extends A<int Function(String)> with M {}
+''');
+ checkElementText(library, r'''
+library
+ definingUnit
+ classes
+ class A @6
+ typeParameters
+ covariant T @8
+ defaultType: dynamic
+ constructors
+ synthetic @-1
+ class C @57
+ supertype: A<int Function(String)>
+ mixins
+ M<int, String>
+ constructors
+ synthetic @-1
+ superConstructor: ConstructorMember
+ base: self::@class::A::@constructor::•
+ substitution: {T: int Function(String)}
+ mixins
+ mixin M @20
+ typeParameters
+ covariant T @22
+ defaultType: dynamic
+ covariant U @25
+ defaultType: dynamic
+ superclassConstraints
+ A<T Function(U)>
+''');
+ }
+
+ test_mixin_inference_nested_interfaceType() async {
+ var library = await buildLibrary(r'''
+abstract class A<T> {}
+mixin M<T> on A<List<T>> {}
+class C extends A<List<int>> with M {}
+''');
+ checkElementText(library, r'''
+library
+ definingUnit
+ classes
+ abstract class A @15
+ typeParameters
+ covariant T @17
+ defaultType: dynamic
+ constructors
+ synthetic @-1
+ class C @57
+ supertype: A<List<int>>
+ mixins
+ M<int>
+ constructors
+ synthetic @-1
+ superConstructor: ConstructorMember
+ base: self::@class::A::@constructor::•
+ substitution: {T: List<int>}
+ mixins
+ mixin M @29
+ typeParameters
+ covariant T @31
+ defaultType: dynamic
+ superclassConstraints
+ A<List<T>>
+''');
+ }
+
test_mixin_inference_nullSafety() async {
var library = await buildLibrary(r'''
class A<T> {}
@@ -30834,6 +31029,57 @@
''');
}
+ test_mixin_inference_twoMixins() async {
+ // Both `M1` and `M2` have their type arguments inferred.
+ var library = await buildLibrary(r'''
+class I<X> {}
+mixin M1<T> on I<T> {}
+mixin M2<T> on I<T> {}
+class A = I<int> with M1, M2;
+''');
+ checkElementText(library, r'''
+library
+ definingUnit
+ classes
+ class I @6
+ typeParameters
+ covariant X @8
+ defaultType: dynamic
+ constructors
+ synthetic @-1
+ class alias A @66
+ supertype: I<int>
+ mixins
+ M1<int>
+ M2<int>
+ constructors
+ synthetic @-1
+ constantInitializers
+ SuperConstructorInvocation
+ superKeyword: super @0
+ argumentList: ArgumentList
+ leftParenthesis: ( @0
+ rightParenthesis: ) @0
+ staticElement: self::@class::I::@constructor::•
+ superConstructor: ConstructorMember
+ base: self::@class::I::@constructor::•
+ substitution: {X: int}
+ mixins
+ mixin M1 @20
+ typeParameters
+ covariant T @23
+ defaultType: dynamic
+ superclassConstraints
+ I<T>
+ mixin M2 @43
+ typeParameters
+ covariant T @46
+ defaultType: dynamic
+ superclassConstraints
+ I<T>
+''');
+ }
+
test_mixin_method_invokesSuperSelf() async {
var library = await buildLibrary(r'''
mixin M on A {
diff --git a/pkg/analyzer/tool/diagnostics/diagnostics.md b/pkg/analyzer/tool/diagnostics/diagnostics.md
index 17e8bb1e..efcbc27 100644
--- a/pkg/analyzer/tool/diagnostics/diagnostics.md
+++ b/pkg/analyzer/tool/diagnostics/diagnostics.md
@@ -468,8 +468,8 @@
### abi_specific_integer_mapping_unsupported
-_Only mappings to 'Int8', 'Int16', 'Int32', 'Int64', 'Uint8', 'Uint16',
-'UInt32', and 'Uint64' are supported._
+_Invalid mapping to '{0}'; only mappings to 'Int8', 'Int16', 'Int32', 'Int64',
+'Uint8', 'Uint16', 'UInt32', and 'Uint64' are supported._
#### Description
@@ -493,7 +493,7 @@
{% prettify dart tag=pre+code %}
import 'dart:ffi';
-@[!AbiSpecificIntegerMapping!]({Abi.macosX64 : Array<Uint8>(4)})
+@AbiSpecificIntegerMapping({Abi.macosX64 : [!Array<Uint8>(4)!]})
class C extends AbiSpecificInteger {
const C();
}
@@ -14117,88 +14117,6 @@
}
{% endprettify %}
-### packed_nesting_non_packed
-
-_Nesting the non-packed or less tightly packed struct '{0}' in a packed struct
-'{1}' isn't supported._
-
-#### Description
-
-The analyzer produces this diagnostic when a subclass of `Struct` that is
-annotated as being `Packed` declares a field whose type is also a subclass
-of `Struct` and the field's type is either not packed or is packed less
-tightly.
-
-For more information about FFI, see [C interop using dart:ffi][ffi].
-
-#### Example
-
-The following code produces this diagnostic because the class `Outer`,
-which is a subclass of `Struct` and is packed on 1-byte boundaries,
-declared a field whose type (`Inner`) is packed on 8-byte boundaries:
-
-{% prettify dart tag=pre+code %}
-import 'dart:ffi';
-
-@Packed(8)
-class Inner extends Struct {
- external Pointer<Uint8> notEmpty;
-}
-
-@Packed(1)
-class Outer extends Struct {
- external Pointer<Uint8> notEmpty;
-
- external [!Inner!] nestedLooselyPacked;
-}
-{% endprettify %}
-
-#### Common fixes
-
-If the inner struct should be packed more tightly, then change the
-argument to the inner struct's `Packed` annotation:
-
-{% prettify dart tag=pre+code %}
-import 'dart:ffi';
-
-@Packed(1)
-class Inner extends Struct {
- external Pointer<Uint8> notEmpty;
-}
-
-@Packed(1)
-class Outer extends Struct {
- external Pointer<Uint8> notEmpty;
-
- external Inner nestedLooselyPacked;
-}
-{% endprettify %}
-
-If the outer struct should be packed less tightly, then change the
-argument to the outer struct's `Packed` annotation:
-
-{% prettify dart tag=pre+code %}
-import 'dart:ffi';
-
-@Packed(8)
-class Inner extends Struct {
- external Pointer<Uint8> notEmpty;
-}
-
-@Packed(8)
-class Outer extends Struct {
- external Pointer<Uint8> notEmpty;
-
- external Inner nestedLooselyPacked;
-}
-{% endprettify %}
-
-If the inner struct doesn't have an annotation and should be packed, then
-add an annotation.
-
-If the inner struct doesn't have an annotation and the outer struct
-shouldn't be packed, then remove its annotation.
-
### part_of_different_library
_Expected this library to be part of '{0}', not '{1}'._
diff --git a/pkg/dev_compiler/lib/ddc.dart b/pkg/dev_compiler/lib/ddc.dart
index 5911cd9..feaa482 100755
--- a/pkg/dev_compiler/lib/ddc.dart
+++ b/pkg/dev_compiler/lib/ddc.dart
@@ -14,6 +14,7 @@
import 'package:bazel_worker/bazel_worker.dart';
import 'src/compiler/shared_command.dart';
+import 'src/kernel/command.dart';
import 'src/kernel/expression_compiler_worker.dart';
/// The internal entry point for the Dart Dev Compiler.
@@ -66,8 +67,8 @@
}
lastResult = await runZoned(
- () =>
- compile(args, previousResult: context, inputDigests: inputDigests),
+ () => compile(args,
+ compilerState: context?.kernelState, inputDigests: inputDigests),
zoneSpecification:
ZoneSpecification(print: (self, parent, zone, message) {
output.writeln(message.toString());
@@ -95,7 +96,7 @@
String outcome;
try {
- result = await compile(args, previousResult: result);
+ result = await compile(args, compilerState: result?.kernelState);
outcome = result.success ? 'PASS' : (result.crashed ? 'CRASH' : 'FAIL');
} catch (e, s) {
outcome = 'CRASH';
diff --git a/pkg/dev_compiler/lib/src/compiler/shared_command.dart b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
index e97cd33..97e214a 100644
--- a/pkg/dev_compiler/lib/src/compiler/shared_command.dart
+++ b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
@@ -4,7 +4,6 @@
// @dart = 2.9
-import 'dart:async';
import 'dart:io';
import 'package:args/args.dart';
@@ -12,7 +11,6 @@
show InitializedCompilerState, parseExperimentalArguments;
import 'package:path/path.dart' as p;
-import '../kernel/command.dart' as kernel_compiler;
import 'module_builder.dart';
// TODO(nshahan) Merge all of this file the locations where they are used in
@@ -32,7 +30,7 @@
final bool sourceMap;
/// Whether to emit the source mapping file in the program text, so the
- /// runtime can enable synchronous stack trace deobsfuscation.
+ /// runtime can enable synchronous stack trace deobfuscation.
final bool inlineSourceMap;
/// Whether to emit the full compiled kernel.
@@ -67,7 +65,7 @@
/// Whether to emit the debug symbols
///
/// Debugger uses this information about to construct mapping between
- /// dart and js objecys that otherwise requires expensive communication with
+ /// dart and js objects that otherwise requires expensive communication with
/// the browser.
final bool emitDebugSymbols;
@@ -436,28 +434,6 @@
return map;
}
-/// Invoke the compiler with [args], optionally with the kernel backend if
-/// [isKernel] is set.
-///
-/// Returns a [CompilerResult], with a success flag indicating whether the
-/// program compiled without any fatal errors.
-///
-/// The result may also contain a [previousResult], which can be passed back in
-/// for batch/worker executions to attempt to existing state.
-Future<CompilerResult> compile(ParsedArguments args,
- {CompilerResult previousResult, Map<Uri, List<int>> inputDigests}) {
- if (previousResult != null && !args.isBatchOrWorker) {
- throw ArgumentError(
- 'previousResult requires --batch or --bazel_worker mode/');
- }
-
- return kernel_compiler.compile(args.rest,
- compilerState: previousResult?.kernelState,
- isWorker: args.isWorker,
- useIncrementalCompiler: args.useIncrementalCompiler,
- inputDigests: inputDigests);
-}
-
/// The result of a single `dartdevc` compilation.
///
/// Typically used for exiting the process with [exitCode] or checking the
@@ -498,7 +474,7 @@
/// [isBatch]/[isWorker] mode are preprocessed because they can combine
/// argument lists from the initial invocation and from batch/worker jobs.
class ParsedArguments {
- /// The user's arguments to the compiler for this compialtion.
+ /// The user's arguments to the compiler for this compilation.
final List<String> rest;
/// Whether to run in `--batch` mode, e.g the Dart SDK and Language tests.
diff --git a/pkg/dev_compiler/lib/src/kernel/command.dart b/pkg/dev_compiler/lib/src/kernel/command.dart
index bc13226..7e981bd 100644
--- a/pkg/dev_compiler/lib/src/kernel/command.dart
+++ b/pkg/dev_compiler/lib/src/kernel/command.dart
@@ -40,17 +40,23 @@
/// Invoke the compiler with [args].
///
-/// Returns `true` if the program compiled without any fatal errors.
-Future<CompilerResult> compile(List<String> args,
+/// Returns a [CompilerResult], with a success flag indicating whether the
+/// program compiled without any fatal errors.
+///
+/// The result may also contain a [previousResult], which can be passed back in
+/// for batch/worker executions to attempt to existing state.
+Future<CompilerResult> compile(ParsedArguments args,
{fe.InitializedCompilerState compilerState,
- bool isWorker = false,
- bool useIncrementalCompiler = false,
- Map<Uri, List<int>> inputDigests}) async {
+ Map<Uri, List<int>> inputDigests}) {
+ if (compilerState != null && !args.isBatchOrWorker) {
+ throw ArgumentError(
+ 'previousResult requires --batch or --bazel_worker mode/');
+ }
try {
- return await _compile(args,
+ return _compile(args.rest,
compilerState: compilerState,
- isWorker: isWorker,
- useIncrementalCompiler: useIncrementalCompiler,
+ isWorker: args.isWorker,
+ useIncrementalCompiler: args.useIncrementalCompiler,
inputDigests: inputDigests);
} catch (error, stackTrace) {
print('''
@@ -60,13 +66,13 @@
Please include the information below in your report, along with
any other information that may help us track it down. Thanks!
-------------------- %< --------------------
- $_binaryName arguments: ${args.join(' ')}
+ $_binaryName arguments: ${args.rest.join(' ')}
dart --version: ${Platform.version}
$error
$stackTrace
''');
- return CompilerResult(70);
+ return Future.value(CompilerResult(70));
}
}
diff --git a/pkg/dev_compiler/test/modular_suite.dart b/pkg/dev_compiler/test/modular_suite.dart
index 1a53fcd..dee5a05 100644
--- a/pkg/dev_compiler/test/modular_suite.dart
+++ b/pkg/dev_compiler/test/modular_suite.dart
@@ -198,6 +198,7 @@
'--modules=es6',
'--no-summarize',
'--no-source-map',
+ '--experimental-output-compiled-kernel',
'--multi-root-scheme',
rootScheme,
...sources,
diff --git a/pkg/dev_compiler/test/sourcemap/README.md b/pkg/dev_compiler/test/sourcemap/README.md
index 65c5ef3..4c3fa68 100644
--- a/pkg/dev_compiler/test/sourcemap/README.md
+++ b/pkg/dev_compiler/test/sourcemap/README.md
@@ -3,11 +3,9 @@
This folder contains two types of tests for validating sourcemaps:
the debugging behavior and the stacktrace behavior.
-For both there are 2 suits: One for (legacy) DDC and one for DDC with kernel (DDK).
-
-Running the tests likely requires the compilation of the correct targets. DDK currently also
+Running the tests requires the compilation of the correct targets. DDC currently also
requires `ddc_sdk.dill` inside
-`{sdkroot}/{out,xcodebuild}/ReleaseX64/ddc_sdk.dill`.
+`{sdkroot}/{out,xcodebuild}/{ReleaseX64,ReleaseARM64}/ddc_sdk.dill`.
Except for that, running them should simply be a matter of executing the `*_suite.dart` files.
@@ -22,19 +20,19 @@
One can filter which tests are run by running (from the sourcemap folder):
```
-dart sourcemaps_ddc_suite.dart -- sourcemaps_ddc//printing_class_fields
+dart sourcemaps_ddk_suite.dart -- sourcemaps_ddk/printing_class_fields
```
One can additionally get debug output for failing tests (i.e. tests with different outcome than
expected), e.g.:
```
-dart sourcemaps_ddc_suite.dart -Ddebug=true -- sourcemaps_ddc//printing_class_fields
+dart sourcemaps_ddk_suite.dart -Ddebug=true -- sourcemaps_ddk/printing_class_fields
```
The latter is also useful in combination with `/*fail*/` when adding new tests to see all the places
where the debugger stopped (both in JS positions and translated to dart positions).
-For instance `-Ddebug=true -- sourcemaps_ddk//next_through_catch_test` with a `/*fail*/`
+For instance `-Ddebug=true -- sourcemaps_ddk/next_through_catch_test` with a `/*fail*/`
currently gives output like the following:
```
diff --git a/pkg/dev_compiler/test/sourcemap/common.dart b/pkg/dev_compiler/test/sourcemap/common.dart
index 19972c4..a443eec 100644
--- a/pkg/dev_compiler/test/sourcemap/common.dart
+++ b/pkg/dev_compiler/test/sourcemap/common.dart
@@ -100,7 +100,11 @@
File findInOutDir(String relative) {
var outerDir = sdkRoot.path;
- for (var outDir in const ['out/ReleaseX64', 'xcodebuild/ReleaseX64']) {
+ for (var outDir in const [
+ 'out/ReleaseX64',
+ 'xcodebuild/ReleaseX64',
+ 'xcodebuild/ReleaseARM64'
+ ]) {
var tryPath = p.join(outerDir, outDir, relative);
var file = File(tryPath);
if (file.existsSync()) return file;
diff --git a/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart b/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart
index e75d3d0..a20cf67 100644
--- a/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart
+++ b/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart
@@ -6,6 +6,7 @@
import 'dart:io';
+import 'package:dev_compiler/src/compiler/shared_command.dart';
import 'package:dev_compiler/src/kernel/command.dart';
import 'package:front_end/src/api_unstable/ddc.dart' as fe;
import 'package:sourcemap_testing/src/stepping_helper.dart';
@@ -62,6 +63,7 @@
var packageConfigPath =
sdkRoot.uri.resolve('.dart_tool/package_config.json').toFilePath();
var args = <String>[
+ '--batch',
'--packages=$packageConfigPath',
'--modules=es6',
'--dart-sdk-summary=${ddcSdkSummary.path}',
@@ -72,7 +74,8 @@
var succeeded = false;
try {
- var result = await compile(args, compilerState: context.compilerState);
+ var result = await compile(ParsedArguments.from(args),
+ compilerState: context.compilerState);
context.compilerState =
result.compilerState as fe.InitializedCompilerState;
succeeded = result.success;
@@ -86,7 +89,7 @@
var ddc = getDdcDir().uri.resolve('bin/dartdevc.dart');
throw 'Error from ddc when executing with something like '
- '$dartExecutable ${ddc.toFilePath()} --kernel '
+ '$dartExecutable ${ddc.toFilePath()} '
"${args.reduce((value, element) => '$value "$element"')}";
}
diff --git a/pkg/front_end/lib/src/api_unstable/vm.dart b/pkg/front_end/lib/src/api_unstable/vm.dart
index d7402a7..43a3bef 100644
--- a/pkg/front_end/lib/src/api_unstable/vm.dart
+++ b/pkg/front_end/lib/src/api_unstable/vm.dart
@@ -86,7 +86,6 @@
templateFfiNativeUnexpectedNumberOfParametersWithReceiver,
templateFfiNotStatic,
templateFfiPackedAnnotation,
- templateFfiPackedNestingNonPacked,
templateFfiSizeAnnotation,
templateFfiSizeAnnotationDimensions,
templateFfiStructGeneric,
diff --git a/pkg/front_end/lib/src/fasta/builder/builtin_type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/builtin_type_declaration_builder.dart
index 02c6b57..dbb0659 100644
--- a/pkg/front_end/lib/src/fasta/builder/builtin_type_declaration_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/builtin_type_declaration_builder.dart
@@ -5,6 +5,7 @@
library fasta.builtin_type_builder;
import 'package:kernel/ast.dart' show DartType, Nullability;
+import 'package:kernel/class_hierarchy.dart';
import 'library_builder.dart';
import 'nullability_builder.dart';
@@ -32,6 +33,7 @@
TypeUse typeUse,
Uri fileUri,
int charOffset,
+ ClassHierarchyBase? hierarchy,
{required bool hasExplicitTypeArguments}) {
return type.withDeclaredNullability(nullabilityBuilder.build(library));
}
diff --git a/pkg/front_end/lib/src/fasta/builder/class_builder.dart b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
index 8f483a0..3d80125 100644
--- a/pkg/front_end/lib/src/fasta/builder/class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
@@ -17,7 +17,8 @@
Nullability,
Supertype,
getAsTypeArguments;
-import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
+import 'package:kernel/class_hierarchy.dart'
+ show ClassHierarchy, ClassHierarchyBase;
import 'package:kernel/src/unaliasing.dart';
import 'package:kernel/text/text_serialization_verifier.dart';
@@ -99,8 +100,8 @@
InterfaceType rawType(Nullability nullability);
- List<DartType> buildAliasedTypeArguments(
- LibraryBuilder library, List<TypeBuilder>? arguments);
+ List<DartType> buildAliasedTypeArguments(LibraryBuilder library,
+ List<TypeBuilder>? arguments, ClassHierarchyBase? hierarchy);
Supertype buildMixedInType(
LibraryBuilder library, List<TypeBuilder>? arguments);
@@ -346,11 +347,12 @@
TypeUse typeUse,
Uri fileUri,
int charOffset,
+ ClassHierarchyBase? hierarchy,
{required bool hasExplicitTypeArguments}) {
return buildAliasedTypeWithBuiltArguments(
library,
nullabilityBuilder.build(library),
- buildAliasedTypeArguments(library, arguments),
+ buildAliasedTypeArguments(library, arguments, hierarchy),
typeUse,
fileUri,
charOffset,
@@ -363,7 +365,7 @@
Class cls = isPatch ? origin.cls : this.cls;
if (arguments != null) {
List<DartType> typeArguments =
- buildAliasedTypeArguments(library, arguments);
+ buildAliasedTypeArguments(library, arguments, /* hierarchy = */ null);
typeArguments = unaliasTypes(typeArguments,
legacyEraseAliases: !library.isNonNullableByDefault)!;
return new Supertype(cls, typeArguments);
diff --git a/pkg/front_end/lib/src/fasta/builder/extension_builder.dart b/pkg/front_end/lib/src/fasta/builder/extension_builder.dart
index 5272f53..ba6a2da 100644
--- a/pkg/front_end/lib/src/fasta/builder/extension_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/extension_builder.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
import '../fasta_codes.dart'
show templateInternalProblemNotFoundIn, templateTypeArgumentMismatch;
@@ -79,13 +80,14 @@
TypeUse typeUse,
Uri fileUri,
int charOffset,
+ ClassHierarchyBase? hierarchy,
{required bool hasExplicitTypeArguments}) {
if (library is SourceLibraryBuilder &&
library.libraryFeatures.extensionTypes.isEnabled) {
return buildAliasedTypeWithBuiltArguments(
library,
nullabilityBuilder.build(library),
- _buildAliasedTypeArguments(library, arguments),
+ _buildAliasedTypeArguments(library, arguments, hierarchy),
typeUse,
fileUri,
charOffset,
@@ -118,8 +120,8 @@
@override
int get typeVariablesCount => typeParameters?.length ?? 0;
- List<DartType> _buildAliasedTypeArguments(
- LibraryBuilder library, List<TypeBuilder>? arguments) {
+ List<DartType> _buildAliasedTypeArguments(LibraryBuilder library,
+ List<TypeBuilder>? arguments, ClassHierarchyBase? hierarchy) {
if (arguments == null && typeParameters == null) {
return <DartType>[];
}
@@ -127,9 +129,8 @@
if (arguments == null && typeParameters != null) {
List<DartType> result =
new List<DartType>.generate(typeParameters!.length, (int i) {
- return typeParameters![i]
- .defaultType!
- .buildAliased(library, TypeUse.defaultTypeAsTypeArgument);
+ return typeParameters![i].defaultType!.buildAliased(
+ library, TypeUse.defaultTypeAsTypeArgument, hierarchy);
}, growable: true);
if (library is SourceLibraryBuilder) {
library.inferredTypes.addAll(result);
@@ -151,7 +152,8 @@
assert(arguments!.length == typeVariablesCount);
List<DartType> result =
new List<DartType>.generate(arguments!.length, (int i) {
- return arguments[i].buildAliased(library, TypeUse.typeArgument);
+ return arguments[i]
+ .buildAliased(library, TypeUse.typeArgument, hierarchy);
}, growable: true);
return result;
}
diff --git a/pkg/front_end/lib/src/fasta/builder/fixed_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/fixed_type_builder.dart
index 92bcd1d..196e647 100644
--- a/pkg/front_end/lib/src/fasta/builder/fixed_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/fixed_type_builder.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
import '../problems.dart';
import '../source/source_library_builder.dart';
@@ -48,12 +49,14 @@
}
@override
- DartType build(LibraryBuilder library, TypeUse typeUse) {
+ DartType build(LibraryBuilder library, TypeUse typeUse,
+ {ClassHierarchyBase? hierarchy}) {
return type;
}
@override
- DartType buildAliased(LibraryBuilder library, TypeUse typeUse) {
+ DartType buildAliased(
+ LibraryBuilder library, TypeUse typeUse, ClassHierarchyBase? hierarchy) {
return type;
}
@@ -72,4 +75,7 @@
@override
TypeBuilder withNullabilityBuilder(NullabilityBuilder nullabilityBuilder) =>
this;
+
+ @override
+ bool get isExplicit => true;
}
diff --git a/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart b/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart
index 1e2c3e9..2c9792e 100644
--- a/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart
@@ -18,6 +18,7 @@
import '../source/source_factory_builder.dart';
import '../source/source_field_builder.dart';
import '../source/source_library_builder.dart';
+import '../type_inference/type_schema.dart';
import '../util/helpers.dart' show DelayedActionPerformer;
import 'builder.dart';
import 'class_builder.dart';
@@ -147,11 +148,17 @@
VariableDeclaration build(SourceLibraryBuilder library) {
if (variable == null) {
- DartType? builtType = type is OmittedTypeBuilder
- // `null` is used in [VariableDeclarationImpl] to signal an omitted
- // type.
- ? null
- : type.build(library, TypeUse.parameterType);
+ DartType? builtType;
+ if (type is OmittedTypeBuilder) {
+ // `null` is used in [VariableDeclarationImpl] to signal an omitted
+ // type.
+ builtType = null;
+ } else if (type.isExplicit) {
+ builtType = type.build(library, TypeUse.parameterType);
+ } else {
+ // This type needs to be computed at a later point in time.
+ builtType = const UnknownType();
+ }
variable = new VariableDeclarationImpl(
name == noNameSentinel ? null : name,
type: builtType,
diff --git a/pkg/front_end/lib/src/fasta/builder/function_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/function_type_builder.dart
index 3b20c82..778a7cb 100644
--- a/pkg/front_end/lib/src/fasta/builder/function_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/function_type_builder.dart
@@ -5,13 +5,8 @@
library fasta.function_type_builder;
import 'package:kernel/ast.dart'
- show
- DartType,
- DynamicType,
- FunctionType,
- NamedType,
- Supertype,
- TypeParameter;
+ show DartType, FunctionType, NamedType, Supertype, TypeParameter;
+import 'package:kernel/class_hierarchy.dart';
import 'package:kernel/src/unaliasing.dart';
import '../fasta_codes.dart' show messageSupertypeIsFunction, noLength;
@@ -22,11 +17,10 @@
import 'library_builder.dart';
import 'named_type_builder.dart';
import 'nullability_builder.dart';
-import 'omitted_type_builder.dart';
import 'type_builder.dart';
import 'type_variable_builder.dart';
-class FunctionTypeBuilder extends TypeBuilder {
+abstract class FunctionTypeBuilder extends TypeBuilder {
final TypeBuilder returnType;
final List<TypeVariableBuilder>? typeVariables;
final List<ParameterBuilder>? formals;
@@ -37,9 +31,41 @@
@override
final int charOffset;
- FunctionType? _type;
+ factory FunctionTypeBuilder(
+ TypeBuilder returnType,
+ List<TypeVariableBuilder>? typeVariables,
+ List<ParameterBuilder>? formals,
+ NullabilityBuilder nullabilityBuilder,
+ Uri? fileUri,
+ int charOffset) {
+ bool isExplicit = true;
+ if (!returnType.isExplicit) {
+ isExplicit = false;
+ }
+ if (isExplicit && formals != null) {
+ for (ParameterBuilder formal in formals) {
+ if (!formal.type.isExplicit) {
+ isExplicit = false;
+ break;
+ }
+ }
+ }
+ if (isExplicit && typeVariables != null) {
+ for (TypeVariableBuilder typeVariable in typeVariables) {
+ if (!(typeVariable.bound?.isExplicit ?? true)) {
+ isExplicit = false;
+ break;
+ }
+ }
+ }
+ return isExplicit
+ ? new _ExplicitFunctionTypeBuilder(returnType, typeVariables, formals,
+ nullabilityBuilder, fileUri, charOffset)
+ : new _InferredFunctionTypeBuilder(returnType, typeVariables, formals,
+ nullabilityBuilder, fileUri, charOffset);
+ }
- FunctionTypeBuilder(this.returnType, this.typeVariables, this.formals,
+ FunctionTypeBuilder._(this.returnType, this.typeVariables, this.formals,
this.nullabilityBuilder, this.fileUri, this.charOffset);
@override
@@ -86,29 +112,29 @@
}
@override
- FunctionType build(LibraryBuilder library, TypeUse typeUse) {
- return _type ??= _buildInternal(library, typeUse) as FunctionType;
- }
+ FunctionType build(LibraryBuilder library, TypeUse typeUse,
+ {ClassHierarchyBase? hierarchy});
- DartType _buildInternal(LibraryBuilder library, TypeUse typeUse) {
- DartType aliasedType = buildAliased(library, typeUse);
+ FunctionType _buildInternal(
+ LibraryBuilder library, TypeUse typeUse, ClassHierarchyBase? hierarchy) {
+ DartType aliasedType = buildAliased(library, typeUse, hierarchy);
return unalias(aliasedType,
- legacyEraseAliases: !library.isNonNullableByDefault);
+ legacyEraseAliases: !library.isNonNullableByDefault) as FunctionType;
}
@override
- DartType buildAliased(LibraryBuilder library, TypeUse typeUse) {
- DartType builtReturnType = returnType is OmittedTypeBuilder
- ? const DynamicType()
- : returnType.buildAliased(library, TypeUse.returnType);
+ DartType buildAliased(
+ LibraryBuilder library, TypeUse typeUse, ClassHierarchyBase? hierarchy) {
+ assert(hierarchy != null || isExplicit, "Cannot build $this.");
+ DartType builtReturnType =
+ returnType.buildAliased(library, TypeUse.returnType, hierarchy);
List<DartType> positionalParameters = <DartType>[];
List<NamedType>? namedParameters;
int requiredParameterCount = 0;
if (formals != null) {
for (ParameterBuilder formal in formals!) {
- DartType type = formal.type is OmittedTypeBuilder
- ? const DynamicType()
- : formal.type.buildAliased(library, TypeUse.parameterType);
+ DartType type =
+ formal.type.buildAliased(library, TypeUse.parameterType, hierarchy);
if (formal.isPositional) {
positionalParameters.add(type);
if (formal.isRequiredPositional) requiredParameterCount++;
@@ -185,3 +211,62 @@
nullabilityBuilder, fileUri, charOffset);
}
}
+
+/// A function type that is defined without the need for type inference.
+///
+/// This is the normal function type whose return type or parameter types are
+/// either explicit or omitted.
+class _ExplicitFunctionTypeBuilder extends FunctionTypeBuilder {
+ _ExplicitFunctionTypeBuilder(
+ TypeBuilder returnType,
+ List<TypeVariableBuilder>? typeVariables,
+ List<ParameterBuilder>? formals,
+ NullabilityBuilder nullabilityBuilder,
+ Uri? fileUri,
+ int charOffset)
+ : super._(returnType, typeVariables, formals, nullabilityBuilder, fileUri,
+ charOffset);
+
+ @override
+ bool get isExplicit => true;
+
+ FunctionType? _type;
+
+ @override
+ FunctionType build(LibraryBuilder library, TypeUse typeUse,
+ {ClassHierarchyBase? hierarchy}) {
+ return _type ??= _buildInternal(library, typeUse, hierarchy);
+ }
+}
+
+/// A function type that needs type inference to be fully defined.
+///
+/// This occurs through macros where return type or parameter types can be
+/// defined in terms of inferred types, making this type indirectly depend
+/// on type inference.
+class _InferredFunctionTypeBuilder extends FunctionTypeBuilder
+ with ListenableTypeBuilderMixin<FunctionType> {
+ _InferredFunctionTypeBuilder(
+ TypeBuilder returnType,
+ List<TypeVariableBuilder>? typeVariables,
+ List<ParameterBuilder>? formals,
+ NullabilityBuilder nullabilityBuilder,
+ Uri? fileUri,
+ int charOffset)
+ : super._(returnType, typeVariables, formals, nullabilityBuilder, fileUri,
+ charOffset);
+
+ @override
+ bool get isExplicit => false;
+
+ @override
+ FunctionType build(LibraryBuilder library, TypeUse typeUse,
+ {ClassHierarchyBase? hierarchy}) {
+ assert(hierarchy != null, "Cannot build $this.");
+ if (hasType) {
+ return type;
+ } else {
+ return registerType(_buildInternal(library, typeUse, hierarchy));
+ }
+ }
+}
diff --git a/pkg/front_end/lib/src/fasta/builder/future_or_type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/future_or_type_declaration_builder.dart
index fb47efbb..5f818e9 100644
--- a/pkg/front_end/lib/src/fasta/builder/future_or_type_declaration_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/future_or_type_declaration_builder.dart
@@ -5,6 +5,7 @@
library fasta.future_or_type_builder;
import 'package:kernel/ast.dart' show DartType, FutureOrType, Nullability;
+import 'package:kernel/class_hierarchy.dart';
import 'builtin_type_declaration_builder.dart';
import 'library_builder.dart';
@@ -27,9 +28,11 @@
TypeUse typeUse,
Uri fileUri,
int charOffset,
+ ClassHierarchyBase? hierarchy,
{required bool hasExplicitTypeArguments}) {
return new FutureOrType(
- arguments!.single.buildAliased(library, TypeUse.typeArgument),
+ arguments!.single
+ .buildAliased(library, TypeUse.typeArgument, hierarchy),
nullabilityBuilder.build(library));
}
diff --git a/pkg/front_end/lib/src/fasta/builder/invalid_type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/invalid_type_declaration_builder.dart
index 82d2ccc..c57bc8a 100644
--- a/pkg/front_end/lib/src/fasta/builder/invalid_type_declaration_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/invalid_type_declaration_builder.dart
@@ -5,6 +5,7 @@
library fasta.invalid_type_builder;
import 'package:kernel/ast.dart' show DartType, InvalidType, Nullability;
+import 'package:kernel/class_hierarchy.dart';
import '../fasta_codes.dart' show LocatedMessage;
import '../scope.dart';
@@ -40,6 +41,7 @@
TypeUse typeUse,
Uri fileUri,
int charOffset,
+ ClassHierarchyBase? hierarchy,
{required bool hasExplicitTypeArguments}) {
return buildAliasedTypeWithBuiltArguments(
library, null, null, typeUse, fileUri, charOffset,
diff --git a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
index 2437686..45f85e5 100644
--- a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
@@ -5,6 +5,7 @@
library fasta.named_type_builder;
import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
import 'package:kernel/src/legacy_erasure.dart';
import 'package:kernel/src/unaliasing.dart';
@@ -89,7 +90,7 @@
Unexpected,
}
-class NamedTypeBuilder extends TypeBuilder {
+abstract class NamedTypeBuilder extends TypeBuilder {
@override
final Object name;
@@ -110,57 +111,70 @@
final bool _forTypeLiteral;
- DartType? _type;
-
final bool hasExplicitTypeArguments;
- NamedTypeBuilder(this.name, this.nullabilityBuilder,
- {this.arguments,
+ factory NamedTypeBuilder(Object name, NullabilityBuilder nullabilityBuilder,
+ {List<TypeBuilder>? arguments,
+ Uri? fileUri,
+ int? charOffset,
+ required InstanceTypeVariableAccessState instanceTypeVariableAccess,
+ bool forTypeLiteral: false}) {
+ bool isExplicit = true;
+ if (arguments != null) {
+ for (TypeBuilder argument in arguments) {
+ if (!argument.isExplicit) {
+ isExplicit = false;
+ }
+ }
+ }
+ return isExplicit
+ ? new _ExplicitNamedTypeBuilder(name, nullabilityBuilder,
+ arguments: arguments,
+ fileUri: fileUri,
+ charOffset: charOffset,
+ instanceTypeVariableAccess: instanceTypeVariableAccess,
+ forTypeLiteral: forTypeLiteral)
+ : new _InferredNamedTypeBuilder(name, nullabilityBuilder,
+ arguments: arguments,
+ fileUri: fileUri,
+ charOffset: charOffset,
+ instanceTypeVariableAccess: instanceTypeVariableAccess,
+ forTypeLiteral: forTypeLiteral);
+ }
+
+ NamedTypeBuilder._(
+ {required this.name,
+ required this.nullabilityBuilder,
+ this.arguments,
this.fileUri,
this.charOffset,
required InstanceTypeVariableAccessState instanceTypeVariableAccess,
- bool forTypeLiteral: false})
+ bool forTypeLiteral: false,
+ TypeDeclarationBuilder? declaration})
: assert(name is String || name is QualifiedName),
this._instanceTypeVariableAccess = instanceTypeVariableAccess,
this._forTypeLiteral = forTypeLiteral,
- this.hasExplicitTypeArguments = arguments != null;
+ this.hasExplicitTypeArguments = arguments != null,
+ this._declaration = declaration;
- NamedTypeBuilder.forDartType(DartType this._type,
- TypeDeclarationBuilder this._declaration, this.nullabilityBuilder,
- {this.arguments})
- : this.name = _declaration.name,
- this._instanceTypeVariableAccess =
- InstanceTypeVariableAccessState.Unexpected,
- this.fileUri = null,
- this.charOffset = null,
- this._forTypeLiteral = false,
- this.hasExplicitTypeArguments = arguments != null;
+ factory NamedTypeBuilder.forDartType(
+ DartType type,
+ TypeDeclarationBuilder _declaration,
+ NullabilityBuilder nullabilityBuilder,
+ {List<TypeBuilder>? arguments}) = _ExplicitNamedTypeBuilder.forDartType;
- NamedTypeBuilder.fromTypeDeclarationBuilder(
- TypeDeclarationBuilder this._declaration, this.nullabilityBuilder,
- {this.arguments,
- this.fileUri,
- this.charOffset,
+ factory NamedTypeBuilder.fromTypeDeclarationBuilder(
+ TypeDeclarationBuilder declaration, NullabilityBuilder nullabilityBuilder,
+ {List<TypeBuilder>? arguments,
+ Uri? fileUri,
+ int? charOffset,
required InstanceTypeVariableAccessState instanceTypeVariableAccess,
- DartType? type})
- : this.name = _declaration.name,
- this._forTypeLiteral = false,
- this._instanceTypeVariableAccess = instanceTypeVariableAccess,
- this._type = type,
- this.hasExplicitTypeArguments = arguments != null;
+ DartType? type}) = _ExplicitNamedTypeBuilder.fromTypeDeclarationBuilder;
- NamedTypeBuilder.forInvalidType(
- String this.name, this.nullabilityBuilder, LocatedMessage message,
- {List<LocatedMessage>? context})
- : _declaration =
- new InvalidTypeDeclarationBuilder(name, message, context: context),
- this.fileUri = message.uri,
- this.charOffset = message.charOffset,
- this._instanceTypeVariableAccess =
- InstanceTypeVariableAccessState.Unexpected,
- this._forTypeLiteral = false,
- this._type = const InvalidType(),
- this.hasExplicitTypeArguments = false;
+ factory NamedTypeBuilder.forInvalidType(String name,
+ NullabilityBuilder nullabilityBuilder, LocatedMessage message,
+ {List<LocatedMessage>? context}) =
+ _ExplicitNamedTypeBuilder.forInvalidType;
@override
TypeDeclarationBuilder? get declaration => _declaration;
@@ -381,27 +395,32 @@
return null;
}
- @override
- DartType build(LibraryBuilder library, TypeUse typeUse) {
- return _type ??= _buildInternal(library, typeUse);
- }
-
- DartType _buildInternal(LibraryBuilder library, TypeUse typeUse) {
- DartType aliasedType = _buildAliasedInternal(library, typeUse);
+ DartType _buildInternal(
+ LibraryBuilder library, TypeUse typeUse, ClassHierarchyBase? hierarchy) {
+ DartType aliasedType = _buildAliasedInternal(library, typeUse, hierarchy);
return unalias(aliasedType,
legacyEraseAliases:
!_forTypeLiteral && !library.isNonNullableByDefault);
}
@override
- DartType buildAliased(LibraryBuilder library, TypeUse typeUse) {
- return _buildAliasedInternal(library, typeUse);
+ DartType buildAliased(
+ LibraryBuilder library, TypeUse typeUse, ClassHierarchyBase? hierarchy) {
+ assert(hierarchy != null || isExplicit, "Cannot build $this.");
+ return _buildAliasedInternal(library, typeUse, hierarchy);
}
- DartType _buildAliasedInternal(LibraryBuilder library, TypeUse typeUse) {
+ DartType _buildAliasedInternal(
+ LibraryBuilder library, TypeUse typeUse, ClassHierarchyBase? hierarchy) {
assert(declaration != null, "Declaration has not been resolved on $this.");
- return declaration!.buildAliasedType(library, nullabilityBuilder, arguments,
- typeUse, fileUri ?? missingUri, charOffset ?? TreeNode.noOffset,
+ return declaration!.buildAliasedType(
+ library,
+ nullabilityBuilder,
+ arguments,
+ typeUse,
+ fileUri ?? missingUri,
+ charOffset ?? TreeNode.noOffset,
+ hierarchy,
hasExplicitTypeArguments: hasExplicitTypeArguments);
}
@@ -598,3 +617,119 @@
}
}
}
+
+/// A named type that is defined without the need for type inference.
+///
+/// This is the normal function type whose type arguments are either explicit or
+/// omitted.
+class _ExplicitNamedTypeBuilder extends NamedTypeBuilder {
+ DartType? _type;
+
+ _ExplicitNamedTypeBuilder(Object name, NullabilityBuilder nullabilityBuilder,
+ {List<TypeBuilder>? arguments,
+ Uri? fileUri,
+ int? charOffset,
+ required InstanceTypeVariableAccessState instanceTypeVariableAccess,
+ bool forTypeLiteral: false})
+ : super._(
+ name: name,
+ nullabilityBuilder: nullabilityBuilder,
+ arguments: arguments,
+ fileUri: fileUri,
+ charOffset: charOffset,
+ instanceTypeVariableAccess: instanceTypeVariableAccess,
+ forTypeLiteral: forTypeLiteral);
+
+ _ExplicitNamedTypeBuilder.forDartType(DartType type,
+ TypeDeclarationBuilder declaration, NullabilityBuilder nullabilityBuilder,
+ {List<TypeBuilder>? arguments})
+ : _type = type,
+ super._(
+ declaration: declaration,
+ name: declaration.name,
+ nullabilityBuilder: nullabilityBuilder,
+ arguments: arguments,
+ instanceTypeVariableAccess:
+ InstanceTypeVariableAccessState.Unexpected,
+ fileUri: null,
+ charOffset: null,
+ forTypeLiteral: false);
+
+ _ExplicitNamedTypeBuilder.fromTypeDeclarationBuilder(
+ TypeDeclarationBuilder declaration, NullabilityBuilder nullabilityBuilder,
+ {List<TypeBuilder>? arguments,
+ Uri? fileUri,
+ int? charOffset,
+ required InstanceTypeVariableAccessState instanceTypeVariableAccess,
+ DartType? type})
+ : this._type = type,
+ super._(
+ name: declaration.name,
+ declaration: declaration,
+ nullabilityBuilder: nullabilityBuilder,
+ arguments: arguments,
+ fileUri: fileUri,
+ charOffset: charOffset,
+ forTypeLiteral: false,
+ instanceTypeVariableAccess: instanceTypeVariableAccess);
+
+ _ExplicitNamedTypeBuilder.forInvalidType(String name,
+ NullabilityBuilder nullabilityBuilder, LocatedMessage message,
+ {List<LocatedMessage>? context})
+ : _type = const InvalidType(),
+ super._(
+ name: name,
+ nullabilityBuilder: nullabilityBuilder,
+ declaration: new InvalidTypeDeclarationBuilder(name, message,
+ context: context),
+ fileUri: message.uri,
+ charOffset: message.charOffset,
+ instanceTypeVariableAccess:
+ InstanceTypeVariableAccessState.Unexpected,
+ forTypeLiteral: false);
+
+ @override
+ bool get isExplicit => true;
+
+ @override
+ DartType build(LibraryBuilder library, TypeUse typeUse,
+ {ClassHierarchyBase? hierarchy}) {
+ return _type ??= _buildInternal(library, typeUse, hierarchy);
+ }
+}
+
+/// A named type that needs type inference to be fully defined.
+///
+/// This occurs through macros where type arguments can be defined in terms of
+/// inferred types, making this type indirectly depend on type inference.
+class _InferredNamedTypeBuilder extends NamedTypeBuilder
+ with ListenableTypeBuilderMixin<DartType> {
+ _InferredNamedTypeBuilder(Object name, NullabilityBuilder nullabilityBuilder,
+ {List<TypeBuilder>? arguments,
+ Uri? fileUri,
+ int? charOffset,
+ required InstanceTypeVariableAccessState instanceTypeVariableAccess,
+ bool forTypeLiteral: false})
+ : super._(
+ name: name,
+ nullabilityBuilder: nullabilityBuilder,
+ arguments: arguments,
+ fileUri: fileUri,
+ charOffset: charOffset,
+ instanceTypeVariableAccess: instanceTypeVariableAccess,
+ forTypeLiteral: forTypeLiteral);
+
+ @override
+ bool get isExplicit => false;
+
+ @override
+ DartType build(LibraryBuilder library, TypeUse typeUse,
+ {ClassHierarchyBase? hierarchy}) {
+ assert(hierarchy != null, "Cannot build $this.");
+ if (hasType) {
+ return type;
+ } else {
+ return registerType(_buildInternal(library, typeUse, hierarchy));
+ }
+ }
+}
diff --git a/pkg/front_end/lib/src/fasta/builder/never_type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/never_type_declaration_builder.dart
index 20389ed..561b2be 100644
--- a/pkg/front_end/lib/src/fasta/builder/never_type_declaration_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/never_type_declaration_builder.dart
@@ -5,12 +5,13 @@
library fasta.never_type_builder;
import 'package:kernel/ast.dart' show DartType, Nullability;
+import 'package:kernel/class_hierarchy.dart';
+import '../uris.dart';
import 'builtin_type_declaration_builder.dart';
import 'library_builder.dart';
import 'nullability_builder.dart';
import 'type_builder.dart';
-import '../uris.dart';
class NeverTypeDeclarationBuilder extends BuiltinTypeDeclarationBuilder {
final LibraryBuilder coreLibrary;
@@ -31,6 +32,7 @@
TypeUse typeUse,
Uri fileUri,
int charOffset,
+ ClassHierarchyBase? hierarchy,
{required bool hasExplicitTypeArguments}) {
return type.withDeclaredNullability(nullabilityBuilder.build(library));
}
diff --git a/pkg/front_end/lib/src/fasta/builder/null_type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/null_type_declaration_builder.dart
index 945aa07..3fba0f0 100644
--- a/pkg/front_end/lib/src/fasta/builder/null_type_declaration_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/null_type_declaration_builder.dart
@@ -5,6 +5,7 @@
library fasta.null_type_declaration_builder;
import 'package:kernel/ast.dart' show DartType, Nullability;
+import 'package:kernel/class_hierarchy.dart';
import 'builtin_type_declaration_builder.dart';
import 'library_builder.dart';
@@ -27,6 +28,7 @@
TypeUse typeUse,
Uri fileUri,
int charOffset,
+ ClassHierarchyBase? hierarchy,
{required bool hasExplicitTypeArguments}) {
return type;
}
diff --git a/pkg/front_end/lib/src/fasta/builder/omitted_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/omitted_type_builder.dart
index 3b7bbbf..be67627 100644
--- a/pkg/front_end/lib/src/fasta/builder/omitted_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/omitted_type_builder.dart
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:kernel/ast.dart';
-import 'package:kernel/type_environment.dart';
+import 'package:kernel/class_hierarchy.dart';
import '../source/source_library_builder.dart';
import 'library_builder.dart';
@@ -15,16 +15,6 @@
const OmittedTypeBuilder();
@override
- DartType build(LibraryBuilder library, TypeUse typeUse) {
- throw new UnsupportedError('$runtimeType.build');
- }
-
- @override
- DartType buildAliased(LibraryBuilder library, TypeUse typeUse) {
- throw new UnsupportedError('$runtimeType.buildAliased');
- }
-
- @override
Supertype? buildMixedInType(LibraryBuilder library) {
throw new UnsupportedError('$runtimeType.buildMixedInType');
}
@@ -78,50 +68,53 @@
const ImplicitTypeBuilder();
@override
+ DartType build(LibraryBuilder library, TypeUse typeUse,
+ {ClassHierarchyBase? hierarchy}) =>
+ type;
+
+ @override
+ DartType buildAliased(LibraryBuilder library, TypeUse typeUse,
+ ClassHierarchyBase? hierarchy) =>
+ type;
+
+ @override
+ bool get isExplicit => true;
+
+ @override
bool get hasType => true;
@override
DartType get type => const DynamicType();
}
-class InferableTypeBuilder extends OmittedTypeBuilder {
+class InferableTypeBuilder extends OmittedTypeBuilder
+ with ListenableTypeBuilderMixin<DartType> {
@override
- bool get hasType => _type != null;
-
- DartType? _type;
-
- @override
- DartType get type => _type!;
-
- List<InferredTypeListener>? _listeners;
-
- @override
- void registerInferredTypeListener(InferredTypeListener onType) {
- if (hasType) {
- onType.onInferredType(type);
- } else {
- (_listeners ??= []).add(onType);
+ DartType build(LibraryBuilder library, TypeUse typeUse,
+ {ClassHierarchyBase? hierarchy}) {
+ if (hierarchy != null) {
+ inferType(hierarchy);
+ return type;
}
+ throw new UnsupportedError('$runtimeType.build');
}
- void _registerType(DartType type) {
- // TODO(johnniwinther): Avoid multiple registration from enums and
- // duplicated fields.
- if (_type == null) {
- _type = type;
- List<InferredTypeListener>? listeners = _listeners;
- if (listeners != null) {
- _listeners = null;
- for (InferredTypeListener listener in listeners) {
- listener.onInferredType(type);
- }
- }
+ @override
+ DartType buildAliased(
+ LibraryBuilder library, TypeUse typeUse, ClassHierarchyBase? hierarchy) {
+ if (hierarchy != null) {
+ inferType(hierarchy);
+ return type;
}
+ throw new UnsupportedError('$runtimeType.buildAliased');
}
@override
+ bool get isExplicit => false;
+
+ @override
void registerInferredType(DartType type) {
- _registerType(type);
+ registerType(type);
}
Inferable? _inferable;
@@ -141,11 +134,11 @@
///
/// If an [Inferable] has been register, this is called to infer the type of
/// this builder. Otherwise the type is inferred to be `dynamic`.
- void inferType(TypeEnvironment typeEnvironment) {
+ void inferType(ClassHierarchyBase hierarchy) {
if (!hasType) {
Inferable? inferable = _inferable;
if (inferable != null) {
- inferable.inferTypes(typeEnvironment);
+ inferable.inferTypes(hierarchy);
} else {
registerInferredType(const DynamicType());
}
@@ -164,5 +157,5 @@
abstract class Inferable {
/// Triggers the inference of the types of one or more
/// [InferableTypeBuilder]s.
- void inferTypes(TypeEnvironment typeEnvironment);
+ void inferTypes(ClassHierarchyBase hierarchy);
}
diff --git a/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart b/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart
index 464674f..7734795 100644
--- a/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart
@@ -5,6 +5,7 @@
library fasta.function_type_alias_builder;
import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
import '../fasta_codes.dart'
show
@@ -13,10 +14,8 @@
templateTypeArgumentMismatch,
messageTypedefTypeVariableNotConstructor,
messageTypedefTypeVariableNotConstructorCause;
-
import '../problems.dart' show unhandled;
import '../source/source_library_builder.dart';
-
import 'class_builder.dart';
import 'library_builder.dart';
import 'metadata_builder.dart';
@@ -52,8 +51,8 @@
DartType buildThisType();
- List<DartType> buildAliasedTypeArguments(
- LibraryBuilder library, List<TypeBuilder>? arguments);
+ List<DartType> buildAliasedTypeArguments(LibraryBuilder library,
+ List<TypeBuilder>? arguments, ClassHierarchyBase? hierarchy);
/// Returns `true` if this typedef is an alias of the `Null` type.
bool get isNullAlias;
@@ -176,6 +175,7 @@
TypeUse typeUse,
Uri fileUri,
int charOffset,
+ ClassHierarchyBase? hierarchy,
{required bool hasExplicitTypeArguments}) {
DartType thisType = buildThisType();
if (thisType is InvalidType) return thisType;
@@ -184,7 +184,7 @@
return buildAliasedTypeWithBuiltArguments(
library,
nullability,
- buildAliasedTypeArguments(library, arguments),
+ buildAliasedTypeArguments(library, arguments, hierarchy),
typeUse,
fileUri,
charOffset,
diff --git a/pkg/front_end/lib/src/fasta/builder/type_builder.dart b/pkg/front_end/lib/src/fasta/builder/type_builder.dart
index e7d81cfa..b8f153a 100644
--- a/pkg/front_end/lib/src/fasta/builder/type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/type_builder.dart
@@ -5,6 +5,7 @@
library fasta.type_builder;
import 'package:kernel/ast.dart' show DartType, Supertype;
+import 'package:kernel/class_hierarchy.dart';
import '../source/source_library_builder.dart';
import 'library_builder.dart';
@@ -301,13 +302,24 @@
String get fullNameForErrors => "${printOn(new StringBuffer())}";
+ /// Returns `true` if [build] can create the type for this type builder
+ /// without the need for inference, i.e without the [hierarchy] argument.
+ ///
+ /// This is false if the type directly or indirectly depends on inferred
+ /// types.
+ bool get isExplicit;
+
/// Creates the [DartType] from this [TypeBuilder] that doesn't contain
/// [TypedefType].
///
/// [library] is used to determine nullabilities and for registering well-
/// boundedness checks on the created type. [typeUse] describes how the
/// type is used which determine which well-boundedness checks are applied.
- DartType build(LibraryBuilder library, TypeUse typeUse);
+ ///
+ /// If [hierarchy] is provided, inference is triggered on inferable types.
+ /// Otherwise, [isExplicit] must be true.
+ DartType build(LibraryBuilder library, TypeUse typeUse,
+ {ClassHierarchyBase? hierarchy});
/// Creates the [DartType] from this [TypeBuilder] that contains
/// [TypedefType]. This is used to create types internal on which well-
@@ -317,7 +329,11 @@
/// [library] is used to determine nullabilities and for registering well-
/// boundedness checks on the created type. [typeUse] describes how the
/// type is used which determine which well-boundedness checks are applied.
- DartType buildAliased(LibraryBuilder library, TypeUse typeUse);
+ ///
+ /// If [hierarchy] is non-null, inference is triggered on inferable types.
+ /// Otherwise, [isExplicit] must be true.
+ DartType buildAliased(
+ LibraryBuilder library, TypeUse typeUse, ClassHierarchyBase? hierarchy);
Supertype? buildSupertype(LibraryBuilder library);
@@ -345,3 +361,39 @@
/// If this type is not an [InferableTypeBuilder], this call is a no-op.
void registerInferable(Inferable inferable) {}
}
+
+mixin ListenableTypeBuilderMixin<T extends DartType> implements TypeBuilder {
+ bool get hasType => _type != null;
+
+ T? _type;
+
+ T get type => _type!;
+
+ List<InferredTypeListener>? _listeners;
+
+ @override
+ void registerInferredTypeListener(InferredTypeListener onType) {
+ if (isExplicit) return;
+ if (hasType) {
+ onType.onInferredType(type);
+ } else {
+ (_listeners ??= []).add(onType);
+ }
+ }
+
+ T registerType(T type) {
+ // TODO(johnniwinther): Avoid multiple registration from enums and
+ // duplicated fields.
+ if (_type == null) {
+ _type = type;
+ List<InferredTypeListener>? listeners = _listeners;
+ if (listeners != null) {
+ _listeners = null;
+ for (InferredTypeListener listener in listeners) {
+ listener.onInferredType(type);
+ }
+ }
+ }
+ return _type!;
+ }
+}
diff --git a/pkg/front_end/lib/src/fasta/builder/type_declaration_builder.dart b/pkg/front_end/lib/src/fasta/builder/type_declaration_builder.dart
index d8df153..358215d 100644
--- a/pkg/front_end/lib/src/fasta/builder/type_declaration_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/type_declaration_builder.dart
@@ -5,6 +5,7 @@
library fasta.type_declaration_builder;
import 'package:kernel/ast.dart' show DartType, Nullability;
+import 'package:kernel/class_hierarchy.dart';
import 'builder.dart';
import 'library_builder.dart';
@@ -48,6 +49,7 @@
TypeUse typeUse,
Uri fileUri,
int charOffset,
+ ClassHierarchyBase? hierarchy,
{required bool hasExplicitTypeArguments});
/// [arguments] have already been built.
diff --git a/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart b/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart
index 3cc96e2..b509ec0 100644
--- a/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart
@@ -12,12 +12,10 @@
show
templateInternalProblemUnfinishedTypeVariable,
templateTypeArgumentsOnTypeVariable;
-
import '../scope.dart';
import '../source/source_library_builder.dart';
import '../uris.dart';
import '../util/helpers.dart';
-
import 'builder.dart';
import 'class_builder.dart';
import 'declaration_builder.dart';
@@ -127,6 +125,7 @@
TypeUse typeUse,
Uri fileUri,
int charOffset,
+ ClassHierarchyBase? hierarchy,
{required bool hasExplicitTypeArguments}) {
if (arguments != null) {
library.addProblem(
@@ -199,10 +198,11 @@
DartType objectType = object.buildAliasedType(
library,
library.nullableBuilder,
- null,
+ /* arguments = */ null,
TypeUse.typeParameterBound,
fileUri ?? missingUri,
charOffset,
+ /* hierarchy = */ null,
hasExplicitTypeArguments: false);
if (identical(parameter.bound, TypeParameter.unsetBoundSentinel)) {
parameter.bound =
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart
index b245233..ec39485 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart
@@ -5,21 +5,17 @@
library fasta.dill_class_builder;
import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
import '../builder/class_builder.dart';
import '../builder/library_builder.dart';
import '../builder/member_builder.dart';
import '../builder/type_builder.dart';
import '../builder/type_variable_builder.dart';
-
-import '../scope.dart';
-
-import '../problems.dart' show unimplemented;
-
import '../modifier.dart' show abstractMask, namedMixinApplicationMask;
-
+import '../problems.dart' show unimplemented;
+import '../scope.dart';
import 'dill_library_builder.dart' show DillLibraryBuilder;
-
import 'dill_member_builder.dart';
class DillClassBuilder extends ClassBuilderImpl {
@@ -134,8 +130,8 @@
int get typeVariablesCount => cls.typeParameters.length;
@override
- List<DartType> buildAliasedTypeArguments(
- LibraryBuilder library, List<TypeBuilder>? arguments) {
+ List<DartType> buildAliasedTypeArguments(LibraryBuilder library,
+ List<TypeBuilder>? arguments, ClassHierarchyBase? hierarchy) {
// For performance reasons, [typeVariables] aren't restored from [target].
// So, if [arguments] is null, the default types should be retrieved from
// [cls.typeParameters].
@@ -147,8 +143,10 @@
}
// [arguments] != null
- return new List<DartType>.generate(arguments.length,
- (int i) => arguments[i].buildAliased(library, TypeUse.typeArgument),
+ return new List<DartType>.generate(
+ arguments.length,
+ (int i) =>
+ arguments[i].buildAliased(library, TypeUse.typeArgument, hierarchy),
growable: true);
}
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart
index 47a9b85..bbe2812 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_type_alias_builder.dart
@@ -5,15 +5,14 @@
library fasta.dill_typedef_builder;
import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
import '../builder/library_builder.dart';
import '../builder/metadata_builder.dart';
import '../builder/type_alias_builder.dart';
import '../builder/type_builder.dart';
import '../builder/type_variable_builder.dart';
-
import '../problems.dart' show unimplemented;
-
import 'dill_class_builder.dart' show computeTypeVariableBuilders;
import 'dill_library_builder.dart' show DillLibraryBuilder;
@@ -69,8 +68,8 @@
}
@override
- List<DartType> buildAliasedTypeArguments(
- LibraryBuilder library, List<TypeBuilder>? arguments) {
+ List<DartType> buildAliasedTypeArguments(LibraryBuilder library,
+ List<TypeBuilder>? arguments, ClassHierarchyBase? hierarchy) {
// For performance reasons, [typeVariables] aren't restored from [target].
// So, if [arguments] is null, the default types should be retrieved from
// [cls.typeParameters].
@@ -86,7 +85,8 @@
// [arguments] != null
List<DartType> result =
new List<DartType>.generate(arguments.length, (int i) {
- return arguments[i].buildAliased(library, TypeUse.typeArgument);
+ return arguments[i]
+ .buildAliased(library, TypeUse.typeArgument, hierarchy);
}, growable: true);
return result;
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 620037c..42acff0 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -7543,7 +7543,7 @@
{required bool allowPotentiallyConstantType}) {
return validateTypeVariableUse(typeBuilder,
allowPotentiallyConstantType: allowPotentiallyConstantType)
- .buildAliased(libraryBuilder, typeUse);
+ .buildAliased(libraryBuilder, typeUse, /* hierarchy = */ null);
}
@override
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
index 066a9c7..168f060 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
@@ -3262,7 +3262,9 @@
} else {
builtTypeArguments = unaliasTypes(
declarationBuilder.buildAliasedTypeArguments(
- _helper.libraryBuilder, unaliasedTypeArguments),
+ _helper.libraryBuilder,
+ unaliasedTypeArguments,
+ /* hierarchy = */ null),
legacyEraseAliases:
!_helper.libraryBuilder.isNonNullableByDefault)!;
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/hierarchy/hierarchy_builder.dart b/pkg/front_end/lib/src/fasta/kernel/hierarchy/hierarchy_builder.dart
index b40523a..d1cdc2c 100644
--- a/pkg/front_end/lib/src/fasta/kernel/hierarchy/hierarchy_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/hierarchy/hierarchy_builder.dart
@@ -69,23 +69,30 @@
if (subtype.classNode == supertype) {
return new Supertype(supertype, subtype.typeArguments);
}
- ClassHierarchyNode clsNode = getNodeFromClass(subtype.classNode);
- ClassHierarchyNode supertypeNode = getNodeFromClass(supertype);
+ Supertype? cls = getClassAsInstanceOf(subtype.classNode, supertype);
+ if (cls != null) {
+ return Substitution.fromInterfaceType(subtype).substituteSupertype(cls);
+ }
+ return null;
+ }
+
+ @override
+ Supertype? getClassAsInstanceOf(Class subclass, Class superclass) {
+ ClassHierarchyNode clsNode = getNodeFromClass(subclass);
+ ClassHierarchyNode supertypeNode = getNodeFromClass(superclass);
List<Supertype> superclasses = clsNode.superclasses;
int depth = supertypeNode.depth;
if (depth < superclasses.length) {
- Supertype superclass = superclasses[depth];
- if (superclass.classNode == supertype) {
- return Substitution.fromInterfaceType(subtype)
- .substituteSupertype(superclass);
+ Supertype cls = superclasses[depth];
+ if (cls.classNode == superclass) {
+ return cls;
}
}
List<Supertype> superinterfaces = clsNode.interfaces;
for (int i = 0; i < superinterfaces.length; i++) {
- Supertype superinterface = superinterfaces[i];
- if (superinterface.classNode == supertype) {
- return Substitution.fromInterfaceType(subtype)
- .substituteSupertype(superinterface);
+ Supertype interface = superinterfaces[i];
+ if (interface.classNode == superclass) {
+ return interface;
}
}
return null;
diff --git a/pkg/front_end/lib/src/fasta/kernel/macro/macro.dart b/pkg/front_end/lib/src/fasta/kernel/macro/macro.dart
index 7805bbb..a86795c 100644
--- a/pkg/front_end/lib/src/fasta/kernel/macro/macro.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/macro/macro.dart
@@ -104,21 +104,60 @@
Map<SourceLibraryBuilder, LibraryMacroApplicationData> libraryData = {};
Map<SourceLibraryBuilder, String> libraryTypesResult = {};
Map<SourceLibraryBuilder, String> libraryDefinitionResult = {};
+
Map<SourceClassBuilder, List<macro.MacroExecutionResult>> classTypesResults =
{};
+
Map<SourceClassBuilder, List<macro.MacroExecutionResult>>
classDeclarationsResults = {};
+ Map<SourceClassBuilder, List<String>> classDeclarationsSources = {};
+
Map<SourceClassBuilder, List<macro.MacroExecutionResult>>
classDefinitionsResults = {};
+
Map<MemberBuilder, List<macro.MacroExecutionResult>> memberTypesResults = {};
+ Map<MemberBuilder, List<String>> memberTypesSources = {};
+
Map<MemberBuilder, List<macro.MacroExecutionResult>>
memberDeclarationsResults = {};
+ Map<MemberBuilder, List<String>> memberDeclarationsSources = {};
+
Map<MemberBuilder, List<macro.MacroExecutionResult>>
memberDefinitionsResults = {};
List<ApplicationDataForTesting> typesApplicationOrder = [];
List<ApplicationDataForTesting> declarationsApplicationOrder = [];
List<ApplicationDataForTesting> definitionApplicationOrder = [];
+
+ void registerTypesResults(
+ Builder builder, List<macro.MacroExecutionResult> results) {
+ if (builder is SourceClassBuilder) {
+ (classTypesResults[builder] ??= []).addAll(results);
+ } else {
+ (memberTypesResults[builder as MemberBuilder] ??= []).addAll(results);
+ }
+ }
+
+ void registerDeclarationsResult(
+ Builder builder, macro.MacroExecutionResult result, String source) {
+ if (builder is SourceClassBuilder) {
+ (classDeclarationsResults[builder] ??= []).add(result);
+ (classDeclarationsSources[builder] ??= []).add(source);
+ } else {
+ (memberDeclarationsResults[builder as MemberBuilder] ??= []).add(result);
+ (memberDeclarationsSources[builder] ??= []).add(source);
+ }
+ }
+
+ void registerDefinitionsResults(
+ Builder builder, List<macro.MacroExecutionResult> results) {
+ if (builder is SourceClassBuilder) {
+ (classDefinitionsResults[builder] ??= []).addAll(results);
+ } else {
+ (memberDefinitionsResults[builder as MemberBuilder] ??= [])
+ .addAll(results);
+ }
+ }
}
class ApplicationDataForTesting {
@@ -347,12 +386,7 @@
}
if (retainDataForTesting) {
- Builder builder = applicationData.builder;
- if (builder is SourceClassBuilder) {
- dataForTesting?.classTypesResults[builder] = results;
- } else {
- dataForTesting?.memberTypesResults[builder as MemberBuilder] = results;
- }
+ dataForTesting?.registerTypesResults(applicationData.builder, results);
}
return results;
}
@@ -429,6 +463,10 @@
if (result.isNotEmpty) {
String source = _macroExecutor.buildAugmentationLibrary(
[result], _resolveIdentifier, _inferOmittedType);
+ if (retainDataForTesting) {
+ dataForTesting?.registerDeclarationsResult(
+ applicationData.builder, result, source);
+ }
SourceLibraryBuilder augmentationLibrary = await applicationData
.libraryBuilder
.createAugmentationLibrary(source);
@@ -518,13 +556,8 @@
}
}
if (retainDataForTesting) {
- Builder builder = applicationData.builder;
- if (builder is SourceClassBuilder) {
- dataForTesting?.classDefinitionsResults[builder] = results;
- } else {
- dataForTesting?.memberDefinitionsResults[builder as MemberBuilder] =
- results;
- }
+ dataForTesting?.registerDefinitionsResults(
+ applicationData.builder, results);
}
return results;
}
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index fa979e1..d09d0b6 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -2260,10 +2260,10 @@
metadata,
kind,
modifiers,
- // TODO(johnniwinther): Avoid creating inferable types for omitted
- // types in uninferable context, like omitted parameter types of
- // function types.
- type ?? libraryBuilder.addInferableType(),
+ type ??
+ (memberKind.isParameterInferable
+ ? libraryBuilder.addInferableType()
+ : const ImplicitTypeBuilder()),
name == null ? FormalParameterBuilder.noNameSentinel : name as String,
thisKeyword != null,
superKeyword != null,
@@ -3470,3 +3470,29 @@
enumConstructor,
enumMethod,
}
+
+extension on MemberKind {
+ /// Returns `true` if a parameter occurring in this context can be inferred.
+ bool get isParameterInferable {
+ switch (this) {
+ case MemberKind.Catch:
+ case MemberKind.FunctionTypeAlias:
+ case MemberKind.Factory:
+ case MemberKind.FunctionTypedParameter:
+ case MemberKind.GeneralizedFunctionType:
+ case MemberKind.Local:
+ case MemberKind.StaticMethod:
+ case MemberKind.TopLevelMethod:
+ case MemberKind.ExtensionNonStaticMethod:
+ case MemberKind.ExtensionStaticMethod:
+ return false;
+ case MemberKind.NonStaticMethod:
+ // These can be inferred but cannot hold parameters so the cases are
+ // dead code:
+ case MemberKind.NonStaticField:
+ case MemberKind.StaticField:
+ case MemberKind.TopLevelField:
+ return true;
+ }
+ }
+}
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 9039e6a..973ee8c 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
@@ -6,7 +6,7 @@
import 'package:kernel/ast.dart';
import 'package:kernel/class_hierarchy.dart'
- show ClassHierarchy, ClassHierarchyMembers;
+ show ClassHierarchy, ClassHierarchyBase, ClassHierarchyMembers;
import 'package:kernel/core_types.dart';
import 'package:kernel/reference_from_index.dart' show IndexedClass;
import 'package:kernel/src/bounds_checks.dart';
@@ -523,8 +523,8 @@
int get typeVariablesCount => typeVariables?.length ?? 0;
@override
- List<DartType> buildAliasedTypeArguments(
- LibraryBuilder library, List<TypeBuilder>? arguments) {
+ List<DartType> buildAliasedTypeArguments(LibraryBuilder library,
+ List<TypeBuilder>? arguments, ClassHierarchyBase? hierarchy) {
if (arguments == null && typeVariables == null) {
return <DartType>[];
}
@@ -538,7 +538,8 @@
// TODO(johnniwinther): Using [libraryBuilder] here instead of
// [library] preserves the nullability of the original
// declaration. Should we legacy erase this?
- .buildAliased(libraryBuilder, TypeUse.defaultTypeAsTypeArgument),
+ .buildAliased(
+ libraryBuilder, TypeUse.defaultTypeAsTypeArgument, hierarchy),
growable: true);
if (library is SourceLibraryBuilder) {
library.inferredTypes.addAll(result);
@@ -558,8 +559,10 @@
}
assert(arguments!.length == typeVariablesCount);
- List<DartType> result = new List<DartType>.generate(arguments!.length,
- (int i) => arguments[i].buildAliased(library, TypeUse.typeArgument),
+ List<DartType> result = new List<DartType>.generate(
+ arguments!.length,
+ (int i) =>
+ arguments[i].buildAliased(library, TypeUse.typeArgument, hierarchy),
growable: true);
return result;
}
diff --git a/pkg/front_end/lib/src/fasta/source/source_constructor_builder.dart b/pkg/front_end/lib/src/fasta/source/source_constructor_builder.dart
index 4d34781..43b3074 100644
--- a/pkg/front_end/lib/src/fasta/source/source_constructor_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_constructor_builder.dart
@@ -59,7 +59,7 @@
abstract class SourceConstructorBuilder
implements ConstructorBuilder, SourceMemberBuilder {
/// Infers the types of any untyped initializing formals.
- void inferFormalTypes(TypeEnvironment typeEnvironment);
+ void inferFormalTypes(ClassHierarchyBase hierarchy);
void addSuperParameterDefaultValueCloners(
List<DelayedDefaultValueCloner> delayedDefaultValueCloners);
@@ -249,12 +249,12 @@
}
@override
- void inferTypes(TypeEnvironment typeEnvironment) {
- inferFormalTypes(typeEnvironment);
+ void inferTypes(ClassHierarchyBase hierarchy) {
+ inferFormalTypes(hierarchy);
}
@override
- void inferFormalTypes(TypeEnvironment typeEnvironment) {
+ void inferFormalTypes(ClassHierarchyBase hierarchy) {
if (_hasFormalsInferred) return;
if (formals != null) {
for (FormalParameterBuilder formal in formals!) {
@@ -278,7 +278,7 @@
doFinishConstructor: false);
}
finalizeSuperInitializingFormals(
- typeEnvironment, _superParameterDefaultValueCloners, initializers);
+ hierarchy, _superParameterDefaultValueCloners, initializers);
}
}
_hasFormalsInferred = true;
@@ -333,7 +333,7 @@
}
void finalizeSuperInitializingFormals(
- TypeEnvironment typeEnvironment,
+ ClassHierarchyBase hierarchy,
List<DelayedDefaultValueCloner> delayedDefaultValueCloners,
List<Initializer>? initializers) {
if (formals == null) return;
@@ -351,7 +351,7 @@
_computeSuperTargetBuilder(initializers);
if (superTargetBuilder is SourceConstructorBuilder) {
- superTargetBuilder.inferFormalTypes(typeEnvironment);
+ superTargetBuilder.inferFormalTypes(hierarchy);
}
Constructor superTarget;
@@ -386,8 +386,8 @@
List<int?>? positionalSuperParameters;
List<String>? namedSuperParameters;
- Supertype? supertype = typeEnvironment.hierarchy
- .getClassAsInstanceOf(classBuilder.cls, superTarget.enclosingClass);
+ Supertype? supertype = hierarchy.getClassAsInstanceOf(
+ classBuilder.cls, superTarget.enclosingClass);
assert(supertype != null);
Map<TypeParameter, DartType> substitution =
new Map<TypeParameter, DartType>.fromIterables(
@@ -818,10 +818,10 @@
super.libraryBuilder as SourceLibraryBuilder;
@override
- void inferFormalTypes(TypeEnvironment typeEnvironment) {
+ void inferFormalTypes(ClassHierarchyBase hierarchy) {
if (_immediatelyDefiningConstructor is SourceConstructorBuilder) {
(_immediatelyDefiningConstructor as SourceConstructorBuilder)
- .inferFormalTypes(typeEnvironment);
+ .inferFormalTypes(hierarchy);
}
if (_typeDependency != null) {
_typeDependency!.copyInferred();
diff --git a/pkg/front_end/lib/src/fasta/source/source_field_builder.dart b/pkg/front_end/lib/src/fasta/source/source_field_builder.dart
index a8c4fe0..4fba639 100644
--- a/pkg/front_end/lib/src/fasta/source/source_field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_field_builder.dart
@@ -297,7 +297,8 @@
membersBuilder.inferFieldType(this, _overrideDependencies!);
_overrideDependencies = null;
} else {
- inferType();
+ type.build(libraryBuilder, TypeUse.fieldType,
+ hierarchy: membersBuilder.hierarchyBuilder);
}
_typeEnsured = true;
}
@@ -460,7 +461,7 @@
}
@override
- void inferTypes(TypeEnvironment typeEnvironment) {
+ void inferTypes(ClassHierarchyBase hierarchy) {
inferType();
}
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 cb33439..ffced81 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -2294,7 +2294,7 @@
}
for (InferableTypeBuilder typeBuilder in inferableTypes) {
- typeBuilder.inferType(typeInferenceEngine.typeSchemaEnvironment);
+ typeBuilder.inferType(typeInferenceEngine.hierarchyBuilder);
}
typeInferenceEngine.isTypeInferencePrepared = true;
diff --git a/pkg/front_end/lib/src/fasta/source/source_procedure_builder.dart b/pkg/front_end/lib/src/fasta/source/source_procedure_builder.dart
index e513652..2d6873b 100644
--- a/pkg/front_end/lib/src/fasta/source/source_procedure_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_procedure_builder.dart
@@ -175,6 +175,14 @@
}
_overrideDependencies = null;
}
+ returnType.build(libraryBuilder, TypeUse.fieldType,
+ hierarchy: membersBuilder.hierarchyBuilder);
+ if (formals != null) {
+ for (FormalParameterBuilder formal in formals!) {
+ formal.type.build(libraryBuilder, TypeUse.parameterType,
+ hierarchy: membersBuilder.hierarchyBuilder);
+ }
+ }
_typeEnsured = true;
}
diff --git a/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart b/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart
index 56ee6cd..499a0c9 100644
--- a/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_type_alias_builder.dart
@@ -180,8 +180,8 @@
}
@override
- List<DartType> buildAliasedTypeArguments(
- LibraryBuilder library, List<TypeBuilder>? arguments) {
+ List<DartType> buildAliasedTypeArguments(LibraryBuilder library,
+ List<TypeBuilder>? arguments, ClassHierarchyBase? hierarchy) {
if (arguments == null && typeVariables == null) {
return <DartType>[];
}
@@ -196,7 +196,8 @@
// [library] preserves the nullability of the original
// declaration. We legacy erase it later, but should we legacy
// erase it now also?
- .buildAliased(libraryBuilder, TypeUse.defaultTypeAsTypeArgument),
+ .buildAliased(
+ libraryBuilder, TypeUse.defaultTypeAsTypeArgument, hierarchy),
growable: true);
if (library is SourceLibraryBuilder) {
library.inferredTypes.addAll(result);
@@ -216,8 +217,10 @@
}
// arguments.length == typeVariables.length
- return new List<DartType>.generate(arguments!.length,
- (int i) => arguments[i].buildAliased(library, TypeUse.typeArgument),
+ return new List<DartType>.generate(
+ arguments!.length,
+ (int i) =>
+ arguments[i].buildAliased(library, TypeUse.typeArgument, hierarchy),
growable: true);
}
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
index 4b3e3c3..e56ee3e 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
@@ -145,7 +145,7 @@
// Field types have all been inferred so we don't need to guard against
// cyclic dependency.
for (SourceConstructorBuilder builder in toBeInferred.values) {
- builder.inferFormalTypes(typeSchemaEnvironment);
+ builder.inferFormalTypes(classHierarchy);
}
toBeInferred.clear();
for (TypeDependency typeDependency in typeDependencies.values) {
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
index 5d50345..116a327 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -496,7 +496,7 @@
} else if ((constructor = engine.toBeInferred[target]) != null) {
engine.toBeInferred.remove(target);
engine.beingInferred[target] = constructor!;
- constructor.inferFormalTypes(typeSchemaEnvironment);
+ constructor.inferFormalTypes(classHierarchy);
engine.beingInferred.remove(target);
}
}
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index 4a1486a..08e38e2 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -392,7 +392,6 @@
FfiNotStatic/analyzerCode: Fail
FfiPackedAnnotation/analyzerCode: Fail
FfiPackedAnnotationAlignment/analyzerCode: Fail
-FfiPackedNestingNonPacked/analyzerCode: Fail
FfiSizeAnnotation/analyzerCode: Fail
FfiSizeAnnotationDimensions/analyzerCode: Fail
FfiStructAnnotation/analyzerCode: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 829904c..3c2d1fe 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -4667,11 +4667,6 @@
problemMessage: "Only packing to 1, 2, 4, 8, and 16 bytes is supported."
external: test/ffi_test.dart
-FfiPackedNestingNonPacked:
- # Used by dart:ffi
- problemMessage: "Nesting the non-packed or less tightly packed struct '#name' in a packed struct '#name2' is not supported."
- external: test/ffi_test.dart
-
FfiSizeAnnotation:
# Used by dart:ffi
problemMessage: "Field '#name' must have exactly one 'Array' annotation."
diff --git a/pkg/front_end/test/macros/application/data/tests/data_class.dart b/pkg/front_end/test/macros/application/data/tests/data_class.dart
index e794e81..70c6e50 100644
--- a/pkg/front_end/test/macros/application/data/tests/data_class.dart
+++ b/pkg/front_end/test/macros/application/data/tests/data_class.dart
@@ -27,11 +27,17 @@
@DataClass()
/*class: Foo:
+declarations:
+import 'dart:core' as prefix0;
+
augment class Foo {
const Foo({required this.bar, required this.baz});
-external int get hashCode;
-external bool operator ==(Object other);
-external String toString();
+external prefix0.int get hashCode;
+external prefix0.bool operator ==(prefix0.Object other);
+external prefix0.String toString();
+}
+definitions:
+augment class Foo {
augment int hashCode() {
return bar.hashCode ^ baz.hashCode;
}
diff --git a/pkg/front_end/test/macros/application/data/tests/declarations.dart b/pkg/front_end/test/macros/application/data/tests/declarations.dart
index 7ba5b39..77b616e 100644
--- a/pkg/front_end/test/macros/application/data/tests/declarations.dart
+++ b/pkg/front_end/test/macros/application/data/tests/declarations.dart
@@ -31,154 +31,224 @@
import 'package:macro/macro.dart';
-/*member: topLevelFunction1:
-void topLevelFunction1GeneratedMethod_() {}
-*/
@FunctionDeclarationsMacro1()
+/*member: topLevelFunction1:
+declarations:
+
+void topLevelFunction1GeneratedMethod_() {}
+
+*/
void topLevelFunction1() {}
-/*member: topLevelFunction2:
-void topLevelFunction2GeneratedMethod_e() {}
-*/
@FunctionDeclarationsMacro1()
+/*member: topLevelFunction2:
+declarations:
+
+void topLevelFunction2GeneratedMethod_e() {}
+
+*/
external void topLevelFunction2();
-/*member: topLevelField1:
-void topLevelField1GeneratedMethod_() {}
-*/
@VariableDeclarationsMacro1()
+/*member: topLevelField1:
+declarations:
+
+void topLevelField1GeneratedMethod_() {}
+
+*/
int? topLevelField1;
-/*member: topLevelField2:
-void topLevelField2GeneratedMethod_e() {}
-*/
@VariableDeclarationsMacro1()
+/*member: topLevelField2:
+declarations:
+
+void topLevelField2GeneratedMethod_e() {}
+
+*/
external int? topLevelField2;
-/*member: topLevelField3:
-void topLevelField3GeneratedMethod_f() {}
-*/
@VariableDeclarationsMacro1()
+/*member: topLevelField3:
+declarations:
+
+void topLevelField3GeneratedMethod_f() {}
+
+*/
final int? topLevelField3 = null;
-/*member: topLevelField4:
-void topLevelField4GeneratedMethod_l() {}
-*/
@VariableDeclarationsMacro1()
+/*member: topLevelField4:
+declarations:
+
+void topLevelField4GeneratedMethod_l() {}
+
+*/
late int? topLevelField4;
-/*member: topLevelGetter1:
-void topLevelGetter1GeneratedMethod_g() {}
-*/
@FunctionDeclarationsMacro1()
+/*member: topLevelGetter1:
+declarations:
+
+void topLevelGetter1GeneratedMethod_g() {}
+
+*/
int? get topLevelGetter1 => null;
-/*member: topLevelSetter1=:
-void topLevelSetter1GeneratedMethod_s() {}
-*/
@FunctionDeclarationsMacro1()
+/*member: topLevelSetter1=:
+declarations:
+
+void topLevelSetter1GeneratedMethod_s() {}
+
+*/
void set topLevelSetter1(int? value) {}
+@ClassDeclarationsMacro1()
+@ClassDeclarationsMacro2()
/*class: Class1:
+declarations:
+
void Class1Introspection() {
print("constructors='','redirect','fact'");
print("fields='instanceField1','instanceField2','instanceField3'");
print("methods='instanceMethod1','instanceGetter1','[]','Class1_GeneratedMethod_','Class1_redirectGeneratedMethod_f','Class1_factGeneratedMethod_f','instanceSetter1','Class1_GeneratedMethod_','Class1_redirectGeneratedMethod_f','Class1_factGeneratedMethod_f'");
}
+
+
void Class1GeneratedMethod_() {}
+
*/
-@ClassDeclarationsMacro1()
-@ClassDeclarationsMacro2()
class Class1 {
+ @ConstructorDeclarationsMacro1()
/*member: Class1.:
+declarations:
+
augment class Class1 {
void Class1_GeneratedMethod_() {}
-}*/
- @ConstructorDeclarationsMacro1()
+}
+*/
Class1();
+ @ConstructorDeclarationsMacro1()
/*member: Class1.redirect:
+declarations:
+
augment class Class1 {
void Class1_redirectGeneratedMethod_f() {}
-}*/
- @ConstructorDeclarationsMacro1()
+}
+*/
factory Class1.redirect() = Class1;
+ @ConstructorDeclarationsMacro1()
/*member: Class1.fact:
+declarations:
+
augment class Class1 {
void Class1_factGeneratedMethod_f() {}
-}*/
- @ConstructorDeclarationsMacro1()
+}
+*/
factory Class1.fact() => new Class1();
- /*member: Class1.instanceMethod1:
-void Class1_instanceMethod1GeneratedMethod_() {}
-*/
@MethodDeclarationsMacro1()
+ /*member: Class1.instanceMethod1:
+declarations:
+
+void Class1_instanceMethod1GeneratedMethod_() {}
+
+*/
void instanceMethod1() {}
- /*member: Class1.instanceGetter1:
-void Class1_instanceGetter1GeneratedMethod_g() {}
-*/
@MethodDeclarationsMacro1()
+ /*member: Class1.instanceGetter1:
+declarations:
+
+void Class1_instanceGetter1GeneratedMethod_g() {}
+
+*/
int? get instanceGetter1 => null;
- /*member: Class1.instanceSetter1=:
-void Class1_instanceSetter1GeneratedMethod_s() {}
-*/
@MethodDeclarationsMacro1()
+ /*member: Class1.instanceSetter1=:
+declarations:
+
+void Class1_instanceSetter1GeneratedMethod_s() {}
+
+*/
void set instanceSetter1(int? value) {}
- /*member: Class1.[]:
-void Class1_operatorGeneratedMethod_o() {}
-*/
@MethodDeclarationsMacro1()
+ /*member: Class1.[]:
+declarations:
+
+void Class1_operatorGeneratedMethod_o() {}
+
+*/
int operator [](int i) => i;
- /*member: Class1.instanceField1:
-void Class1_instanceField1GeneratedMethod_() {}
-*/
@FieldDeclarationsMacro1()
+ /*member: Class1.instanceField1:
+declarations:
+
+void Class1_instanceField1GeneratedMethod_() {}
+
+*/
int? instanceField1;
- /*member: Class1.instanceField2:
-void Class1_instanceField2GeneratedMethod_f() {}
-*/
@FieldDeclarationsMacro1()
+ /*member: Class1.instanceField2:
+declarations:
+
+void Class1_instanceField2GeneratedMethod_f() {}
+
+*/
final int? instanceField2 = null;
- /*member: Class1.instanceField3:
-void Class1_instanceField3GeneratedMethod_fl() {}
-*/
@FieldDeclarationsMacro1()
+ /*member: Class1.instanceField3:
+declarations:
+
+void Class1_instanceField3GeneratedMethod_fl() {}
+
+*/
late final int? instanceField3 = null;
}
+@ClassDeclarationsMacro1()
+@ClassDeclarationsMacro2()
/*class: Class2:
+declarations:
+
void Class2Introspection() {
print("constructors=");
print("fields='instanceField1'");
print("methods='instanceMethod1'");
}
+
+
void Class2GeneratedMethod_a() {}
+
*/
-@ClassDeclarationsMacro1()
-@ClassDeclarationsMacro2()
abstract class Class2 {
- /*member: Class2.instanceMethod1:
-void Class2_instanceMethod1GeneratedMethod_a() {}
-*/
@MethodDeclarationsMacro1()
+ /*member: Class2.instanceMethod1:
+declarations:
+
+void Class2_instanceMethod1GeneratedMethod_a() {}
+
+*/
void instanceMethod1();
- /*member: Class2.instanceField1:
-void Class2_instanceField1GeneratedMethod_() {}
-*/
@FieldDeclarationsMacro1()
+ /*member: Class2.instanceField1:
+declarations:
+
+void Class2_instanceField1GeneratedMethod_() {}
+
+*/
abstract int? instanceField1;
}
diff --git a/pkg/front_end/test/macros/application/data/tests/import_conflict.dart b/pkg/front_end/test/macros/application/data/tests/import_conflict.dart
index 908c3c1..9d4d622 100644
--- a/pkg/front_end/test/macros/application/data/tests/import_conflict.dart
+++ b/pkg/front_end/test/macros/application/data/tests/import_conflict.dart
@@ -24,6 +24,7 @@
@ImportConflictMacro()
/*member: function:
+definitions:
augment void function(int i, FutureOr<Random> f, JsonCodec c, ) {
var prefix = int;
var prefix0 = FutureOr<Random>;
diff --git a/pkg/front_end/test/macros/application/data/tests/layers.dart b/pkg/front_end/test/macros/application/data/tests/layers.dart
index 69afb5f..a526269 100644
--- a/pkg/front_end/test/macros/application/data/tests/layers.dart
+++ b/pkg/front_end/test/macros/application/data/tests/layers.dart
@@ -11,8 +11,11 @@
@Macro2()
/*class: Class:
+declarations:
+
augment class Class {
hasMacro() => true;
-}*/
+}
+*/
class Class {}
diff --git a/pkg/front_end/test/macros/application/data/tests/parameters.dart b/pkg/front_end/test/macros/application/data/tests/parameters.dart
index 75d6e1c..20f83ff 100644
--- a/pkg/front_end/test/macros/application/data/tests/parameters.dart
+++ b/pkg/front_end/test/macros/application/data/tests/parameters.dart
@@ -27,6 +27,7 @@
import 'package:macro/macro.dart';
/*member: topLevelFunction1:
+definitions:
augment void topLevelFunction1(int a, ) {
throw 42;
}*/
@@ -34,6 +35,7 @@
external void topLevelFunction1(int a);
/*member: topLevelFunction2:
+definitions:
augment void topLevelFunction2(int a, int b, ) {
throw 42;
}*/
@@ -41,6 +43,7 @@
external void topLevelFunction2(int a, int b);
/*member: topLevelFunction3:
+definitions:
augment void topLevelFunction3(int a, [int? b, ]) {
throw 42;
}*/
@@ -48,6 +51,7 @@
external void topLevelFunction3(int a, [int? b]);
/*member: topLevelFunction4:
+definitions:
augment void topLevelFunction4(int a, {int? b, int? c, }) {
throw 42;
}*/
diff --git a/pkg/front_end/test/macros/application/data/tests/sequence.dart b/pkg/front_end/test/macros/application/data/tests/sequence.dart
index 0af4289..0318ffd 100644
--- a/pkg/front_end/test/macros/application/data/tests/sequence.dart
+++ b/pkg/front_end/test/macros/application/data/tests/sequence.dart
@@ -29,41 +29,65 @@
import 'package:macro/macro.dart';
+@SequenceMacro(0)
/*class: Class1:
+declarations:
+
augment class Class1 {
method() {}
-}*/
-@SequenceMacro(0)
+}
+*/
class Class1 {}
-/*class: Class2:
-augment class Class2 {
- method() {}
- method1() {}
-}*/
@SequenceMacro(0)
@SequenceMacro(1)
+/*class: Class2:
+declarations:
+
+augment class Class2 {
+ method() {}
+}
+
+
+augment class Class2 {
+ method1() {}
+}
+*/
class Class2 {}
+@SequenceMacro(0)
/*class: Class3:
+declarations:
+
augment class Class3 {
method1() {}
-}*/
-@SequenceMacro(0)
+}
+*/
class Class3 {
@SequenceMacro(1)
method() {}
}
-/*class: Class4:
-augment class Class4 {
- method1() {}
- method3() {}
- method4() {}
-}*/
@SequenceMacro(0)
@SequenceMacro(1)
@SequenceMacro(2)
+/*class: Class4:
+declarations:
+
+augment class Class4 {
+ method1() {}
+}
+
+
+augment class Class4 {
+ method3() {}
+}
+
+
+augment class Class4 {
+ method4() {}
+}
+*/
class Class4 {
@SequenceMacro(3)
method() {}
@@ -72,79 +96,112 @@
method2() {}
}
+@SequenceMacro(0)
/*class: Class5c:
+declarations:
+
augment class Class5c {
method2() {}
-}*/
-@SequenceMacro(0)
+}
+*/
class Class5c extends Class5b {}
+@SequenceMacro(0)
/*class: Class5b:
+declarations:
+
augment class Class5b {
method1() {}
-}*/
-@SequenceMacro(0)
+}
+*/
class Class5b extends Class5a {}
+@SequenceMacro(0)
/*class: Class5a:
+declarations:
+
augment class Class5a {
method() {}
-}*/
-@SequenceMacro(0)
+}
+*/
class Class5a {}
+@SequenceMacro(0)
/*class: Class6d:
+declarations:
+
augment class Class6d {
method2() {}
-}*/
-@SequenceMacro(0)
+}
+*/
abstract class Class6d implements Class6c, Class6b {}
+@SequenceMacro(0)
/*class: Class6c:
+declarations:
+
augment class Class6c {
method() {}
-}*/
-@SequenceMacro(0)
+}
+*/
class Class6c {}
+@SequenceMacro(0)
/*class: Class6b:
+declarations:
+
augment class Class6b {
method1() {}
-}*/
-@SequenceMacro(0)
+}
+*/
abstract class Class6b implements Class6a {}
+@SequenceMacro(0)
/*class: Class6a:
+declarations:
+
augment class Class6a {
method() {}
-}*/
-@SequenceMacro(0)
+}
+*/
class Class6a {}
+@SequenceMacro(0)
/*class: Class7d:
+declarations:
+
augment class Class7d {
method2() {}
-}*/
-@SequenceMacro(0)
+}
+*/
class Class7d with Class7b, Class7c {}
+@SequenceMacro(0)
/*class: Class7c:
+declarations:
+
augment class Class7c {
method() {}
-}*/
-@SequenceMacro(0)
+}
+*/
class Class7c {}
+@SequenceMacro(0)
/*class: Class7b:
+declarations:
+
augment class Class7b {
method1() {}
-}*/
-@SequenceMacro(0)
+}
+*/
class Class7b with Class7a {}
+@SequenceMacro(0)
/*class: Class7a:
+declarations:
+
augment class Class7a {
method() {}
-}*/
-@SequenceMacro(0)
+}
+*/
class Class7a {}
diff --git a/pkg/front_end/test/macros/application/data/tests/subtypes.dart b/pkg/front_end/test/macros/application/data/tests/subtypes.dart
index edd0f6e..d62139a 100644
--- a/pkg/front_end/test/macros/application/data/tests/subtypes.dart
+++ b/pkg/front_end/test/macros/application/data/tests/subtypes.dart
@@ -54,8 +54,11 @@
class D2 {}
/*member: topLevelFunction1:
+declarations:
+
void topLevelFunction1GeneratedMethod_es() {}
+definitions:
augment A topLevelFunction1(A a, ) {
print('isExactly=true');
print('isSubtype=true');
@@ -66,8 +69,11 @@
external A topLevelFunction1(A a);
/*member: topLevelFunction2:
+declarations:
+
void topLevelFunction2GeneratedMethod_s() {}
+definitions:
augment B2 topLevelFunction2(B1 a, ) {
print('isExactly=false');
print('isSubtype=true');
@@ -78,8 +84,11 @@
external B2 topLevelFunction2(B1 a);
/*member: topLevelFunction3:
+declarations:
+
void topLevelFunction3GeneratedMethod_() {}
+definitions:
augment C2 topLevelFunction3(C1 a, ) {
print('isExactly=false');
print('isSubtype=false');
@@ -90,8 +99,11 @@
external C2 topLevelFunction3(C1 a);
/*member: topLevelFunction4:
+declarations:
+
void topLevelFunction4GeneratedMethod_() {}
+definitions:
augment D2 topLevelFunction4(D1 a, ) {
print('isExactly=false');
print('isSubtype=false');
diff --git a/pkg/front_end/test/macros/application/data/tests/supertypes.dart b/pkg/front_end/test/macros/application/data/tests/supertypes.dart
index f319df3..b236bc0 100644
--- a/pkg/front_end/test/macros/application/data/tests/supertypes.dart
+++ b/pkg/front_end/test/macros/application/data/tests/supertypes.dart
@@ -35,6 +35,7 @@
import 'package:macro/macro.dart';
/*class: A:
+definitions:
augment class A {
augment String getSuperClass() {
return "Object";
@@ -46,6 +47,7 @@
}
/*class: B:
+definitions:
augment class B {
augment String getSuperClass() {
return "A";
@@ -57,6 +59,7 @@
}
/*class: M:
+definitions:
augment class M {
augment String getSuperClass() {
return "Object";
@@ -68,6 +71,7 @@
}
/*class: C:
+definitions:
augment class C {
augment String getSuperClass() {
return "A";
diff --git a/pkg/front_end/test/macros/application/data/tests/to_string.dart b/pkg/front_end/test/macros/application/data/tests/to_string.dart
index 5f483c7..5cba268 100644
--- a/pkg/front_end/test/macros/application/data/tests/to_string.dart
+++ b/pkg/front_end/test/macros/application/data/tests/to_string.dart
@@ -12,11 +12,14 @@
@ToStringMacro()
/*class: A:
+declarations:
+
augment class A {
toString() {
return "A(a=${a},b=${b})";
}
-}*/
+}
+*/
class A {
var a;
var b;
@@ -24,11 +27,14 @@
@ToStringMacro()
/*class: B:
+declarations:
+
augment class B {
toString() {
return "B(c=${c},d=${d},e=${e})";
}
-}*/
+}
+*/
class B {
var c, d;
var e;
diff --git a/pkg/front_end/test/macros/application/data/tests/type_annotations.dart b/pkg/front_end/test/macros/application/data/tests/type_annotations.dart
index b6a734c..3b5a13a 100644
--- a/pkg/front_end/test/macros/application/data/tests/type_annotations.dart
+++ b/pkg/front_end/test/macros/application/data/tests/type_annotations.dart
@@ -46,6 +46,7 @@
import 'package:macro/macro.dart';
/*member: topLevelFunction1:
+definitions:
augment void topLevelFunction1() {
throw 42;
}*/
@@ -53,6 +54,7 @@
external void topLevelFunction1();
/*member: topLevelFunction2:
+definitions:
augment dynamic topLevelFunction2() {
throw 42;
}*/
@@ -60,6 +62,7 @@
external dynamic topLevelFunction2();
/*member: topLevelFunction3:
+definitions:
augment int topLevelFunction3() {
throw 42;
}*/
@@ -67,6 +70,7 @@
external int topLevelFunction3();
/*member: topLevelFunction4:
+definitions:
augment dynamic topLevelFunction4() {
throw 42;
}*/
@@ -74,6 +78,7 @@
external topLevelFunction4();
/*member: topLevelFunction5:
+definitions:
augment Random topLevelFunction5() {
throw 42;
}*/
@@ -81,6 +86,7 @@
external math.Random topLevelFunction5();
/*member: topLevelFunction6:
+definitions:
augment List<int> topLevelFunction6() {
throw 42;
}*/
@@ -88,6 +94,7 @@
external List<int> topLevelFunction6();
/*member: topLevelFunction7:
+definitions:
augment Map<Random, List<int>> topLevelFunction7() {
throw 42;
}*/
@@ -95,6 +102,7 @@
external Map<math.Random, List<int>> topLevelFunction7();
/*member: topLevelFunction8:
+definitions:
augment Map<int?, String>? topLevelFunction8() {
throw 42;
}*/
diff --git a/pkg/front_end/test/macros/application/data/tests/types.dart b/pkg/front_end/test/macros/application/data/tests/types.dart
index 6db0cf4..f6c2702 100644
--- a/pkg/front_end/test/macros/application/data/tests/types.dart
+++ b/pkg/front_end/test/macros/application/data/tests/types.dart
@@ -32,6 +32,7 @@
import 'package:macro/macro.dart';
/*member: topLevelFunction1:
+types:
class topLevelFunction1GeneratedClass {
external void method();
}*/
@@ -39,6 +40,7 @@
void topLevelFunction1() {}
/*member: topLevelFunction2:
+types:
class topLevelFunction2GeneratedClass {
external dynamic method();
}*/
@@ -46,6 +48,7 @@
dynamic topLevelFunction2() {}
/*member: topLevelFunction3:
+types:
class topLevelFunction3GeneratedClass {
external int method();
}*/
@@ -53,6 +56,7 @@
int topLevelFunction3() => 0;
/*member: topLevelFunction4:
+types:
class topLevelFunction4GeneratedClass {
external FunctionTypesMacro1? method();
}*/
@@ -60,6 +64,7 @@
FunctionTypesMacro1? topLevelFunction4() => null;
/*member: topLevelFunction5:
+types:
class topLevelFunction5GeneratedClass {
external dynamic method();
}*/
diff --git a/pkg/front_end/test/macros/application/macro_application_test.dart b/pkg/front_end/test/macros/application/macro_application_test.dart
index 1ce3c47..cf08dda 100644
--- a/pkg/front_end/test/macros/application/macro_application_test.dart
+++ b/pkg/front_end/test/macros/application/macro_application_test.dart
@@ -202,54 +202,82 @@
.dataForTesting!
.macroApplicationData;
StringBuffer sb = new StringBuffer();
- List<DeclarationCode> mergedClassAugmentations = [];
+
+ StringBuffer typesSources = new StringBuffer();
+ List<DeclarationCode> mergedClassTypes = [];
for (MapEntry<SourceClassBuilder, List<MacroExecutionResult>> entry
in macroApplicationData.classTypesResults.entries) {
if (entry.key.cls == cls) {
for (MacroExecutionResult result in entry.value) {
if (result.libraryAugmentations.isNotEmpty) {
- sb.write('\n${codeToString(result.libraryAugmentations.single)}');
+ if (result.libraryAugmentations.isNotEmpty) {
+ typesSources.write(
+ '\n${codeToString(result.libraryAugmentations.single)}');
+ }
+ mergedClassTypes
+ .addAll(result.classAugmentations[entry.key.name] ?? const []);
}
- mergedClassAugmentations
- .addAll(result.classAugmentations[entry.key.name] ?? const []);
}
}
}
- for (MapEntry<SourceClassBuilder, List<MacroExecutionResult>> entry
- in macroApplicationData.classDeclarationsResults.entries) {
+ if (mergedClassTypes.isNotEmpty) {
+ typesSources.write('\naugment class ${cls.name} {');
+ for (var result in mergedClassTypes) {
+ typesSources.write('\n${codeToString(result)}');
+ }
+ typesSources.write('\n}');
+ }
+ if (typesSources.isNotEmpty) {
+ sb.write('types:');
+ sb.write(typesSources);
+ }
+
+ StringBuffer declarationsSources = new StringBuffer();
+ for (MapEntry<SourceClassBuilder, List<String>> entry
+ in macroApplicationData.classDeclarationsSources.entries) {
if (entry.key.cls == cls) {
- for (MacroExecutionResult result in entry.value) {
- if (result.libraryAugmentations.isNotEmpty) {
- sb.write('\n${codeToString(result.libraryAugmentations.single)}');
+ for (String result in entry.value) {
+ if (result.isNotEmpty) {
+ declarationsSources.write('\n${result}');
}
- mergedClassAugmentations
- .addAll(result.classAugmentations[entry.key.name] ?? const []);
}
}
}
+ if (declarationsSources.isNotEmpty) {
+ sb.write('declarations:');
+ sb.write(declarationsSources);
+ }
+
+ StringBuffer definitionsSources = new StringBuffer();
+ List<DeclarationCode> mergedClassDefinitions = [];
for (MapEntry<SourceClassBuilder, List<MacroExecutionResult>> entry
in macroApplicationData.classDefinitionsResults.entries) {
if (entry.key.cls == cls) {
for (MacroExecutionResult result in entry.value) {
if (result.libraryAugmentations.isNotEmpty) {
- sb.write('\n${codeToString(result.libraryAugmentations.single)}');
+ definitionsSources
+ .write('\n${codeToString(result.libraryAugmentations.single)}');
}
- mergedClassAugmentations
+ mergedClassDefinitions
.addAll(result.classAugmentations[entry.key.name] ?? const []);
}
}
}
- if (mergedClassAugmentations.isNotEmpty) {
- sb.write('\naugment class ${cls.name} {');
- for (var result in mergedClassAugmentations) {
- sb.write('\n${codeToString(result)}');
+ if (mergedClassDefinitions.isNotEmpty) {
+ definitionsSources.write('\naugment class ${cls.name} {');
+ for (var result in mergedClassDefinitions) {
+ definitionsSources.write('\n${codeToString(result)}');
}
- sb.write('\n}');
+ definitionsSources.write('\n}');
}
+ if (definitionsSources.isNotEmpty) {
+ sb.write('definitions:');
+ sb.write(definitionsSources);
+ }
+
if (sb.isNotEmpty) {
Id id = new ClassId(cls.name);
- registry.registerValue(
- cls.fileUri, cls.fileOffset, id, sb.toString(), cls);
+ registry.registerValue(cls.fileUri, cls.fileOffset, id, '\n$sb', cls);
}
}
@@ -266,69 +294,64 @@
.dataForTesting!
.macroApplicationData;
StringBuffer sb = StringBuffer();
- List<DeclarationCode> mergedAugmentations = [];
+
+ StringBuffer typesSources = new StringBuffer();
for (MapEntry<MemberBuilder, List<MacroExecutionResult>> entry
in macroApplicationData.memberTypesResults.entries) {
if (_isMember(entry.key, member)) {
for (MacroExecutionResult result in entry.value) {
if (result.libraryAugmentations.isNotEmpty) {
- sb.write('\n${codeToString(result.libraryAugmentations.single)}');
- }
- if (member.enclosingClass != null) {
- mergedAugmentations.addAll(
- result.classAugmentations[member.enclosingClass!.name] ??
- const []);
+ if (result.libraryAugmentations.isNotEmpty) {
+ typesSources.write(
+ '\n${codeToString(result.libraryAugmentations.single)}');
+ }
}
}
}
}
- for (MapEntry<MemberBuilder, List<MacroExecutionResult>> entry
- in macroApplicationData.memberDeclarationsResults.entries) {
+ if (typesSources.isNotEmpty) {
+ sb.write('types:');
+ sb.write(typesSources);
+ }
+
+ StringBuffer declarationsSources = new StringBuffer();
+ for (MapEntry<MemberBuilder, List<String>> entry
+ in macroApplicationData.memberDeclarationsSources.entries) {
if (_isMember(entry.key, member)) {
- for (MacroExecutionResult result in entry.value) {
- if (result.libraryAugmentations.isNotEmpty) {
- sb.write('\n${codeToString(result.libraryAugmentations.single)}');
- }
- if (member.enclosingClass != null) {
- mergedAugmentations.addAll(
- result.classAugmentations[member.enclosingClass!.name] ??
- const []);
+ for (String result in entry.value) {
+ if (result.isNotEmpty) {
+ declarationsSources.write('\n${result}');
}
}
}
}
+ if (declarationsSources.isNotEmpty) {
+ sb.write('declarations:');
+ sb.write(declarationsSources);
+ }
+
+ StringBuffer definitionsSources = new StringBuffer();
for (MapEntry<MemberBuilder, List<MacroExecutionResult>> entry
in macroApplicationData.memberDefinitionsResults.entries) {
if (_isMember(entry.key, member)) {
for (MacroExecutionResult result in entry.value) {
if (result.libraryAugmentations.isNotEmpty) {
- sb.write('\n${codeToString(result.libraryAugmentations.single)}');
- }
- if (member.enclosingClass != null) {
- mergedAugmentations.addAll(
- result.classAugmentations[member.enclosingClass!.name] ??
- const []);
+ definitionsSources
+ .write('\n${codeToString(result.libraryAugmentations.single)}');
}
}
}
}
- if (mergedAugmentations.isNotEmpty) {
- if (member.enclosingClass != null) {
- sb.write('\naugment class ${member.enclosingClass!.name} {');
- }
- for (DeclarationCode augmentation in mergedAugmentations) {
- sb.write('\n${codeToString(augmentation)}');
- }
- if (member.enclosingClass != null) {
- sb.write('\n}');
- }
+ if (definitionsSources.isNotEmpty) {
+ sb.write('definitions:');
+ sb.write(definitionsSources);
}
if (sb.isNotEmpty) {
Id id = computeMemberId(member);
MemberBuilder memberBuilder =
lookupMemberBuilder(testResultData.compilerResult, member)!;
registry.registerValue(memberBuilder.fileUri!, memberBuilder.charOffset,
- id, sb.toString(), member);
+ id, '\n$sb', member);
}
}
}
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index 9dbe0f7..ba8d1d7 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -751,6 +751,7 @@
linebreak
linter
linux
+listenable
listening
lives
ll
diff --git a/pkg/frontend_server/lib/frontend_server.dart b/pkg/frontend_server/lib/frontend_server.dart
index b2489b6..8bd5bbb 100644
--- a/pkg/frontend_server/lib/frontend_server.dart
+++ b/pkg/frontend_server/lib/frontend_server.dart
@@ -58,7 +58,7 @@
'supported when --aot and --minimal-kernel are not used.',
defaultsTo: null)
..addFlag('compact-async',
- help: 'Enable new compact async/await implementation.', defaultsTo: null)
+ help: 'Enable new compact async/await implementation.', defaultsTo: true)
..addFlag('tfa',
help:
'Enable global type flow analysis and related transformations in AOT mode.',
@@ -541,7 +541,7 @@
nullSafety: compilerOptions.nnbdMode == NnbdMode.Strong,
supportMirrors: options['support-mirrors'] ??
!(options['aot'] || options['minimal-kernel']),
- compactAsync: options['compact-async'] ?? options['aot'],
+ compactAsync: options['compact-async'],
);
if (compilerOptions.target == null) {
print('Failed to create front-end target ${options['target']}.');
diff --git a/pkg/kernel/lib/class_hierarchy.dart b/pkg/kernel/lib/class_hierarchy.dart
index 440da58..8f461ac 100644
--- a/pkg/kernel/lib/class_hierarchy.dart
+++ b/pkg/kernel/lib/class_hierarchy.dart
@@ -27,6 +27,10 @@
abstract class ClassHierarchyBase {
CoreTypes get coreTypes;
+ /// Returns the instantiation of [superclass] that is implemented by [class_],
+ /// or `null` if [class_] does not implement [superclass] at all.
+ Supertype? getClassAsInstanceOf(Class class_, Class superclass);
+
/// Returns the instantiation of [superclass] that is implemented by [type],
/// or `null` if [type] does not implement [superclass] at all.
InterfaceType? getTypeAsInstanceOf(
@@ -102,10 +106,6 @@
// interfaces).
List<Supertype> genericSupertypesOf(Class class_);
- /// Returns the instantiation of [superclass] that is implemented by [class_],
- /// or `null` if [class_] does not implement [superclass] at all.
- Supertype? getClassAsInstanceOf(Class class_, Class superclass);
-
/// Returns the instantiation of [superclass] that is implemented by [type],
/// or `null` if [type] does not implement [superclass]. [superclass] must
/// be a generic class.
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index 3525eab..707efa0 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -22,7 +22,7 @@
{this.trackWidgetCreation = false,
this.enableNullSafety = false,
this.supportMirrors = true,
- this.compactAsync = false});
+ this.compactAsync = true});
@override
bool operator ==(other) {
@@ -786,8 +786,7 @@
this.unsupportedDartLibraries: const {}})
: super(
trackWidgetCreation: trackWidgetCreation,
- enableNullSafety: enableNullSafety,
- compactAsync: true);
+ enableNullSafety: enableNullSafety);
}
mixin TestTargetMixin on Target {
diff --git a/pkg/vm/lib/kernel_front_end.dart b/pkg/vm/lib/kernel_front_end.dart
index 22c471fb..03ffe27 100644
--- a/pkg/vm/lib/kernel_front_end.dart
+++ b/pkg/vm/lib/kernel_front_end.dart
@@ -81,7 +81,7 @@
'supported when --aot and --minimal-kernel are not used.',
defaultsTo: null);
args.addFlag('compact-async',
- help: 'Enable new compact async/await implementation.', defaultsTo: null);
+ help: 'Enable new compact async/await implementation.', defaultsTo: true);
args.addOption('depfile', help: 'Path to output Ninja depfile');
args.addOption('from-dill',
help: 'Read existing dill file instead of compiling from sources',
@@ -202,7 +202,7 @@
final String? manifestFilename = options['manifest'];
final String? dataDir = options['component-name'] ?? options['data-dir'];
final bool? supportMirrors = options['support-mirrors'];
- final bool compactAsync = options['compact-async'] ?? aot;
+ final bool compactAsync = options['compact-async'];
final bool minimalKernel = options['minimal-kernel'];
final bool treeShakeWriteOnlyFields = options['tree-shake-write-only-fields'];
@@ -617,7 +617,7 @@
{bool trackWidgetCreation = false,
bool nullSafety = false,
bool supportMirrors = true,
- bool compactAsync = false}) {
+ bool compactAsync = true}) {
// Make sure VM-specific targets are available.
installAdditionalTargets();
diff --git a/pkg/vm/lib/transformations/ffi/definitions.dart b/pkg/vm/lib/transformations/ffi/definitions.dart
index b5d095e..db61bcb 100644
--- a/pkg/vm/lib/transformations/ffi/definitions.dart
+++ b/pkg/vm/lib/transformations/ffi/definitions.dart
@@ -17,7 +17,6 @@
templateFfiTypeMismatch,
templateFfiFieldInitializer,
templateFfiPackedAnnotation,
- templateFfiPackedNestingNonPacked,
templateFfiSizeAnnotation,
templateFfiSizeAnnotationDimensions,
templateFfiStructGeneric;
@@ -440,10 +439,7 @@
// This class is invalid, but continue reporting other errors on it.
success = false;
}
- if (isCompoundSubtype(type)) {
- final clazz = (type as InterfaceType).classNode;
- _checkPacking(node, packing, clazz, f);
- } else if (isArrayType(type)) {
+ if (isArrayType(type)) {
final sizeAnnotations = _getArraySizeAnnotations(f);
if (sizeAnnotations.length == 1) {
final singleElementType = arraySingleElementType(type);
@@ -453,10 +449,6 @@
// An error on the type will already have been reported.
success = false;
} else {
- if (isCompoundSubtype(singleElementType)) {
- final clazz = singleElementType.classNode;
- _checkPacking(node, packing, clazz, f);
- }
final dimensions = sizeAnnotations.single;
if (arrayDimensions(type) != dimensions.length) {
diagnosticReporter.report(
@@ -515,35 +507,6 @@
return success;
}
- void _checkPacking(Class outerClass, int? outerClassPacking, Class fieldClass,
- Member errorNode) {
- if (outerClassPacking == null) {
- // Outer struct has no packing, nesting anything is fine.
- return;
- }
-
- final fieldPackingAnnotations = _getPackedAnnotations(fieldClass);
- bool error = false;
- if (fieldPackingAnnotations.isEmpty) {
- // Outer struct has packing but inner one doesn't.
- error = true;
- } else {
- final fieldPacking = fieldPackingAnnotations.first;
- if (fieldPacking > outerClassPacking) {
- // Outer struct has stricter packing than the inner.
- error = true;
- }
- }
- if (error) {
- diagnosticReporter.report(
- templateFfiPackedNestingNonPacked.withArguments(
- fieldClass.name, outerClass.name),
- errorNode.fileOffset,
- errorNode.name.text.length,
- errorNode.fileUri);
- }
- }
-
void _checkConstructors(Class node, IndexedClass? indexedClass) {
final toRemove = <Initializer>[];
diff --git a/pkg/vm/testcases/transformations/deferred_loading/main.dart.expect b/pkg/vm/testcases/transformations/deferred_loading/main.dart.expect
index ec6468f..e0c0bdd 100644
--- a/pkg/vm/testcases/transformations/deferred_loading/main.dart.expect
+++ b/pkg/vm/testcases/transformations/deferred_loading/main.dart.expect
@@ -45,62 +45,16 @@
import "#pkg/vm/testcases/transformations/deferred_loading/a.dart" as a;
- static method j() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final dart.async::_Future<dynamic> :async_future = new dart.async::_Future::•<dynamic>();
- dart.core::bool* :is_sync = false;
- dynamic :return_value;
- (dynamic) → dynamic :async_op_then;
- (dart.core::Object, dart.core::StackTrace) → dynamic :async_op_error;
- dart.core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L1:
- {
- dart.core::print("J");
- }
- dart.async::_completeWithNoFutureOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, dart.core::StackTrace stack_trace) {
- dart.async::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
- :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ static method j() → dynamic async /* futureValueType= dynamic */ {
+ dart.core::print("J");
}
}
library h from "#pkg/vm/testcases/transformations/deferred_loading/h.dart" as h {
import "#pkg/vm/testcases/transformations/deferred_loading/g.dart" as g;
- static method h() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final dart.async::_Future<dynamic> :async_future = new dart.async::_Future::•<dynamic>();
- dart.core::bool* :is_sync = false;
- dynamic :return_value;
- (dynamic) → dynamic :async_op_then;
- (dart.core::Object, dart.core::StackTrace) → dynamic :async_op_error;
- dart.core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L2:
- {
- dart.core::print("H");
- }
- dart.async::_completeWithNoFutureOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, dart.core::StackTrace stack_trace) {
- dart.async::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
- :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ static method h() → dynamic async /* futureValueType= dynamic */ {
+ dart.core::print("H");
}
}
library i from "#pkg/vm/testcases/transformations/deferred_loading/i.dart" as i {
@@ -108,67 +62,18 @@
import "#pkg/vm/testcases/transformations/deferred_loading/j.dart" deferred as j;
import "#pkg/vm/testcases/transformations/deferred_loading/b.dart" as b;
- static method i() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final dart.async::_Future<dynamic> :async_future = new dart.async::_Future::•<dynamic>();
- dart.core::bool* :is_sync = false;
- FutureOr<dynamic>? :return_value;
- (dynamic) → dynamic :async_op_then;
- (dart.core::Object, dart.core::StackTrace) → dynamic :async_op_error;
- dart.core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L3:
- {
- dart.core::print("I");
- [yield] let dynamic #t1 = dart.async::_awaitHelper(LoadLibrary(j), :async_op_then, :async_op_error) in null;
- :result_or_exception;
- :return_value = let final dynamic #t2 = CheckLibraryIsLoaded(j) in j::j();
- break #L3;
- }
- dart.async::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, dart.core::StackTrace stack_trace) {
- dart.async::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
- :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ static method i() → dynamic async /* futureValueType= dynamic */ {
+ dart.core::print("I");
+ await LoadLibrary(j);
+ return let final dynamic #t1 = CheckLibraryIsLoaded(j) in j::j();
}
}
library g from "#pkg/vm/testcases/transformations/deferred_loading/g.dart" as g {
import "#pkg/vm/testcases/transformations/deferred_loading/h.dart" as h;
- static method g() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final dart.async::_Future<dynamic> :async_future = new dart.async::_Future::•<dynamic>();
- dart.core::bool* :is_sync = false;
- dynamic :return_value;
- (dynamic) → dynamic :async_op_then;
- (dart.core::Object, dart.core::StackTrace) → dynamic :async_op_error;
- dart.core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L4:
- {
- dart.core::print("G");
- }
- dart.async::_completeWithNoFutureOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, dart.core::StackTrace stack_trace) {
- dart.async::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
- :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ static method g() → dynamic async /* futureValueType= dynamic */ {
+ dart.core::print("G");
}
}
library f from "#pkg/vm/testcases/transformations/deferred_loading/f.dart" as f {
@@ -176,76 +81,22 @@
import "#pkg/vm/testcases/transformations/deferred_loading/g.dart" deferred as g;
import "#pkg/vm/testcases/transformations/deferred_loading/i.dart" deferred as i;
- static method f() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final dart.async::_Future<dynamic> :async_future = new dart.async::_Future::•<dynamic>();
- dart.core::bool* :is_sync = false;
- FutureOr<dynamic>? :return_value;
- (dynamic) → dynamic :async_op_then;
- (dart.core::Object, dart.core::StackTrace) → dynamic :async_op_error;
- dart.core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L5:
- {
- dart.core::print("F");
- [yield] let dynamic #t3 = dart.async::_awaitHelper(LoadLibrary(g), :async_op_then, :async_op_error) in null;
- :result_or_exception;
- :return_value = let final dynamic #t4 = CheckLibraryIsLoaded(g) in g::g();
- break #L5;
- [yield] let dynamic #t5 = dart.async::_awaitHelper(LoadLibrary(i), :async_op_then, :async_op_error) in null;
- :result_or_exception;
- :return_value = let final dynamic #t6 = CheckLibraryIsLoaded(i) in i::i();
- break #L5;
- }
- dart.async::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, dart.core::StackTrace stack_trace) {
- dart.async::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
- :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ static method f() → dynamic async /* futureValueType= dynamic */ {
+ dart.core::print("F");
+ await LoadLibrary(g);
+ return let final dynamic #t2 = CheckLibraryIsLoaded(g) in g::g();
+ await LoadLibrary(i);
+ return let final dynamic #t3 = CheckLibraryIsLoaded(i) in i::i();
}
}
library e from "#pkg/vm/testcases/transformations/deferred_loading/e.dart" as e {
import "#pkg/vm/testcases/transformations/deferred_loading/g.dart" deferred as g;
- static method e() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final dart.async::_Future<dynamic> :async_future = new dart.async::_Future::•<dynamic>();
- dart.core::bool* :is_sync = false;
- FutureOr<dynamic>? :return_value;
- (dynamic) → dynamic :async_op_then;
- (dart.core::Object, dart.core::StackTrace) → dynamic :async_op_error;
- dart.core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L6:
- {
- dart.core::print("E");
- [yield] let dynamic #t7 = dart.async::_awaitHelper(LoadLibrary(g), :async_op_then, :async_op_error) in null;
- :result_or_exception;
- :return_value = let final dynamic #t8 = CheckLibraryIsLoaded(g) in g::g();
- break #L6;
- }
- dart.async::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, dart.core::StackTrace stack_trace) {
- dart.async::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
- :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ static method e() → dynamic async /* futureValueType= dynamic */ {
+ dart.core::print("E");
+ await LoadLibrary(g);
+ return let final dynamic #t4 = CheckLibraryIsLoaded(g) in g::g();
}
}
library c from "#pkg/vm/testcases/transformations/deferred_loading/c.dart" as c {
@@ -253,138 +104,38 @@
import "#pkg/vm/testcases/transformations/deferred_loading/b.dart" as b;
import "#pkg/vm/testcases/transformations/deferred_loading/f.dart" deferred as f;
- static method c() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final dart.async::_Future<dynamic> :async_future = new dart.async::_Future::•<dynamic>();
- dart.core::bool* :is_sync = false;
- FutureOr<dynamic>? :return_value;
- (dynamic) → dynamic :async_op_then;
- (dart.core::Object, dart.core::StackTrace) → dynamic :async_op_error;
- dart.core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L7:
- {
- dart.core::print("C");
- [yield] let dynamic #t9 = dart.async::_awaitHelper(LoadLibrary(f), :async_op_then, :async_op_error) in null;
- :result_or_exception;
- :return_value = let final dynamic #t10 = CheckLibraryIsLoaded(f) in f::f();
- break #L7;
- }
- dart.async::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, dart.core::StackTrace stack_trace) {
- dart.async::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
- :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ static method c() → dynamic async /* futureValueType= dynamic */ {
+ dart.core::print("C");
+ await LoadLibrary(f);
+ return let final dynamic #t5 = CheckLibraryIsLoaded(f) in f::f();
}
}
library d from "#pkg/vm/testcases/transformations/deferred_loading/d.dart" as d {
import "#pkg/vm/testcases/transformations/deferred_loading/e.dart" as e;
- static method d() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final dart.async::_Future<dynamic> :async_future = new dart.async::_Future::•<dynamic>();
- dart.core::bool* :is_sync = false;
- FutureOr<dynamic>? :return_value;
- (dynamic) → dynamic :async_op_then;
- (dart.core::Object, dart.core::StackTrace) → dynamic :async_op_error;
- dart.core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L8:
- {
- dart.core::print("D");
- :return_value = e::e();
- break #L8;
- }
- dart.async::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, dart.core::StackTrace stack_trace) {
- dart.async::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
- :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ static method d() → dynamic async /* futureValueType= dynamic */ {
+ dart.core::print("D");
+ return e::e();
}
}
library b from "#pkg/vm/testcases/transformations/deferred_loading/b.dart" as b {
import "#pkg/vm/testcases/transformations/deferred_loading/c.dart" as c;
- static method b() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final dart.async::_Future<dynamic> :async_future = new dart.async::_Future::•<dynamic>();
- dart.core::bool* :is_sync = false;
- FutureOr<dynamic>? :return_value;
- (dynamic) → dynamic :async_op_then;
- (dart.core::Object, dart.core::StackTrace) → dynamic :async_op_error;
- dart.core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L9:
- {
- dart.core::print("B");
- :return_value = c::c();
- break #L9;
- }
- dart.async::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, dart.core::StackTrace stack_trace) {
- dart.async::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
- :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ static method b() → dynamic async /* futureValueType= dynamic */ {
+ dart.core::print("B");
+ return c::c();
}
}
library a from "#pkg/vm/testcases/transformations/deferred_loading/a.dart" as a {
import "#pkg/vm/testcases/transformations/deferred_loading/d.dart" deferred as d;
- static method a() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final dart.async::_Future<dynamic> :async_future = new dart.async::_Future::•<dynamic>();
- dart.core::bool* :is_sync = false;
- FutureOr<dynamic>? :return_value;
- (dynamic) → dynamic :async_op_then;
- (dart.core::Object, dart.core::StackTrace) → dynamic :async_op_error;
- dart.core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L10:
- {
- dart.core::print("A");
- [yield] let dynamic #t11 = dart.async::_awaitHelper(LoadLibrary(d), :async_op_then, :async_op_error) in null;
- :result_or_exception;
- :return_value = let final dynamic #t12 = CheckLibraryIsLoaded(d) in d::d();
- break #L10;
- }
- dart.async::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, dart.core::StackTrace stack_trace) {
- dart.async::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
- :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ static method a() → dynamic async /* futureValueType= dynamic */ {
+ dart.core::print("A");
+ await LoadLibrary(d);
+ return let final dynamic #t6 = CheckLibraryIsLoaded(d) in d::d();
}
}
library #lib from "#lib" as #lib {
@@ -392,34 +143,8 @@
import "#pkg/vm/testcases/transformations/deferred_loading/a.dart";
import "#pkg/vm/testcases/transformations/deferred_loading/b.dart";
- static method main() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final dart.async::_Future<dynamic> :async_future = new dart.async::_Future::•<dynamic>();
- dart.core::bool* :is_sync = false;
- dynamic :return_value;
- (dynamic) → dynamic :async_op_then;
- (dart.core::Object, dart.core::StackTrace) → dynamic :async_op_error;
- dart.core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L11:
- {
- [yield] let dynamic #t13 = dart.async::_awaitHelper(a::a(), :async_op_then, :async_op_error) in null;
- :result_or_exception;
- [yield] let dynamic #t14 = dart.async::_awaitHelper(b::b(), :async_op_then, :async_op_error) in null;
- :result_or_exception;
- }
- dart.async::_completeWithNoFutureOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, dart.core::StackTrace stack_trace) {
- dart.async::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
- :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ static method main() → dynamic async /* futureValueType= dynamic */ {
+ await a::a();
+ await b::b();
}
}
diff --git a/pkg/vm/testcases/transformations/ffi/finalizable_async.dart.expect b/pkg/vm/testcases/transformations/ffi/finalizable_async.dart.expect
index 2adb29e..2039db0 100644
--- a/pkg/vm/testcases/transformations/ffi/finalizable_async.dart.expect
+++ b/pkg/vm/testcases/transformations/ffi/finalizable_async.dart.expect
@@ -11,70 +11,20 @@
synthetic constructor •() → self::MyFinalizable
: super core::Object::•()
;
- method use() → asy::Future<core::int> /* futureValueType= core::int */ /* originally async */ {
- final asy::_Future<core::int> :async_future = new asy::_Future::•<core::int>();
- core::bool* :is_sync = false;
- FutureOr<core::int>? :return_value;
- (dynamic) → dynamic :async_op_then;
- (core::Object, core::StackTrace) → dynamic :async_op_error;
- core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L1:
- {
- :return_value = block {
- final asy::Future<core::int> :expressionValueWrappedFinalizable = self::doSomething();
- _in::reachabilityFence(this);
- } =>:expressionValueWrappedFinalizable;
- break #L1;
- }
- asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
- asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ method use() → asy::Future<core::int> async /* futureValueType= core::int */ {
+ return block {
+ final asy::Future<core::int> :expressionValueWrappedFinalizable = self::doSomething();
+ _in::reachabilityFence(this);
+ } =>:expressionValueWrappedFinalizable;
}
- method use2() → asy::Future<core::int> /* futureValueType= core::int */ /* originally async */ {
- final asy::_Future<core::int> :async_future = new asy::_Future::•<core::int>();
- core::bool* :is_sync = false;
- core::int? :return_value;
- (dynamic) → dynamic :async_op_then;
- (core::Object, core::StackTrace) → dynamic :async_op_error;
- core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L2:
- {
- [yield] let dynamic #t1 = asy::_awaitHelper( block {
- final asy::Future<core::int> :expressionValueWrappedFinalizable = self::doSomething();
- _in::reachabilityFence(this);
- } =>:expressionValueWrappedFinalizable, :async_op_then, :async_op_error) in null;
- final core::int :expressionValueWrappedFinalizable = _in::unsafeCast<core::int>(:result_or_exception);
- :return_value = block {
- _in::reachabilityFence(this);
- } =>:expressionValueWrappedFinalizable;
- break #L2;
- }
- asy::_completeWithNoFutureOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
- asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ method use2() → asy::Future<core::int> async /* futureValueType= core::int */ {
+ return block {
+ final core::int :expressionValueWrappedFinalizable = await block {
+ final asy::Future<core::int> :expressionValueWrappedFinalizable = self::doSomething();
+ _in::reachabilityFence(this);
+ } =>:expressionValueWrappedFinalizable;
+ _in::reachabilityFence(this);
+ } =>:expressionValueWrappedFinalizable;
}
method use3() → asy::Future<core::int> {
return block {
@@ -83,117 +33,39 @@
} =>:expressionValueWrappedFinalizable;
}
}
-static method doSomething() → asy::Future<core::int> /* futureValueType= core::int */ /* originally async */ {
- final asy::_Future<core::int> :async_future = new asy::_Future::•<core::int>();
- core::bool* :is_sync = false;
- core::int? :return_value;
- (dynamic) → dynamic :async_op_then;
- (core::Object, core::StackTrace) → dynamic :async_op_error;
- core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L3:
- {
- :return_value = 3;
- break #L3;
- }
- asy::_completeWithNoFutureOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
- asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+static method doSomething() → asy::Future<core::int> async /* futureValueType= core::int */
+ return 3;
+static method useFinalizableAsync(ffi::Finalizable finalizable) → asy::Future<core::int> async /* futureValueType= core::int */ {
+ await block {
+ final asy::Future<core::int> :expressionValueWrappedFinalizable = asy::Future::sync<core::int>(() → core::int => 6);
+ _in::reachabilityFence(finalizable);
+ } =>:expressionValueWrappedFinalizable;
+ final self::MyFinalizable finalizable2 = new self::MyFinalizable::•();
+ await block {
+ final asy::Future<core::int> :expressionValueWrappedFinalizable = asy::Future::sync<core::int>(() → core::int => 5);
+ _in::reachabilityFence(finalizable);
+ _in::reachabilityFence(finalizable2);
+ } =>:expressionValueWrappedFinalizable;
+ final self::MyFinalizable finalizable3 = new self::MyFinalizable::•();
+ await block {
+ final asy::Future<core::int> :expressionValueWrappedFinalizable = asy::Future::sync<core::int>(() → core::int => 4);
+ _in::reachabilityFence(finalizable);
+ _in::reachabilityFence(finalizable2);
+ _in::reachabilityFence(finalizable3);
+ } =>:expressionValueWrappedFinalizable;
+ return block {
+ final asy::Future<core::int> :expressionValueWrappedFinalizable = self::doSomething();
+ _in::reachabilityFence(finalizable);
+ _in::reachabilityFence(finalizable2);
+ _in::reachabilityFence(finalizable3);
+ } =>:expressionValueWrappedFinalizable;
}
-static method useFinalizableAsync(ffi::Finalizable finalizable) → asy::Future<core::int> /* futureValueType= core::int */ /* originally async */ {
- final asy::_Future<core::int> :async_future = new asy::_Future::•<core::int>();
- core::bool* :is_sync = false;
- FutureOr<core::int>? :return_value;
- (dynamic) → dynamic :async_op_then;
- (core::Object, core::StackTrace) → dynamic :async_op_error;
- core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L4:
- {
- [yield] let dynamic #t2 = asy::_awaitHelper( block {
- final asy::Future<core::int> :expressionValueWrappedFinalizable = asy::Future::sync<core::int>(() → core::int => 6);
- _in::reachabilityFence(finalizable);
- } =>:expressionValueWrappedFinalizable, :async_op_then, :async_op_error) in null;
- _in::unsafeCast<core::int>(:result_or_exception);
- final self::MyFinalizable finalizable2 = new self::MyFinalizable::•();
- [yield] let dynamic #t3 = asy::_awaitHelper( block {
- final asy::Future<core::int> :expressionValueWrappedFinalizable = asy::Future::sync<core::int>(() → core::int => 5);
- _in::reachabilityFence(finalizable);
- _in::reachabilityFence(finalizable2);
- } =>:expressionValueWrappedFinalizable, :async_op_then, :async_op_error) in null;
- _in::unsafeCast<core::int>(:result_or_exception);
- final self::MyFinalizable finalizable3 = new self::MyFinalizable::•();
- [yield] let dynamic #t4 = asy::_awaitHelper( block {
- final asy::Future<core::int> :expressionValueWrappedFinalizable = asy::Future::sync<core::int>(() → core::int => 4);
- _in::reachabilityFence(finalizable);
- _in::reachabilityFence(finalizable2);
- _in::reachabilityFence(finalizable3);
- } =>:expressionValueWrappedFinalizable, :async_op_then, :async_op_error) in null;
- _in::unsafeCast<core::int>(:result_or_exception);
- :return_value = block {
- final asy::Future<core::int> :expressionValueWrappedFinalizable = self::doSomething();
- _in::reachabilityFence(finalizable);
- _in::reachabilityFence(finalizable2);
- _in::reachabilityFence(finalizable3);
- } =>:expressionValueWrappedFinalizable;
- break #L4;
- }
- asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
- asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
-}
-static method main() → void /* futureValueType= void */ /* originally async */ {
- final asy::_Future<dynamic> :async_future = new asy::_Future::•<dynamic>();
- core::bool* :is_sync = false;
- dynamic :return_value;
- (dynamic) → dynamic :async_op_then;
- (core::Object, core::StackTrace) → dynamic :async_op_error;
- core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L5:
- {
- final self::MyFinalizable finalizable = new self::MyFinalizable::•();
- final asy::Future<core::int> asyncResult = self::useFinalizableAsync(finalizable);
- [yield] let dynamic #t5 = asy::_awaitHelper( block {
- final asy::Future<core::int> :expressionValueWrappedFinalizable = asyncResult;
- _in::reachabilityFence(finalizable);
- } =>:expressionValueWrappedFinalizable, :async_op_then, :async_op_error) in null;
- core::print(_in::unsafeCast<core::int>(:result_or_exception));
- _in::reachabilityFence(finalizable);
- }
- asy::_completeWithNoFutureOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
- asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+static method main() → void async /* futureValueType= void */ {
+ final self::MyFinalizable finalizable = new self::MyFinalizable::•();
+ final asy::Future<core::int> asyncResult = self::useFinalizableAsync(finalizable);
+ core::print(await block {
+ final asy::Future<core::int> :expressionValueWrappedFinalizable = asyncResult;
+ _in::reachabilityFence(finalizable);
+ } =>:expressionValueWrappedFinalizable);
+ _in::reachabilityFence(finalizable);
}
diff --git a/pkg/vm/testcases/transformations/ffi/finalizable_async_star.dart.expect b/pkg/vm/testcases/transformations/ffi/finalizable_async_star.dart.expect
index 74e5fe6..e3d7376 100644
--- a/pkg/vm/testcases/transformations/ffi/finalizable_async_star.dart.expect
+++ b/pkg/vm/testcases/transformations/ffi/finalizable_async_star.dart.expect
@@ -14,128 +14,58 @@
}
static method doSomething() → core::int
return 3;
-static method useFinalizableAsyncStar(ffi::Finalizable finalizable) → asy::Stream<core::int> /* originally async* */ {
- asy::_AsyncStarStreamController<core::int>? :controller;
- dynamic :controller_stream;
- (dynamic) → dynamic :async_op_then;
- (core::Object, core::StackTrace) → dynamic :async_op_error;
- core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- dynamic :saved_try_context_var1;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try
- try {
- #L1:
- {
- final self::MyFinalizable finalizable2 = new self::MyFinalizable::•();
- if([@vm.call-site-attributes.metadata=receiverType:dart.async::_AsyncStarStreamController<dart.core::int>?] :controller.{asy::_AsyncStarStreamController::add}( block {
- final core::int :expressionValueWrappedFinalizable = self::doSomething();
- _in::reachabilityFence(finalizable);
- _in::reachabilityFence(finalizable2);
- } =>:expressionValueWrappedFinalizable){(core::int) → core::bool})
- return null;
- else
- [yield] null;
- final self::MyFinalizable finalizable3 = new self::MyFinalizable::•();
- [yield] let dynamic #t1 = asy::_awaitHelper( block {
- final asy::Future<core::int> :expressionValueWrappedFinalizable = asy::Future::sync<core::int>(() → core::int => 3);
- _in::reachabilityFence(finalizable);
- _in::reachabilityFence(finalizable2);
- _in::reachabilityFence(finalizable3);
- } =>:expressionValueWrappedFinalizable, :async_op_then, :async_op_error) in null;
- _in::unsafeCast<core::int>(:result_or_exception);
- final self::MyFinalizable finalizable4 = new self::MyFinalizable::•();
- if(new core::DateTime::now().{core::DateTime::millisecondsSinceEpoch}{core::int} =={core::num::==}{(core::Object) → core::bool} 4) {
- {
- _in::reachabilityFence(finalizable);
- _in::reachabilityFence(finalizable2);
- _in::reachabilityFence(finalizable3);
- _in::reachabilityFence(finalizable4);
- break #L1;
- }
- }
- if([@vm.call-site-attributes.metadata=receiverType:dart.async::_AsyncStarStreamController<dart.core::int>?] :controller.{asy::_AsyncStarStreamController::add}( block {
- final core::int :expressionValueWrappedFinalizable = 5;
- _in::reachabilityFence(finalizable);
- _in::reachabilityFence(finalizable2);
- _in::reachabilityFence(finalizable3);
- _in::reachabilityFence(finalizable4);
- } =>:expressionValueWrappedFinalizable){(core::int) → core::bool})
- return null;
- else
- [yield] null;
- _in::reachabilityFence(finalizable2);
- _in::reachabilityFence(finalizable3);
- _in::reachabilityFence(finalizable4);
- _in::reachabilityFence(finalizable);
- }
- return;
- }
- on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
- :controller.{asy::_AsyncStarStreamController::addError}(exception, stack_trace){(core::Object, core::StackTrace) → void};
- }
- finally {
- :controller.{asy::_AsyncStarStreamController::close}(){() → dynamic};
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- :controller = new asy::_AsyncStarStreamController::•<core::int>(:async_op);
- :controller_stream = :controller.{asy::_AsyncStarStreamController::stream}{asy::Stream<core::int>};
- return :controller_stream;
-}
-static method main() → void /* futureValueType= void */ /* originally async */ {
- final asy::_Future<dynamic> :async_future = new asy::_Future::•<dynamic>();
- core::bool* :is_sync = false;
- dynamic :return_value;
- (dynamic) → dynamic :async_op_then;
- (core::Object, core::StackTrace) → dynamic :async_op_error;
- core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- dynamic :saved_try_context_var1;
- dynamic :exception0;
- dynamic :stack_trace0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L2:
- {
- final self::MyFinalizable finalizable = new self::MyFinalizable::•();
- final asy::Stream<core::int> asyncStarResult = self::useFinalizableAsyncStar(finalizable);
- {
- asy::Stream<core::int> :stream = asyncStarResult;
- asy::_StreamIterator<core::int>? :for-iterator = new asy::_StreamIterator::•<core::int>(:stream);
- try
- #L3:
- while (true) {
- dynamic #t2 = asy::_asyncStarMoveNextHelper(:stream);
- [yield] let dynamic #t3 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(){() → asy::Future<core::bool>}, :async_op_then, :async_op_error) in null;
- if(_in::unsafeCast<core::bool>(:result_or_exception)) {
- final core::int element = :for-iterator.{asy::_StreamIterator::current}{core::int};
- {
- core::print(element);
- }
- }
- else
- break #L3;
- }
- finally
- if(!(:for-iterator.{asy::_StreamIterator::_subscription}{asy::StreamSubscription<core::int>?} == null)) {
- [yield] let dynamic #t4 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(){() → asy::Future<dynamic>}, :async_op_then, :async_op_error) in null;
- :result_or_exception;
- }
- }
- _in::reachabilityFence(finalizable);
- }
- asy::_completeWithNoFutureOnAsyncReturn(:async_future, :return_value, :is_sync);
+static method useFinalizableAsyncStar(ffi::Finalizable finalizable) → asy::Stream<core::int> async* {
+ final self::MyFinalizable finalizable2 = new self::MyFinalizable::•();
+ yield block {
+ final core::int :expressionValueWrappedFinalizable = self::doSomething();
+ _in::reachabilityFence(finalizable);
+ _in::reachabilityFence(finalizable2);
+ } =>:expressionValueWrappedFinalizable;
+ final self::MyFinalizable finalizable3 = new self::MyFinalizable::•();
+ await block {
+ final asy::Future<core::int> :expressionValueWrappedFinalizable = asy::Future::sync<core::int>(() → core::int => 3);
+ _in::reachabilityFence(finalizable);
+ _in::reachabilityFence(finalizable2);
+ _in::reachabilityFence(finalizable3);
+ } =>:expressionValueWrappedFinalizable;
+ final self::MyFinalizable finalizable4 = new self::MyFinalizable::•();
+ if(new core::DateTime::now().{core::DateTime::millisecondsSinceEpoch}{core::int} =={core::num::==}{(core::Object) → core::bool} 4) {
+ {
+ _in::reachabilityFence(finalizable);
+ _in::reachabilityFence(finalizable2);
+ _in::reachabilityFence(finalizable3);
+ _in::reachabilityFence(finalizable4);
return;
}
- on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
- asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+ }
+ yield block {
+ final core::int :expressionValueWrappedFinalizable = 5;
+ _in::reachabilityFence(finalizable);
+ _in::reachabilityFence(finalizable2);
+ _in::reachabilityFence(finalizable3);
+ _in::reachabilityFence(finalizable4);
+ } =>:expressionValueWrappedFinalizable;
+ _in::reachabilityFence(finalizable2);
+ _in::reachabilityFence(finalizable3);
+ _in::reachabilityFence(finalizable4);
+ _in::reachabilityFence(finalizable);
+}
+static method main() → void async /* futureValueType= void */ {
+ final self::MyFinalizable finalizable = new self::MyFinalizable::•();
+ final asy::Stream<core::int> asyncStarResult = self::useFinalizableAsyncStar(finalizable);
+ {
+ asy::Stream<core::int> :stream = asyncStarResult;
+ asy::_StreamIterator<core::int>? :for-iterator = new asy::_StreamIterator::•<core::int>(:stream);
+ try
+ while (let dynamic #t1 = asy::_asyncStarMoveNextHelper(:stream) in await :for-iterator.{asy::_StreamIterator::moveNext}(){() → asy::Future<core::bool>}) {
+ final core::int element = :for-iterator.{asy::_StreamIterator::current}{core::int};
+ {
+ core::print(element);
+ }
+ }
+ finally
+ if(!(:for-iterator.{asy::_StreamIterator::_subscription}{asy::StreamSubscription<core::int>?} == null))
+ await :for-iterator.{asy::_StreamIterator::cancel}(){() → asy::Future<dynamic>};
+ }
+ _in::reachabilityFence(finalizable);
}
diff --git a/pkg/vm/testcases/transformations/ffi/regress_49075.dart.expect b/pkg/vm/testcases/transformations/ffi/regress_49075.dart.expect
index 2974867..fb88d53 100644
--- a/pkg/vm/testcases/transformations/ffi/regress_49075.dart.expect
+++ b/pkg/vm/testcases/transformations/ffi/regress_49075.dart.expect
@@ -14,32 +14,7 @@
_in::reachabilityFence(this);
}
}
-static method main(core::List<core::String> arguments) → asy::Future<void> /* futureValueType= void */ /* originally async */ {
- final asy::_Future<void> :async_future = new asy::_Future::•<void>();
- core::bool* :is_sync = false;
- void :return_value;
- (dynamic) → dynamic :async_op_then;
- (core::Object, core::StackTrace) → dynamic :async_op_error;
- core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L1:
- {
- [yield] let dynamic #t1 = asy::_awaitHelper(new self::MyFinalizable::•(), :async_op_then, :async_op_error) in null;
- final self::MyFinalizable myFinalizable = _in::unsafeCast<self::MyFinalizable>(:result_or_exception);
- _in::reachabilityFence(myFinalizable);
- }
- asy::_completeWithNoFutureOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
- asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+static method main(core::List<core::String> arguments) → asy::Future<void> async /* futureValueType= void */ {
+ final self::MyFinalizable myFinalizable = await new self::MyFinalizable::•();
+ _in::reachabilityFence(myFinalizable);
}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/async_await.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/async_await.dart.expect
index 0d6b3b9..da9a9a2 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/async_await.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/async_await.dart.expect
@@ -7,33 +7,8 @@
synthetic constructor •() → self::A
: super core::Object::•()
;
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] method bar(dynamic x) → asy::Future<dynamic> /* futureValueType= dynamic */ /* originally async */ {
- final asy::_Future<dynamic> :async_future = new asy::_Future::•<dynamic>();
- core::bool* :is_sync = false;
- FutureOr<dynamic>? :return_value;
- (dynamic) → dynamic :async_op_then;
- (core::Object, core::StackTrace) → dynamic :async_op_error;
- core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L1:
- {
- :return_value = [@vm.inferred-type.metadata=dart.core::Null? (value: null)] core::print(x);
- break #L1;
- }
- asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
- asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
- }
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] method bar(dynamic x) → asy::Future<dynamic> async /* futureValueType= dynamic */
+ return core::print(x);
}
class B extends core::Object {
synthetic constructor •() → self::B
@@ -42,61 +17,8 @@
}
static method foo() → dynamic
return new self::A::•();
-static method baz() → asy::Future<dynamic> /* futureValueType= dynamic */ /* originally async */ {
- final asy::_Future<dynamic> :async_future = new asy::_Future::•<dynamic>();
- core::bool* :is_sync = false;
- dynamic :return_value;
- (dynamic) → dynamic :async_op_then;
- (core::Object, core::StackTrace) → dynamic :async_op_error;
- core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L2:
- {
- :return_value = new self::B::•();
- break #L2;
- }
- asy::_completeWithNoFutureOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
- asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
-}
-static method main() → dynamic /* futureValueType= dynamic */ /* originally async */ {
- final asy::_Future<dynamic> :async_future = new asy::_Future::•<dynamic>();
- core::bool* :is_sync = false;
- dynamic :return_value;
- (dynamic) → dynamic :async_op_then;
- (core::Object, core::StackTrace) → dynamic :async_op_error;
- core::int :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- dynamic :async_temporary_0;
- function :async_op(dynamic :result_or_exception, dynamic :stack_trace) → dynamic yielding
- try {
- #L3:
- {
- :async_temporary_0 = [@vm.inferred-type.metadata=#lib::A] self::foo();
- [yield] let dynamic #t1 = asy::_awaitHelper([@vm.inferred-type.metadata=dart.async::_Future<dynamic>] self::baz(), :async_op_then, :async_op_error) in null;
- [yield] let dynamic #t2 = asy::_awaitHelper([@vm.direct-call.metadata=#lib::A.bar??] [@vm.inferred-type.metadata=dart.async::_Future<dynamic> (receiver not int)] :async_temporary_0{dynamic}.bar(:result_or_exception), :async_op_then, :async_op_error) in null;
- :result_or_exception;
- }
- asy::_completeWithNoFutureOnAsyncReturn(:async_future, :return_value, :is_sync);
- return;
- }
- on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
- asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- :async_op(null, null){() → dynamic};
- :is_sync = true;
- return :async_future;
+static method baz() → asy::Future<dynamic> async /* futureValueType= dynamic */
+ return new self::B::•();
+static method main() → dynamic async /* futureValueType= dynamic */ {
+ await [@vm.direct-call.metadata=#lib::A.bar] [@vm.inferred-type.metadata=!? (receiver not int)] [@vm.inferred-type.metadata=#lib::A] self::foo(){dynamic}.bar(await self::baz());
}
diff --git a/pkg/vm_service/test/async_single_step_exception_test.dart b/pkg/vm_service/test/async_single_step_exception_test.dart
index 2e06ba7..3a093de 100644
--- a/pkg/vm_service/test/async_single_step_exception_test.dart
+++ b/pkg/vm_service/test/async_single_step_exception_test.dart
@@ -54,10 +54,6 @@
smartNext,
hasStoppedAtBreakpoint,
- stoppedAtLine(22), // } (weird dispatching)
- smartNext,
-
- hasStoppedAtBreakpoint,
stoppedAtLine(LINE_D), // await helper (weird dispatching)
smartNext,
diff --git a/pkg/vm_service/test/async_single_step_out_test.dart b/pkg/vm_service/test/async_single_step_out_test.dart
index 1db5d67..71f9517 100644
--- a/pkg/vm_service/test/async_single_step_out_test.dart
+++ b/pkg/vm_service/test/async_single_step_out_test.dart
@@ -44,14 +44,10 @@
stepInto, // exit helper via a single step.
hasStoppedAtBreakpoint,
- stoppedAtLine(20), // return null (weird dispatching)
- stepInto, // exit helper via a single step.
-
- hasStoppedAtBreakpoint,
- stoppedAtLine(25), // await helper (weird dispatching)
+ stoppedAtLine(LINE_D), // await helper
smartNext,
- hasStoppedAtBreakpoint, //19
+ hasStoppedAtBreakpoint,
stoppedAtLine(LINE_E), // arrive after the await.
resumeIsolate
];
diff --git a/pkg/vm_service/test/async_star_single_step_into_test.dart b/pkg/vm_service/test/async_star_single_step_into_test.dart
index bf5c964..be3eba7 100644
--- a/pkg/vm_service/test/async_star_single_step_into_test.dart
+++ b/pkg/vm_service/test/async_star_single_step_into_test.dart
@@ -8,12 +8,13 @@
import 'common/service_test_common.dart';
import 'common/test_helper.dart';
-const LINE_A = 19;
-const LINE_B = 20;
-const LINE_C = 24;
-const LINE_D = 28;
-const LINE_E = 34;
-const LINE_F = 35;
+const LINE_A = 20;
+const LINE_B = 21;
+const LINE_C = 25;
+const LINE_D = 29;
+const LINE_E = 35;
+const LINE_F = 36;
+const LINE_G = 27;
foobar() async* {
yield 1; // LINE_A.
@@ -23,7 +24,7 @@
helper() async {
print('helper'); // LINE_C.
// ignore: unused_local_variable
- await for (var i in foobar()) {
+ await for (var i in foobar()) /* LINE_G. */ {
debugger();
print('loop'); // LINE_D.
}
@@ -50,6 +51,11 @@
stepOver, // print.
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_G), // foobar()
+ stepInto,
+
+ hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_G), // await for
stepInto,
hasStoppedAtBreakpoint,
@@ -63,6 +69,7 @@
stepOver, // print.
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_G),
stepInto,
hasStoppedAtBreakpoint,
diff --git a/pkg/vm_service/test/async_star_step_out_test.dart b/pkg/vm_service/test/async_star_step_out_test.dart
index 14a05f9..41d387f 100644
--- a/pkg/vm_service/test/async_star_step_out_test.dart
+++ b/pkg/vm_service/test/async_star_step_out_test.dart
@@ -54,6 +54,11 @@
stepOver, // print.
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_H), // foobar().
+ stepInto,
+
+ hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_H), // await for.
stepInto,
hasStoppedAtBreakpoint,
diff --git a/pkg/vm_service/test/awaiter_async_stack_contents_2_test.dart b/pkg/vm_service/test/awaiter_async_stack_contents_2_test.dart
index 88d17d0a..5cd7443 100644
--- a/pkg/vm_service/test/awaiter_async_stack_contents_2_test.dart
+++ b/pkg/vm_service/test/awaiter_async_stack_contents_2_test.dart
@@ -49,9 +49,9 @@
List<Frame> awaiterFrames = stack.awaiterFrames!;
expect(awaiterFrames.length, greaterThanOrEqualTo(2));
// Awaiter frame.
- expect(awaiterFrames[0].function!.owner.name, 'foobar');
+ expect(awaiterFrames[0].function!.name, 'foobar');
// Awaiter frame.
- expect(awaiterFrames[1].function!.owner.name, 'helper');
+ expect(awaiterFrames[1].function!.name, 'helper');
},
];
diff --git a/pkg/vm_service/test/awaiter_async_stack_contents_test.dart b/pkg/vm_service/test/awaiter_async_stack_contents_test.dart
index 0fea350..ac8ab8c 100644
--- a/pkg/vm_service/test/awaiter_async_stack_contents_test.dart
+++ b/pkg/vm_service/test/awaiter_async_stack_contents_test.dart
@@ -56,9 +56,9 @@
expect(awaiterFrames.length, greaterThanOrEqualTo(2));
// Awaiter frame.
- expect(await awaiterFrames[0].function!.owner.name, 'foobar');
+ expect(await awaiterFrames[0].function!.name, 'foobar');
// Awaiter frame.
- expect(await awaiterFrames[1].function!.owner.name, 'helper');
+ expect(await awaiterFrames[1].function!.name, 'helper');
// "helper" is not await'ed.
},
];
diff --git a/pkg/vm_service/test/causal_async_stack_contents_test.dart b/pkg/vm_service/test/causal_async_stack_contents_test.dart
index b634f10..b28ece5 100644
--- a/pkg/vm_service/test/causal_async_stack_contents_test.dart
+++ b/pkg/vm_service/test/causal_async_stack_contents_test.dart
@@ -48,7 +48,7 @@
// Has causal frames (we are inside an async function)
expect(stack.asyncCausalFrames, isNotNull);
expect(
- stack.asyncCausalFrames![0].function!.owner.name,
+ stack.asyncCausalFrames![0].function!.name,
contains('helper'),
);
// "helper" is not await'ed.
@@ -62,7 +62,7 @@
expect(stack.asyncCausalFrames, isNotNull);
final asyncStack = stack.asyncCausalFrames!;
expect(asyncStack[0].function!.name, contains('foobar'));
- expect(asyncStack[1].function!.owner.name, contains('helper'));
+ expect(asyncStack[1].function!.name, contains('helper'));
// "helper" is not await'ed.
},
];
diff --git a/pkg/vm_service/test/causal_async_star_stack_contents_test.dart b/pkg/vm_service/test/causal_async_star_stack_contents_test.dart
index 4795850..80f0a2d 100644
--- a/pkg/vm_service/test/causal_async_star_stack_contents_test.dart
+++ b/pkg/vm_service/test/causal_async_star_stack_contents_test.dart
@@ -45,7 +45,7 @@
expect(stack.asyncCausalFrames, isNotNull);
final asyncStack = stack.asyncCausalFrames!;
expect(asyncStack.length, greaterThanOrEqualTo(1));
- expect(asyncStack[0].function!.owner.name, contains('helper'));
+ expect(asyncStack[0].function!.name, contains('helper'));
// helper isn't awaited.
},
resumeIsolate,
@@ -57,9 +57,9 @@
expect(stack.asyncCausalFrames, isNotNull);
final asyncStack = stack.asyncCausalFrames!;
expect(asyncStack.length, greaterThanOrEqualTo(3));
- expect(asyncStack[0].function!.owner.name, contains('foobar'));
+ expect(asyncStack[0].function!.name, contains('foobar'));
expect(asyncStack[1].kind, equals(FrameKind.kAsyncSuspensionMarker));
- expect(asyncStack[2].function!.owner.name, contains('helper'));
+ expect(asyncStack[2].function!.name, contains('helper'));
expect(asyncStack[3].kind, equals(FrameKind.kAsyncSuspensionMarker));
},
resumeIsolate,
@@ -73,13 +73,13 @@
expect(asyncStack.length, greaterThanOrEqualTo(4));
final script = await service.getObject(
isolateRef.id!, asyncStack[0].location!.script!.id!) as Script;
- expect(asyncStack[0].function!.owner.name, contains('foobar'));
+ expect(asyncStack[0].function!.name, contains('foobar'));
expect(
script.getLineNumberFromTokenPos(asyncStack[0].location!.tokenPos!),
LINE_C,
);
expect(asyncStack[1].kind, equals(FrameKind.kAsyncSuspensionMarker));
- expect(asyncStack[2].function!.owner.name, contains('helper'));
+ expect(asyncStack[2].function!.name, contains('helper'));
expect(
script.getLineNumberFromTokenPos(asyncStack[2].location!.tokenPos!),
30,
diff --git a/pkg/vm_service/test/coverage_const_field_async_closure_test.dart b/pkg/vm_service/test/coverage_const_field_async_closure_test.dart
index 8a7430d..8bdb959 100644
--- a/pkg/vm_service/test/coverage_const_field_async_closure_test.dart
+++ b/pkg/vm_service/test/coverage_const_field_async_closure_test.dart
@@ -41,7 +41,7 @@
// Make sure we are in the right place.
expect(stack.frames!.length, greaterThanOrEqualTo(1));
// Async closure of testFunction
- expect(stack.frames![0].function!.name, 'async_op');
+ expect(stack.frames![0].function!.name, 'testFunction');
final rootLib =
await service.getObject(isolateId, isolate.rootLib!.id!) as Library;
diff --git a/pkg/vm_service/test/rpc_error_test.dart b/pkg/vm_service/test/rpc_error_test.dart
index 87e8776..67330c2 100644
--- a/pkg/vm_service/test/rpc_error_test.dart
+++ b/pkg/vm_service/test/rpc_error_test.dart
@@ -17,9 +17,9 @@
// Ensure stack trace contains actual invocation path.
final stack = st.toString().split('\n');
expect(stack.where((e) => e.contains('VmService.callMethod')).length, 1);
- // Call to vm.callMethod('foo') and the invocation of the test closure.
+ // Call to vm.callMethod('foo').
expect(
- stack.where((e) => e.contains('test/rpc_error_test.dart')).length, 2);
+ stack.where((e) => e.contains('test/rpc_error_test.dart')).length, 1);
} catch (e) {
fail('Expected RPCError, got $e');
}
diff --git a/pkg/vm_service/test/throws_sentinel_test.dart b/pkg/vm_service/test/throws_sentinel_test.dart
index b9242b3..bf52549 100644
--- a/pkg/vm_service/test/throws_sentinel_test.dart
+++ b/pkg/vm_service/test/throws_sentinel_test.dart
@@ -16,10 +16,10 @@
// Ensure stack trace contains actual invocation path.
final stack = st.toString().split('\n');
expect(stack.where((e) => e.contains('VmService.getIsolate')).length, 1);
- // Call to vm.getIsolate('isolates/12321') and the invocation of the test closure.
+ // Call to vm.getIsolate('isolates/12321').
expect(
stack.where((e) => e.contains('test/throws_sentinel_test.dart')).length,
- 2,
+ 1,
);
} catch (e) {
fail('Expected SentinelException, got $e');
diff --git a/runtime/observatory/tests/service/async_single_step_exception_test.dart b/runtime/observatory/tests/service/async_single_step_exception_test.dart
index 0fdc183..544ba6f 100644
--- a/runtime/observatory/tests/service/async_single_step_exception_test.dart
+++ b/runtime/observatory/tests/service/async_single_step_exception_test.dart
@@ -55,10 +55,6 @@
smartNext,
hasStoppedAtBreakpoint,
- stoppedAtLine(23), // } (weird dispatching)
- smartNext,
-
- hasStoppedAtBreakpoint,
stoppedAtLine(LINE_D), // await helper (weird dispatching)
smartNext,
diff --git a/runtime/observatory/tests/service/async_single_step_out_test.dart b/runtime/observatory/tests/service/async_single_step_out_test.dart
index cfeac6c..e93c274 100644
--- a/runtime/observatory/tests/service/async_single_step_out_test.dart
+++ b/runtime/observatory/tests/service/async_single_step_out_test.dart
@@ -44,11 +44,7 @@
stepInto, // exit helper via a single step.
hasStoppedAtBreakpoint,
- stoppedAtLine(20), // return null (weird dispatching)
- stepInto, // exit helper via a single step.
-
- hasStoppedAtBreakpoint,
- stoppedAtLine(25), // await helper (weird dispatching)
+ stoppedAtLine(LINE_D), // await helper
smartNext,
hasStoppedAtBreakpoint,
diff --git a/runtime/observatory/tests/service/async_star_single_step_into_test.dart b/runtime/observatory/tests/service/async_star_single_step_into_test.dart
index 0d99fd5..ac8e6ba 100644
--- a/runtime/observatory/tests/service/async_star_single_step_into_test.dart
+++ b/runtime/observatory/tests/service/async_star_single_step_into_test.dart
@@ -8,12 +8,13 @@
import 'service_test_common.dart';
import 'test_helper.dart';
-const LINE_A = 19;
-const LINE_B = 20;
-const LINE_C = 24;
-const LINE_D = 27;
-const LINE_E = 33;
-const LINE_F = 34;
+const LINE_A = 20;
+const LINE_B = 21;
+const LINE_C = 25;
+const LINE_D = 28;
+const LINE_E = 34;
+const LINE_F = 35;
+const LINE_G = 26;
foobar() async* {
yield 1; // LINE_A.
@@ -22,7 +23,7 @@
helper() async {
print('helper'); // LINE_C.
- await for (var i in foobar()) {
+ await for (var i in foobar()) /* LINE_G. */ {
debugger();
print('loop'); // LINE_D.
}
@@ -49,6 +50,11 @@
stepOver, // print.
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_G), // foobar()
+ stepInto,
+
+ hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_G), // await for
stepInto,
hasStoppedAtBreakpoint,
@@ -62,6 +68,7 @@
stepOver, // print.
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_G),
stepInto,
hasStoppedAtBreakpoint,
diff --git a/runtime/observatory/tests/service/async_star_step_out_test.dart b/runtime/observatory/tests/service/async_star_step_out_test.dart
index 95ca280..6e73174 100644
--- a/runtime/observatory/tests/service/async_star_step_out_test.dart
+++ b/runtime/observatory/tests/service/async_star_step_out_test.dart
@@ -53,6 +53,11 @@
stepOver, // print.
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_H), // foobar().
+ stepInto,
+
+ hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_H), // await for.
stepInto,
hasStoppedAtBreakpoint,
diff --git a/runtime/observatory/tests/service/coverage_const_field_async_closure_test.dart b/runtime/observatory/tests/service/coverage_const_field_async_closure_test.dart
index 957251b..d3faadb 100644
--- a/runtime/observatory/tests/service/coverage_const_field_async_closure_test.dart
+++ b/runtime/observatory/tests/service/coverage_const_field_async_closure_test.dart
@@ -36,8 +36,7 @@
// Make sure we are in the right place.
expect(stack.type, 'Stack');
expect(stack['frames'].length, greaterThanOrEqualTo(1));
- // Async closure of testFunction
- expect(stack['frames'][0].function.name, 'async_op');
+ expect(stack['frames'][0].function.name, 'testFunction');
var root = isolate.rootLibrary;
await root.load();
diff --git a/runtime/observatory/tests/service/get_source_report_test.dart b/runtime/observatory/tests/service/get_source_report_test.dart
index a1d5206..7c87aa6 100644
--- a/runtime/observatory/tests/service/get_source_report_test.dart
+++ b/runtime/observatory/tests/service/get_source_report_test.dart
@@ -91,7 +91,7 @@
final numRanges = coverage['ranges'].length;
expect(coverage['type'], equals('SourceReport'));
- expect(numRanges, equals(11));
+ expect(numRanges, greaterThanOrEqualTo(10));
expect(coverage['ranges'][0], equals(expectedRange));
expect(coverage['scripts'].length, 1);
expect(
@@ -106,7 +106,7 @@
};
coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
expect(coverage['type'], equals('SourceReport'));
- expect(coverage['ranges'].length, 12);
+ expect(coverage['ranges'].length, greaterThanOrEqualTo(10));
expect(allRangesCompiled(coverage), isTrue);
// One function
diff --git a/runtime/observatory/tests/service/get_stack_limit_rpc_test.dart b/runtime/observatory/tests/service/get_stack_limit_rpc_test.dart
index 09186aa..b3e47e2 100644
--- a/runtime/observatory/tests/service/get_stack_limit_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_stack_limit_rpc_test.dart
@@ -58,9 +58,9 @@
expect(awaiterFrames.length, greaterThan(frames.length));
expect(stack['truncated'], false);
verifyStack(frames, [
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
+ 'bar', 'foo', 'bar', 'foo',
+ 'bar', 'foo', 'bar', 'foo',
+ 'bar', 'foo', 'bar', 'foo',
'_RootZone.runUnary', // Internal async. mech. ..
]);
@@ -78,9 +78,9 @@
expect(awaiterFrames.length, fullStackLength + 1);
expect(stack['truncated'], true);
verifyStack(frames, [
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
+ 'bar', 'foo', 'bar', 'foo',
+ 'bar', 'foo', 'bar', 'foo',
+ 'bar', 'foo', 'bar', 'foo',
'_RootZone.runUnary', // Internal async. mech. ..
]);
@@ -96,16 +96,16 @@
expect(awaiterFrames.length, 10);
expect(stack['truncated'], true);
verifyStack(frames, [
- 'bar.async_op',
- 'foo.async_op',
- 'bar.async_op',
- 'foo.async_op',
- 'bar.async_op',
- 'foo.async_op',
- 'bar.async_op',
- 'foo.async_op',
- 'bar.async_op',
- 'foo.async_op',
+ 'bar',
+ 'foo',
+ 'bar',
+ 'foo',
+ 'bar',
+ 'foo',
+ 'bar',
+ 'foo',
+ 'bar',
+ 'foo',
]);
},
// Invalid limit
diff --git a/runtime/observatory/tests/service/network_profiling_test.dart b/runtime/observatory/tests/service/network_profiling_test.dart
index 3a318ca..6770c58 100644
--- a/runtime/observatory/tests/service/network_profiling_test.dart
+++ b/runtime/observatory/tests/service/network_profiling_test.dart
@@ -24,6 +24,8 @@
const String kStartSocketProfilingRPC = 'ext.dart.io.startSocketProfiling';
const String localhost = '127.0.0.1';
+List<Object> sockets = [];
+
Future<void> setup() async {}
Future<void> socketTest() async {
@@ -54,6 +56,11 @@
await doneCompleter.future;
// Post finish event
postEvent('socketTest', {'socket': 'test'});
+ // Workaround for dartbug.com/49111: make sure socket IDs are not reused.
+ sockets.add(serverSocket);
+ sockets.add(socket);
+ sockets.add(server);
+ sockets.add(client);
}
bool checkFinishEvent(ServiceEvent event) {
diff --git a/runtime/observatory/tests/service/positive_token_pos_test.dart b/runtime/observatory/tests/service/positive_token_pos_test.dart
index b9c25a8..6ebfbae 100644
--- a/runtime/observatory/tests/service/positive_token_pos_test.dart
+++ b/runtime/observatory/tests/service/positive_token_pos_test.dart
@@ -29,7 +29,7 @@
// We used to return a negative token position for this frame.
// See issue #27128.
var frame = stack['frames'][0];
- expect(frame.function.qualifiedName, equals('helper.async_op'));
+ expect(frame.function.qualifiedName, equals('helper'));
expect(await frame.location.getLine(), equals(14));
expect(await frame.location.getColumn(), equals(1));
diff --git a/runtime/observatory/tests/service/regress_28443_test.dart b/runtime/observatory/tests/service/regress_28443_test.dart
index ccdec12..c986dd5 100644
--- a/runtime/observatory/tests/service/regress_28443_test.dart
+++ b/runtime/observatory/tests/service/regress_28443_test.dart
@@ -8,7 +8,7 @@
import 'package:observatory/service_io.dart';
import 'package:test/test.dart';
-const int LINE_A = 28, LINE_B = 33;
+const int LINE_A = 28, LINE_B = 33, LINE_C = 37;
class VMServiceClient {
VMServiceClient(this.x);
@@ -30,11 +30,11 @@
});
}
-test_code() async {
+test_code() async /* LINE_B */ {
try {
await collect();
} on TimeoutException {
- print("ok");
+ print("ok"); // LINE_C
}
}
@@ -44,12 +44,15 @@
setBreakpointAtLine(LINE_B),
resumeIsolate,
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_B),
setBreakpointAtLine(LINE_A),
resumeIsolate,
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_A),
+ setBreakpointAtLine(LINE_C),
stepOut,
- stoppedAtLine(LINE_B),
- resumeIsolate
+ resumeIsolate,
+ stoppedAtLine(LINE_C),
];
main(args) => runIsolateTestsSynchronous(args, tests,
diff --git a/runtime/observatory/tests/service/service_test_common.dart b/runtime/observatory/tests/service/service_test_common.dart
index 0189540..50afe39 100644
--- a/runtime/observatory/tests/service/service_test_common.dart
+++ b/runtime/observatory/tests/service/service_test_common.dart
@@ -305,8 +305,7 @@
};
}
-IsolateTest stoppedInFunction(String functionName,
- {bool contains: false, bool includeOwner: false}) {
+IsolateTest stoppedInFunction(String functionName) {
return (Isolate isolate) async {
print("Checking we are in function: $functionName");
@@ -320,13 +319,7 @@
ServiceFunction function =
await topFrame.function!.load() as ServiceFunction;
String name = function.name!;
- if (includeOwner) {
- ServiceFunction owner =
- await (function.dartOwner as ServiceObject).load() as ServiceFunction;
- name = '${owner.name}.$name';
- }
- final bool matches =
- contains ? name.contains(functionName) : name == functionName;
+ final bool matches = name == functionName;
if (!matches) {
StringBuffer sb = new StringBuffer();
sb.write("Expected to be in function $functionName but "
diff --git a/runtime/observatory/tests/service/set_library_debuggable_test.dart b/runtime/observatory/tests/service/set_library_debuggable_test.dart
index 7431778..adac834 100644
--- a/runtime/observatory/tests/service/set_library_debuggable_test.dart
+++ b/runtime/observatory/tests/service/set_library_debuggable_test.dart
@@ -31,12 +31,12 @@
await dartCore.reload();
expect(dartCore.debuggable, equals(true));
},
- stoppedInFunction('testMain', contains: true, includeOwner: true),
+ stoppedInFunction('testMain'),
stoppedAtLine(LINE_A),
stepInto,
stoppedInFunction('print'),
stepOut,
- stoppedInFunction('testMain', contains: true, includeOwner: true),
+ stoppedInFunction('testMain'),
stoppedAtLine(LINE_B),
(Isolate isolate) async {
// Mark 'dart:core' as not debuggable.
@@ -55,10 +55,10 @@
await dartCore.reload();
expect(dartCore.debuggable, equals(false));
},
- stoppedInFunction('testMain', contains: true, includeOwner: true),
+ stoppedInFunction('testMain'),
stoppedAtLine(LINE_B),
stepInto,
- stoppedInFunction('testMain', contains: true, includeOwner: true),
+ stoppedInFunction('testMain'),
stoppedAtLine(LINE_C),
];
diff --git a/runtime/observatory_2/tests/service_2/async_single_step_exception_test.dart b/runtime/observatory_2/tests/service_2/async_single_step_exception_test.dart
index 841afab..9982e0c 100644
--- a/runtime/observatory_2/tests/service_2/async_single_step_exception_test.dart
+++ b/runtime/observatory_2/tests/service_2/async_single_step_exception_test.dart
@@ -55,10 +55,6 @@
smartNext,
hasStoppedAtBreakpoint,
- stoppedAtLine(23), // } (weird dispatching)
- smartNext,
-
- hasStoppedAtBreakpoint,
stoppedAtLine(LINE_D), // await helper (weird dispatching)
smartNext,
diff --git a/runtime/observatory_2/tests/service_2/async_single_step_out_test.dart b/runtime/observatory_2/tests/service_2/async_single_step_out_test.dart
index cfeac6c..e93c274 100644
--- a/runtime/observatory_2/tests/service_2/async_single_step_out_test.dart
+++ b/runtime/observatory_2/tests/service_2/async_single_step_out_test.dart
@@ -44,11 +44,7 @@
stepInto, // exit helper via a single step.
hasStoppedAtBreakpoint,
- stoppedAtLine(20), // return null (weird dispatching)
- stepInto, // exit helper via a single step.
-
- hasStoppedAtBreakpoint,
- stoppedAtLine(25), // await helper (weird dispatching)
+ stoppedAtLine(LINE_D), // await helper
smartNext,
hasStoppedAtBreakpoint,
diff --git a/runtime/observatory_2/tests/service_2/async_star_single_step_into_test.dart b/runtime/observatory_2/tests/service_2/async_star_single_step_into_test.dart
index 0d99fd5..ac8e6ba 100644
--- a/runtime/observatory_2/tests/service_2/async_star_single_step_into_test.dart
+++ b/runtime/observatory_2/tests/service_2/async_star_single_step_into_test.dart
@@ -8,12 +8,13 @@
import 'service_test_common.dart';
import 'test_helper.dart';
-const LINE_A = 19;
-const LINE_B = 20;
-const LINE_C = 24;
-const LINE_D = 27;
-const LINE_E = 33;
-const LINE_F = 34;
+const LINE_A = 20;
+const LINE_B = 21;
+const LINE_C = 25;
+const LINE_D = 28;
+const LINE_E = 34;
+const LINE_F = 35;
+const LINE_G = 26;
foobar() async* {
yield 1; // LINE_A.
@@ -22,7 +23,7 @@
helper() async {
print('helper'); // LINE_C.
- await for (var i in foobar()) {
+ await for (var i in foobar()) /* LINE_G. */ {
debugger();
print('loop'); // LINE_D.
}
@@ -49,6 +50,11 @@
stepOver, // print.
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_G), // foobar()
+ stepInto,
+
+ hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_G), // await for
stepInto,
hasStoppedAtBreakpoint,
@@ -62,6 +68,7 @@
stepOver, // print.
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_G),
stepInto,
hasStoppedAtBreakpoint,
diff --git a/runtime/observatory_2/tests/service_2/async_star_step_out_test.dart b/runtime/observatory_2/tests/service_2/async_star_step_out_test.dart
index 95ca280..6e73174 100644
--- a/runtime/observatory_2/tests/service_2/async_star_step_out_test.dart
+++ b/runtime/observatory_2/tests/service_2/async_star_step_out_test.dart
@@ -53,6 +53,11 @@
stepOver, // print.
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_H), // foobar().
+ stepInto,
+
+ hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_H), // await for.
stepInto,
hasStoppedAtBreakpoint,
diff --git a/runtime/observatory_2/tests/service_2/coverage_const_field_async_closure_test.dart b/runtime/observatory_2/tests/service_2/coverage_const_field_async_closure_test.dart
index f2c21ce..ba084ef 100644
--- a/runtime/observatory_2/tests/service_2/coverage_const_field_async_closure_test.dart
+++ b/runtime/observatory_2/tests/service_2/coverage_const_field_async_closure_test.dart
@@ -36,8 +36,7 @@
// Make sure we are in the right place.
expect(stack.type, 'Stack');
expect(stack['frames'].length, greaterThanOrEqualTo(1));
- // Async closure of testFunction
- expect(stack['frames'][0].function.name, 'async_op');
+ expect(stack['frames'][0].function.name, 'testFunction');
var root = isolate.rootLibrary;
await root.load();
diff --git a/runtime/observatory_2/tests/service_2/get_source_report_test.dart b/runtime/observatory_2/tests/service_2/get_source_report_test.dart
index 78ea471..067aeba 100644
--- a/runtime/observatory_2/tests/service_2/get_source_report_test.dart
+++ b/runtime/observatory_2/tests/service_2/get_source_report_test.dart
@@ -91,7 +91,7 @@
final numRanges = coverage['ranges'].length;
expect(coverage['type'], equals('SourceReport'));
- expect(numRanges, equals(11));
+ expect(numRanges, greaterThanOrEqualTo(10));
expect(coverage['ranges'][0], equals(expectedRange));
expect(coverage['scripts'].length, 1);
expect(
@@ -106,7 +106,7 @@
};
coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
expect(coverage['type'], equals('SourceReport'));
- expect(coverage['ranges'].length, 12);
+ expect(coverage['ranges'].length, greaterThanOrEqualTo(10));
expect(allRangesCompiled(coverage), isTrue);
// One function
diff --git a/runtime/observatory_2/tests/service_2/get_stack_limit_rpc_test.dart b/runtime/observatory_2/tests/service_2/get_stack_limit_rpc_test.dart
index fca283d..dc9f253 100644
--- a/runtime/observatory_2/tests/service_2/get_stack_limit_rpc_test.dart
+++ b/runtime/observatory_2/tests/service_2/get_stack_limit_rpc_test.dart
@@ -58,9 +58,9 @@
expect(awaiterFrames.length, greaterThan(frames.length));
expect(stack['truncated'], false);
verifyStack(frames, [
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
+ 'bar', 'foo', 'bar', 'foo',
+ 'bar', 'foo', 'bar', 'foo',
+ 'bar', 'foo', 'bar', 'foo',
'_RootZone.runUnary', // Internal async. mech. ..
]);
@@ -78,9 +78,9 @@
expect(awaiterFrames.length, fullStackLength + 1);
expect(stack['truncated'], true);
verifyStack(frames, [
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
- 'bar.async_op', 'foo.async_op', 'bar.async_op', 'foo.async_op',
+ 'bar', 'foo', 'bar', 'foo',
+ 'bar', 'foo', 'bar', 'foo',
+ 'bar', 'foo', 'bar', 'foo',
'_RootZone.runUnary', // Internal async. mech. ..
]);
@@ -96,16 +96,16 @@
expect(awaiterFrames.length, 10);
expect(stack['truncated'], true);
verifyStack(frames, [
- 'bar.async_op',
- 'foo.async_op',
- 'bar.async_op',
- 'foo.async_op',
- 'bar.async_op',
- 'foo.async_op',
- 'bar.async_op',
- 'foo.async_op',
- 'bar.async_op',
- 'foo.async_op',
+ 'bar',
+ 'foo',
+ 'bar',
+ 'foo',
+ 'bar',
+ 'foo',
+ 'bar',
+ 'foo',
+ 'bar',
+ 'foo',
]);
},
// Invalid limit
diff --git a/runtime/observatory_2/tests/service_2/network_profiling_test.dart b/runtime/observatory_2/tests/service_2/network_profiling_test.dart
index 8ba995f..8a2053b 100644
--- a/runtime/observatory_2/tests/service_2/network_profiling_test.dart
+++ b/runtime/observatory_2/tests/service_2/network_profiling_test.dart
@@ -24,6 +24,8 @@
const String kStartSocketProfilingRPC = 'ext.dart.io.startSocketProfiling';
const String localhost = '127.0.0.1';
+List<Object> sockets = [];
+
Future<void> setup() async {}
Future<void> socketTest() async {
@@ -54,6 +56,11 @@
await doneCompleter.future;
// Post finish event
postEvent('socketTest', {'socket': 'test'});
+ // Workaround for dartbug.com/49111: make sure socket IDs are not reused.
+ sockets.add(serverSocket);
+ sockets.add(socket);
+ sockets.add(server);
+ sockets.add(client);
}
bool checkFinishEvent(ServiceEvent event) {
diff --git a/runtime/observatory_2/tests/service_2/positive_token_pos_test.dart b/runtime/observatory_2/tests/service_2/positive_token_pos_test.dart
index ed4d46e..84dc6e1 100644
--- a/runtime/observatory_2/tests/service_2/positive_token_pos_test.dart
+++ b/runtime/observatory_2/tests/service_2/positive_token_pos_test.dart
@@ -29,7 +29,7 @@
// We used to return a negative token position for this frame.
// See issue #27128.
var frame = stack['frames'][0];
- expect(frame.function.qualifiedName, equals('helper.async_op'));
+ expect(frame.function.qualifiedName, equals('helper'));
expect(await frame.location.getLine(), equals(14));
expect(await frame.location.getColumn(), equals(1));
diff --git a/runtime/observatory_2/tests/service_2/regress_28443_test.dart b/runtime/observatory_2/tests/service_2/regress_28443_test.dart
index ddc48fa..f30535f 100644
--- a/runtime/observatory_2/tests/service_2/regress_28443_test.dart
+++ b/runtime/observatory_2/tests/service_2/regress_28443_test.dart
@@ -8,7 +8,7 @@
import 'package:observatory_2/service_io.dart';
import 'package:test/test.dart';
-const int LINE_A = 28, LINE_B = 33;
+const int LINE_A = 28, LINE_B = 33, LINE_C = 37;
class VMServiceClient {
VMServiceClient(this.x);
@@ -30,11 +30,11 @@
});
}
-test_code() async {
+test_code() async /* LINE_B */ {
try {
await collect();
} on TimeoutException {
- print("ok");
+ print("ok"); // LINE_C
}
}
@@ -44,12 +44,15 @@
setBreakpointAtLine(LINE_B),
resumeIsolate,
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_B),
setBreakpointAtLine(LINE_A),
resumeIsolate,
hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_A),
+ setBreakpointAtLine(LINE_C),
stepOut,
- stoppedAtLine(LINE_B),
- resumeIsolate
+ resumeIsolate,
+ stoppedAtLine(LINE_C),
];
main(args) => runIsolateTestsSynchronous(args, tests,
diff --git a/runtime/observatory_2/tests/service_2/service_test_common.dart b/runtime/observatory_2/tests/service_2/service_test_common.dart
index e1dc008..a8530b0 100644
--- a/runtime/observatory_2/tests/service_2/service_test_common.dart
+++ b/runtime/observatory_2/tests/service_2/service_test_common.dart
@@ -308,8 +308,7 @@
};
}
-IsolateTest stoppedInFunction(String functionName,
- {bool contains: false, bool includeOwner: false}) {
+IsolateTest stoppedInFunction(String functionName) {
return (Isolate isolate) async {
print("Checking we are in function: $functionName");
@@ -322,13 +321,7 @@
Frame topFrame = frames[0];
ServiceFunction function = await topFrame.function.load();
String name = function.name;
- if (includeOwner) {
- ServiceFunction owner =
- await (function.dartOwner as ServiceObject).load();
- name = '${owner.name}.$name';
- }
- final bool matches =
- contains ? name.contains(functionName) : name == functionName;
+ final bool matches = name == functionName;
if (!matches) {
StringBuffer sb = new StringBuffer();
sb.write("Expected to be in function $functionName but "
diff --git a/runtime/observatory_2/tests/service_2/set_library_debuggable_test.dart b/runtime/observatory_2/tests/service_2/set_library_debuggable_test.dart
index 89a8b52..e2bcc9c 100644
--- a/runtime/observatory_2/tests/service_2/set_library_debuggable_test.dart
+++ b/runtime/observatory_2/tests/service_2/set_library_debuggable_test.dart
@@ -31,12 +31,12 @@
await dartCore.reload();
expect(dartCore.debuggable, equals(true));
},
- stoppedInFunction('testMain', contains: true, includeOwner: true),
+ stoppedInFunction('testMain'),
stoppedAtLine(LINE_A),
stepInto,
stoppedInFunction('print'),
stepOut,
- stoppedInFunction('testMain', contains: true, includeOwner: true),
+ stoppedInFunction('testMain'),
stoppedAtLine(LINE_B),
(Isolate isolate) async {
// Mark 'dart:core' as not debuggable.
@@ -55,10 +55,10 @@
await dartCore.reload();
expect(dartCore.debuggable, equals(false));
},
- stoppedInFunction('testMain', contains: true, includeOwner: true),
+ stoppedInFunction('testMain'),
stoppedAtLine(LINE_B),
stepInto,
- stoppedInFunction('testMain', contains: true, includeOwner: true),
+ stoppedInFunction('testMain'),
stoppedAtLine(LINE_C),
];
diff --git a/runtime/tests/vm/dart/causal_stacks/utils.dart b/runtime/tests/vm/dart/causal_stacks/utils.dart
index 077e9bd..584fd6d 100644
--- a/runtime/tests/vm/dart/causal_stacks/utils.dart
+++ b/runtime/tests/vm/dart/causal_stacks/utils.dart
@@ -321,15 +321,12 @@
final expected = const <String>[
r'^#0 throwSync \(.*/utils.dart:16(:3)?\)$',
r'^#1 noYields3 \(.*/utils.dart:54(:3)?\)$',
- r'^#2 noYields3 \(.*/utils.dart:53(:23)?\)$',
- r'^#3 noYields2 \(.*/utils.dart:50(:9)?\)$',
- r'^#4 noYields2 \(.*/utils.dart:49(:23)?\)$',
- r'^#5 noYields \(.*/utils.dart:46(:9)?\)$',
- r'^#6 noYields \(.*/utils.dart:45(:22)?\)$',
+ r'^#2 noYields2 \(.*/utils.dart:50(:9)?\)$',
+ r'^#3 noYields \(.*/utils.dart:46(:9)?\)$',
];
final postfix = const <String>[
- r'^#9 doTestsNoCausalNoLazy ',
- r'^#10 _RootZone.runUnary \(.+\)$',
+ r'^#5 doTestsNoCausalNoLazy ',
+ r'^#6 _RootZone.runUnary \(.+\)$',
// The rest are internal frames which we don't really care about.
IGNORE_REMAINING_STACK,
];
@@ -338,8 +335,7 @@
noYields,
expected +
const <String>[
- r'^#7 doTestAwait ',
- r'^#8 doTestAwait ',
+ r'^#4 doTestAwait ',
] +
postfix,
debugInfoFilename);
@@ -348,8 +344,7 @@
noYields,
expected +
const <String>[
- r'^#7 doTestAwaitThen ',
- r'^#8 doTestAwaitThen ',
+ r'^#4 doTestAwaitThen ',
] +
postfix,
debugInfoFilename);
@@ -358,8 +353,7 @@
noYields,
expected +
const <String>[
- r'^#7 doTestAwaitCatchError ',
- r'^#8 doTestAwaitCatchError ',
+ r'^#4 doTestAwaitCatchError ',
] +
postfix,
debugInfoFilename);
diff --git a/runtime/tests/vm/dart/causal_stacks/zone_callback_stack_traces_test.dart b/runtime/tests/vm/dart/causal_stacks/zone_callback_stack_traces_test.dart
new file mode 100644
index 0000000..f5ba280
--- /dev/null
+++ b/runtime/tests/vm/dart/causal_stacks/zone_callback_stack_traces_test.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:expect/expect.dart';
+
+const String scriptName = 'zone_callback_stack_traces_test.dart';
+
+Future<void> foo() async {}
+
+Future<void> bar() async {
+ await foo();
+}
+
+Future<void> runTest() {
+ final Zone testZone = Zone.current.fork(
+ specification: ZoneSpecification(
+ registerUnaryCallback: _registerUnaryCallback,
+ registerBinaryCallback: _registerBinaryCallback));
+ return testZone.run(bar);
+}
+
+StackTrace? registerUnaryCallbackStackTrace;
+StackTrace? registerBinaryCallbackStackTrace;
+
+ZoneUnaryCallback<R, T> _registerUnaryCallback<R, T>(
+ Zone self, ZoneDelegate parent, Zone zone, R Function(T) f) {
+ final stackTrace = StackTrace.current;
+ print('registerUnaryCallback got stack trace:');
+ print(stackTrace);
+ if (stackTrace.toString().contains('bar')) {
+ Expect.isNull(registerUnaryCallbackStackTrace);
+ registerUnaryCallbackStackTrace = stackTrace;
+ }
+ return parent.registerUnaryCallback(zone, f);
+}
+
+ZoneBinaryCallback<R, T1, T2> _registerBinaryCallback<R, T1, T2>(
+ Zone self, ZoneDelegate parent, Zone zone, R Function(T1, T2) f) {
+ final stackTrace = StackTrace.current;
+ print('registerBinaryCallback got stack trace:');
+ print(stackTrace);
+ if (stackTrace.toString().contains('bar')) {
+ Expect.isNull(registerBinaryCallbackStackTrace);
+ registerBinaryCallbackStackTrace = stackTrace;
+ }
+ return parent.registerBinaryCallback(zone, f);
+}
+
+void verifyStackTrace(List<String> expected, StackTrace stackTrace) {
+ final List<String> actual = stackTrace
+ .toString()
+ .split('\n')
+ .where((entry) => entry.contains(scriptName))
+ .toList();
+ print('Expected:\n${expected.join('\n')}');
+ print('Actual:\n${actual.join('\n')}');
+ Expect.equals(expected.length, actual.length);
+ for (int i = 0; i < expected.length; ++i) {
+ if (!RegExp(expected[i]).hasMatch(actual[i])) {
+ Expect.fail("Stack trace entry $i doesn't match:\n"
+ " expected: ${expected[i]}\n actual: ${actual[i]}");
+ }
+ }
+}
+
+main() async {
+ await runTest();
+ verifyStackTrace([
+ r'^#\d+ _registerUnaryCallback \(.*zone_callback_stack_traces_test.dart:30(:33)?\)$',
+ r'^#\d+ bar \(.*zone_callback_stack_traces_test.dart:14(:3)?\)$',
+ r'^#\d+ runTest \(.*zone_callback_stack_traces_test.dart:22(:19)?\)$',
+ r'^#\d+ main \(.*zone_callback_stack_traces_test.dart:70(:9)?\)$',
+ ], registerUnaryCallbackStackTrace!);
+
+ verifyStackTrace([
+ r'^#\d+ _registerBinaryCallback \(.*zone_callback_stack_traces_test.dart:42(:33)?\)$',
+ r'^#\d+ bar \(.*zone_callback_stack_traces_test.dart:14(:3)?\)$',
+ r'^#\d+ runTest \(.*zone_callback_stack_traces_test.dart:22(:19)?\)$',
+ r'^#\d+ main \(.*zone_callback_stack_traces_test.dart:70(:9)?\)$',
+ ], registerBinaryCallbackStackTrace!);
+}
diff --git a/runtime/tests/vm/dart_2/causal_stacks/utils.dart b/runtime/tests/vm/dart_2/causal_stacks/utils.dart
index 0d1489c..5ae06ed 100644
--- a/runtime/tests/vm/dart_2/causal_stacks/utils.dart
+++ b/runtime/tests/vm/dart_2/causal_stacks/utils.dart
@@ -323,15 +323,12 @@
final expected = const <String>[
r'^#0 throwSync \(.*/utils.dart:18(:3)?\)$',
r'^#1 noYields3 \(.*/utils.dart:56(:3)?\)$',
- r'^#2 noYields3 \(.*/utils.dart:55(:23)?\)$',
- r'^#3 noYields2 \(.*/utils.dart:52(:9)?\)$',
- r'^#4 noYields2 \(.*/utils.dart:51(:23)?\)$',
- r'^#5 noYields \(.*/utils.dart:48(:9)?\)$',
- r'^#6 noYields \(.*/utils.dart:47(:22)?\)$',
+ r'^#2 noYields2 \(.*/utils.dart:52(:9)?\)$',
+ r'^#3 noYields \(.*/utils.dart:48(:9)?\)$',
];
final postfix = const <String>[
- r'^#9 doTestsNoCausalNoLazy ',
- r'^#10 _RootZone.runUnary ',
+ r'^#5 doTestsNoCausalNoLazy ',
+ r'^#6 _RootZone.runUnary ',
// The rest are internal frames which we don't really care about.
IGNORE_REMAINING_STACK,
];
@@ -340,8 +337,7 @@
noYields,
expected +
const <String>[
- r'^#7 doTestAwait ',
- r'^#8 doTestAwait ',
+ r'^#4 doTestAwait ',
] +
postfix,
debugInfoFilename);
@@ -350,8 +346,7 @@
noYields,
expected +
const <String>[
- r'^#7 doTestAwaitThen ',
- r'^#8 doTestAwaitThen ',
+ r'^#4 doTestAwaitThen ',
] +
postfix,
debugInfoFilename);
@@ -360,8 +355,7 @@
noYields,
expected +
const <String>[
- r'^#7 doTestAwaitCatchError ',
- r'^#8 doTestAwaitCatchError ',
+ r'^#4 doTestAwaitCatchError ',
] +
postfix,
debugInfoFilename);
diff --git a/runtime/tests/vm/dart_2/causal_stacks/zone_callback_stack_traces_test.dart b/runtime/tests/vm/dart_2/causal_stacks/zone_callback_stack_traces_test.dart
new file mode 100644
index 0000000..a22dab5
--- /dev/null
+++ b/runtime/tests/vm/dart_2/causal_stacks/zone_callback_stack_traces_test.dart
@@ -0,0 +1,86 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// @dart = 2.9
+
+import 'dart:async';
+
+import 'package:expect/expect.dart';
+
+const String scriptName = 'zone_callback_stack_traces_test.dart';
+
+Future<void> foo() async {}
+
+Future<void> bar() async {
+ await foo();
+}
+
+Future<void> runTest() {
+ final Zone testZone = Zone.current.fork(
+ specification: ZoneSpecification(
+ registerUnaryCallback: _registerUnaryCallback,
+ registerBinaryCallback: _registerBinaryCallback));
+ return testZone.run(bar);
+}
+
+StackTrace registerUnaryCallbackStackTrace;
+StackTrace registerBinaryCallbackStackTrace;
+
+ZoneUnaryCallback<R, T> _registerUnaryCallback<R, T>(
+ Zone self, ZoneDelegate parent, Zone zone, R Function(T) f) {
+ final stackTrace = StackTrace.current;
+ print('registerUnaryCallback got stack trace:');
+ print(stackTrace);
+ if (stackTrace.toString().contains('bar')) {
+ Expect.isNull(registerUnaryCallbackStackTrace);
+ registerUnaryCallbackStackTrace = stackTrace;
+ }
+ return parent.registerUnaryCallback(zone, f);
+}
+
+ZoneBinaryCallback<R, T1, T2> _registerBinaryCallback<R, T1, T2>(
+ Zone self, ZoneDelegate parent, Zone zone, R Function(T1, T2) f) {
+ final stackTrace = StackTrace.current;
+ print('registerBinaryCallback got stack trace:');
+ print(stackTrace);
+ if (stackTrace.toString().contains('bar')) {
+ Expect.isNull(registerBinaryCallbackStackTrace);
+ registerBinaryCallbackStackTrace = stackTrace;
+ }
+ return parent.registerBinaryCallback(zone, f);
+}
+
+void verifyStackTrace(List<String> expected, StackTrace stackTrace) {
+ final List<String> actual = stackTrace
+ .toString()
+ .split('\n')
+ .where((entry) => entry.contains(scriptName))
+ .toList();
+ print('Expected:\n${expected.join('\n')}');
+ print('Actual:\n${actual.join('\n')}');
+ Expect.equals(expected.length, actual.length);
+ for (int i = 0; i < expected.length; ++i) {
+ if (!RegExp(expected[i]).hasMatch(actual[i])) {
+ Expect.fail("Stack trace entry $i doesn't match:\n"
+ " expected: ${expected[i]}\n actual: ${actual[i]}");
+ }
+ }
+}
+
+main() async {
+ await runTest();
+ verifyStackTrace([
+ r'^#\d+ _registerUnaryCallback \(.*zone_callback_stack_traces_test.dart:32(:33)?\)$',
+ r'^#\d+ bar \(.*zone_callback_stack_traces_test.dart:16(:3)?\)$',
+ r'^#\d+ runTest \(.*zone_callback_stack_traces_test.dart:24(:19)?\)$',
+ r'^#\d+ main \(.*zone_callback_stack_traces_test.dart:72(:9)?\)$',
+ ], registerUnaryCallbackStackTrace);
+
+ verifyStackTrace([
+ r'^#\d+ _registerBinaryCallback \(.*zone_callback_stack_traces_test.dart:44(:33)?\)$',
+ r'^#\d+ bar \(.*zone_callback_stack_traces_test.dart:16(:3)?\)$',
+ r'^#\d+ runTest \(.*zone_callback_stack_traces_test.dart:24(:19)?\)$',
+ r'^#\d+ main \(.*zone_callback_stack_traces_test.dart:72(:9)?\)$',
+ ], registerBinaryCallbackStackTrace);
+}
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 2d0f5db..fb489d4 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -431,10 +431,12 @@
dart/causal_stacks/async_throws_stack_no_causal_test: SkipByDesign # Asserts exact stacktrace output.
dart/causal_stacks/flutter_regress_100441_test: SkipByDesign # Asserts exact stacktrace output.
dart/causal_stacks/sync_async_start_pkg_test_test: SkipByDesign # Asserts exact stacktrace output.
+dart/causal_stacks/zone_callback_stack_traces_test: SkipByDesign # Asserts exact stacktrace output.
dart_2/causal_stacks/async_throws_stack_lazy_test: SkipByDesign # Asserts exact stacktrace output.
dart_2/causal_stacks/async_throws_stack_no_causal_test: SkipByDesign # Asserts exact stacktrace output.
dart_2/causal_stacks/flutter_regress_100441_test: SkipByDesign # Asserts exact stacktrace output.
dart_2/causal_stacks/sync_async_start_pkg_test_test: SkipByDesign # Asserts exact stacktrace output.
+dart_2/causal_stacks/zone_callback_stack_traces_test: SkipByDesign # Asserts exact stacktrace output.
[ $compiler == dart2analyzer || $compiler == dart2js ]
dart/data_uri*test: Skip # Data uri's not supported by dart2js or the analyzer.
diff --git a/runtime/vm/compiler/backend/yield_position_test.cc b/runtime/vm/compiler/backend/yield_position_test.cc
index c28b700..edad705 100644
--- a/runtime/vm/compiler/backend/yield_position_test.cc
+++ b/runtime/vm/compiler/backend/yield_position_test.cc
@@ -12,11 +12,10 @@
namespace dart {
-using Pair = std::pair<intptr_t, TokenPosition>;
-using YieldPoints = ZoneGrowableArray<Pair>;
+using YieldPoints = ZoneGrowableArray<TokenPosition>;
-int LowestFirst(const Pair* a, const Pair* b) {
- return a->first - b->first;
+int LowestFirst(const TokenPosition* a, const TokenPosition* b) {
+ return a->Pos() - b->Pos();
}
static YieldPoints* GetYieldPointsFromGraph(FlowGraph* flow_graph) {
@@ -25,13 +24,8 @@
for (auto block : blocks) {
ForwardInstructionIterator it(block);
while (!it.Done()) {
- if (auto return_instr = it.Current()->AsReturn()) {
- if (return_instr->yield_index() !=
- UntaggedPcDescriptors::kInvalidYieldIndex) {
- ASSERT(return_instr->yield_index() > 0);
- array->Add(
- Pair(return_instr->yield_index(), return_instr->token_pos()));
- }
+ if (auto suspend_instr = it.Current()->AsSuspend()) {
+ array->Add(suspend_instr->token_pos());
}
it.Advance();
}
@@ -46,7 +40,7 @@
PcDescriptors::Iterator it(pc_descriptor, UntaggedPcDescriptors::kOther);
while (it.MoveNext()) {
if (it.YieldIndex() != UntaggedPcDescriptors::kInvalidYieldIndex) {
- array->Add(Pair(it.YieldIndex(), it.TokenPos()));
+ array->Add(it.TokenPos());
}
}
array->Sort(LowestFirst);
@@ -75,13 +69,7 @@
// function for the inner closure.
Invoke(root_library, "foo");
- const auto& outer_function =
- Function::Handle(GetFunction(root_library, "foo"));
-
- // Grab the inner, lazily created, closure from the object store.
- const auto& function = Function::Handle(
- ClosureFunctionsCache::GetUniqueInnerClosure(outer_function));
- RELEASE_ASSERT(function.IsFunction());
+ const auto& function = Function::Handle(GetFunction(root_library, "foo"));
// Ensure we have 3 different return instructions with yield indices attached
// to them.
@@ -93,12 +81,9 @@
auto validate_indices = [](const YieldPoints& yield_points) {
EXPECT_EQ(3, yield_points.length());
- EXPECT_EQ(1, yield_points[0].first);
- EXPECT_EQ(88, yield_points[0].second.Pos());
- EXPECT_EQ(2, yield_points[1].first);
- EXPECT_EQ(129, yield_points[1].second.Pos());
- EXPECT_EQ(3, yield_points[2].first);
- EXPECT_EQ(170, yield_points[2].second.Pos());
+ EXPECT_EQ(88, yield_points[0].Pos());
+ EXPECT_EQ(129, yield_points[1].Pos());
+ EXPECT_EQ(170, yield_points[2].Pos());
};
validate_indices(*GetYieldPointsFromGraph(flow_graph));
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 1a83328..31cc36f 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -768,7 +768,8 @@
if (function_.IsCompactAsyncFunction() ||
function_.IsCompactAsyncStarFunction()) {
const auto& suspend_state = Object::Handle(GetSuspendStateVar());
- if (suspend_state.IsSuspendState()) {
+ if (caller_closure_finder->WasPreviouslySuspended(function_,
+ suspend_state)) {
return caller_closure_finder->FindCallerFromSuspendState(
SuspendState::Cast(suspend_state));
}
@@ -846,7 +847,8 @@
} else if ((fp() != 0) && function().IsCompactAsyncFunction()) {
CallerClosureFinder caller_closure_finder(Thread::Current()->zone());
auto& suspend_state = Object::Handle(GetSuspendStateVar());
- if (!suspend_state.IsSuspendState()) {
+ if (!caller_closure_finder.WasPreviouslySuspended(function(),
+ suspend_state)) {
return false;
}
Object& futureOrListener =
@@ -2117,7 +2119,8 @@
// Grab the awaiter.
async_activation ^= activation->GetAsyncAwaiter(&caller_closure_finder);
// Bail if we've reach the end of sync execution stack.
- if (Object::Handle(activation->GetSuspendStateVar()).IsSuspendState()) {
+ if (caller_closure_finder.WasPreviouslySuspended(
+ function, Object::Handle(activation->GetSuspendStateVar()))) {
break;
}
} else {
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 7bc0b78..47633fe 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -3907,6 +3907,10 @@
auto& metadata = Array::Cast(metadata_obj);
auto& pragma_class = Class::Handle(Z, IG->object_store()->pragma_class());
+ if (pragma_class.IsNull()) {
+ // Precompiler may drop pragma class.
+ return false;
+ }
auto& pragma_name_field =
Field::Handle(Z, pragma_class.LookupField(Symbols::name()));
auto& pragma_options_field =
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 8b3c7a3..bdb1787 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -11869,6 +11869,9 @@
InstancePtr function_data() const {
return untag()->function_data();
}
+ ClosurePtr error_callback() const {
+ return untag()->error_callback();
+ }
// Returns Code object corresponding to the suspended function.
CodePtr GetCodeObject() const;
diff --git a/runtime/vm/stack_trace.cc b/runtime/vm/stack_trace.cc
index a5c7bdd..671f58b 100644
--- a/runtime/vm/stack_trace.cc
+++ b/runtime/vm/stack_trace.cc
@@ -445,6 +445,25 @@
return Bool::Cast(is_sync).value();
}
+bool CallerClosureFinder::WasPreviouslySuspended(
+ const Function& function,
+ const Object& suspend_state_var) {
+ if (!suspend_state_var.IsSuspendState()) {
+ return false;
+ }
+ if (function.IsCompactAsyncFunction()) {
+ // Error callback is set after both 'then' and 'error' callbacks are
+ // registered with the Zone. Callback registration may query
+ // stack trace and should still collect the synchronous stack trace.
+ return SuspendState::Cast(suspend_state_var).error_callback() !=
+ Object::null();
+ } else if (function.IsCompactAsyncStarFunction()) {
+ return true;
+ } else {
+ UNREACHABLE();
+ }
+}
+
ClosurePtr StackTraceUtils::FindClosureInFrame(ObjectPtr* last_object_in_caller,
const Function& function) {
NoSafepointScope nsp;
@@ -488,7 +507,8 @@
zone, *reinterpret_cast<ObjectPtr*>(LocalVarAddress(
frame->fp(), runtime_frame_layout.FrameSlotForVariableIndex(
SuspendState::kSuspendStateVarIndex))));
- if (suspend_state.IsSuspendState()) {
+ if (caller_closure_finder->WasPreviouslySuspended(function,
+ suspend_state)) {
*is_async = true;
return caller_closure_finder->FindCallerFromSuspendState(
SuspendState::Cast(suspend_state));
diff --git a/runtime/vm/stack_trace.h b/runtime/vm/stack_trace.h
index 2e33b71..37df069 100644
--- a/runtime/vm/stack_trace.h
+++ b/runtime/vm/stack_trace.h
@@ -72,6 +72,11 @@
static bool IsRunningAsync(const Closure& receiver_closure);
+ // Tests if given [function] with given value of :suspend_state variable
+ // was suspended at least once and running asynchronously.
+ static bool WasPreviouslySuspended(const Function& function,
+ const Object& suspend_state_var);
+
private:
ClosurePtr FindCallerInternal(const Closure& receiver_closure);
ClosurePtr GetCallerInFutureListenerInternal(const Object& future_listener);
diff --git a/tests/ffi/vmspecific_static_checks_test.dart b/tests/ffi/vmspecific_static_checks_test.dart
index 47df844..a46983f 100644
--- a/tests/ffi/vmspecific_static_checks_test.dart
+++ b/tests/ffi/vmspecific_static_checks_test.dart
@@ -783,46 +783,6 @@
external Pointer<Uint8> notEmpty;
}
-class TestStruct1603 extends Struct {
- external Pointer<Uint8> notEmpty;
-}
-
-@Packed(1)
-class TestStruct1603Packed extends Struct {
- external Pointer<Uint8> notEmpty;
-
- external TestStruct1603 nestedNotPacked; //# 1603: compile-time error
-}
-
-@Packed(8)
-class TestStruct1604 extends Struct {
- external Pointer<Uint8> notEmpty;
-}
-
-@Packed(1)
-class TestStruct1604Packed extends Struct {
- external Pointer<Uint8> notEmpty;
-
- external TestStruct1604 nestedLooselyPacked; //# 1604: compile-time error
-}
-
-@Packed(1)
-class TestStruct1605Packed extends Struct {
- external Pointer<Uint8> notEmpty;
-
- @Array(2) //# 1605: compile-time error
- external Array<TestStruct1603> nestedNotPacked; //# 1605: compile-time error
-}
-
-@Packed(1)
-class TestStruct1606Packed extends Struct {
- external Pointer<Uint8> notEmpty;
-
- @Array(2) //# 1606: compile-time error
- external Array<TestStruct1604> //# 1606: compile-time error
- nestedLooselyPacked; //# 1606: compile-time error
-}
-
@Packed(0) //# 1607: compile-time error
class TestStruct1607 extends Struct {
external Pointer<Uint8> notEmpty;
diff --git a/tests/ffi_2/vmspecific_static_checks_test.dart b/tests/ffi_2/vmspecific_static_checks_test.dart
index cd0feaf..ec07492 100644
--- a/tests/ffi_2/vmspecific_static_checks_test.dart
+++ b/tests/ffi_2/vmspecific_static_checks_test.dart
@@ -783,45 +783,6 @@
Pointer<Uint8> notEmpty;
}
-class TestStruct1603 extends Struct {
- Pointer<Uint8> notEmpty;
-}
-
-@Packed(1)
-class TestStruct1603Packed extends Struct {
- Pointer<Uint8> notEmpty;
-
- TestStruct1603 nestedNotPacked; //# 1603: compile-time error
-}
-
-@Packed(8)
-class TestStruct1604 extends Struct {
- Pointer<Uint8> notEmpty;
-}
-
-@Packed(1)
-class TestStruct1604Packed extends Struct {
- Pointer<Uint8> notEmpty;
-
- TestStruct1604 nestedLooselyPacked; //# 1604: compile-time error
-}
-
-@Packed(1)
-class TestStruct1605Packed extends Struct {
- Pointer<Uint8> notEmpty;
-
- @Array(2) //# 1605: compile-time error
- Array<TestStruct1603> nestedNotPacked; //# 1605: compile-time error
-}
-
-@Packed(1)
-class TestStruct1606Packed extends Struct {
- Pointer<Uint8> notEmpty;
-
- @Array(2) //# 1606: compile-time error
- Array<TestStruct1604> nestedLooselyPacked; //# 1606: compile-time error
-}
-
@Packed(0) //# 1607: compile-time error
class TestStruct1607 extends Struct {
Pointer<Uint8> notEmpty;
@@ -883,6 +844,5 @@
class MyFinalizableStruct extends Struct
implements Finalizable //# 2000: compile-time error
{
- Pointer<Void> field;
+ Pointer<Void> field;
}
-
diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status
index 905ce63..6d0cacd4 100644
--- a/tests/standalone/standalone.status
+++ b/tests/standalone/standalone.status
@@ -7,6 +7,7 @@
# prefix.
io/http_close_stack_overflow_test: Skip # The test is heavy loaded. Should be used for manual test.
io/http_linklocal_ipv6_test: SkipByDesign # This needs manual test.
+io/large_file_read_small_file_test: Slow # Test reads small file 1M times
io/non_utf8_directory_test: Skip # Issue 33519. Temp files causing bots to go purple.
io/non_utf8_file_test: Skip # Issue 33519. Temp files causing bots to go purple.
io/non_utf8_link_test: Skip # Issue 33519. Temp files causing bots to go purple.
@@ -74,9 +75,6 @@
io/https_connection_closed_during_handshake_test: SkipByDesign # long_ssl_cert_evaluation needed for long handshake is only supported on mac.
io/https_nonblocking_trust_evaluation_test: SkipByDesign
-[ $system == windows ]
-io/large_file_read_small_file_test: Slow # Test reads small file 1M times
-
[ $builder_tag == swarming && $system == macos ]
io/*: Skip # Issue 30618
diff --git a/tests/standalone_2/standalone_2.status b/tests/standalone_2/standalone_2.status
index 5e3852e..fba85b6 100644
--- a/tests/standalone_2/standalone_2.status
+++ b/tests/standalone_2/standalone_2.status
@@ -7,6 +7,7 @@
# prefix.
io/http_close_stack_overflow_test: Skip # The test is heavy loaded. Should be used for manual test.
io/http_linklocal_ipv6_test: SkipByDesign # This needs manual test.
+io/large_file_read_small_file_test: Slow # Test reads small file 1M times
io/non_utf8_directory_test: Skip # Issue 33519. Temp files causing bots to go purple.
io/non_utf8_file_test: Skip # Issue 33519. Temp files causing bots to go purple.
io/non_utf8_link_test: Skip # Issue 33519. Temp files causing bots to go purple.
@@ -84,9 +85,6 @@
io/https_connection_closed_during_handshake_test: SkipByDesign # long_ssl_cert_evaluation needed for long handshake is only supported on mac.
io/https_nonblocking_trust_evaluation_test: SkipByDesign
-[ $system == windows ]
-io/large_file_read_small_file_test: Slow # Test reads small file 1M times
-
[ $builder_tag == swarming && $system == macos ]
io/*: Skip # Issue 30618
diff --git a/tools/OWNERS_WEB b/tools/OWNERS_WEB
index df81259..bdc6713 100644
--- a/tools/OWNERS_WEB
+++ b/tools/OWNERS_WEB
@@ -7,6 +7,7 @@
kevmoo@google.com
leonsenft@google.com
markzipan@google.com
+natebiggs@google.com
nshahan@google.com
rileyporter@google.com
sigmund@google.com
diff --git a/tools/VERSION b/tools/VERSION
index 7a6955c..83da292 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 18
PATCH 0
-PRERELEASE 174
+PRERELEASE 175
PRERELEASE_PATCH 0
\ No newline at end of file