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

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

Issue 1711873002: Fix for summarizing typedef typed parameters. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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_test.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 de38e8ee03851d0610d7a955ba24df2de5e23bb6..7b374da6d19ec53cccb15e0b8f89baf128b94afd 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -4399,7 +4399,7 @@ get g { // 1
test_executable_param_function_typed_return_type_implicit() {
if (!checkAstDerivedData) {
// TODO(paulberry): this test fails when building the summary from the
- // element model because the elment model doesn't record whether a
+ // element model because the element model doesn't record whether a
// function-typed parameter's return type is implicit.
return;
}
@@ -4512,6 +4512,16 @@ int foo(int a, String b) => 0;
expect(executable.parameters[0].type, isNull);
}
+ test_executable_param_type_typedef() {
+ UnlinkedExecutable executable = serializeExecutableText(r'''
+typedef MyFunction(int p);
+f(MyFunction myFunction) {}
+''');
+ expect(executable.parameters[0].isFunctionTyped, isFalse);
+ checkTypeRef(executable.parameters[0].type, null, null, 'MyFunction',
+ expectedKind: ReferenceKind.typedef);
+ }
+
test_executable_return_type() {
UnlinkedExecutable executable = serializeExecutableText('int f() => 1;');
checkTypeRef(executable.returnType, 'dart:core', 'dart:core', 'int');
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698