Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: pkg/analyzer/test/src/summary/summary_common.dart

Issue 2661793002: Infer UnlinkedExprOperation.pushThis as dynamic. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_common.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/summary_common.dart
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 9e127057a4a4f7163e760a59c23d176448b7a8c8..44785cc525fc63593408ed8fd6a57fe39027fd1e 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -5961,6 +5961,16 @@ int foo(int a, String b) => 0;
]);
}
+ test_executable_param_isFinal() {
+ String text = 'f(x, final y) {}';
+ UnlinkedExecutable executable = serializeExecutableText(text);
+ expect(executable.parameters, hasLength(2));
+ expect(executable.parameters[0].name, 'x');
+ expect(executable.parameters[0].isFinal, isFalse);
+ expect(executable.parameters[1].name, 'y');
+ expect(executable.parameters[1].isFinal, isTrue);
+ }
+
test_executable_param_kind_named() {
UnlinkedExecutable executable = serializeExecutableText('f({x}) {}');
UnlinkedParam param = executable.parameters[0];
@@ -6021,16 +6031,6 @@ int foo(int a, String b) => 0;
}
}
- test_executable_param_isFinal() {
- String text = 'f(x, final y) {}';
- UnlinkedExecutable executable = serializeExecutableText(text);
- expect(executable.parameters, hasLength(2));
- expect(executable.parameters[0].name, 'x');
- expect(executable.parameters[0].isFinal, isFalse);
- expect(executable.parameters[1].name, 'y');
- expect(executable.parameters[1].isFinal, isTrue);
- }
-
test_executable_param_no_flags() {
UnlinkedExecutable executable = serializeExecutableText('f(x) {}');
expect(executable.parameters[0].isFunctionTyped, isFalse);
@@ -7709,6 +7709,18 @@ final v = f<int, String>();
]);
}
+ test_expr_this() {
+ if (skipNonConstInitializers) {
+ return;
+ }
+ UnlinkedVariable variable = serializeVariableText('''
+final v = this;
+''');
+ assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+ UnlinkedExprOperation.pushThis,
+ ]);
+ }
+
test_expr_throwException() {
if (skipNonConstInitializers) {
return;
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_common.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698