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

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

Issue 2016543002: Resynthesize FieldFormalParameterElementImpl(s) lazily. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
Index: pkg/analyzer/test/src/summary/resynthesize_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
index b10409218548892fd406097d86d182063763cefd..92300abbdc73ced899be02d49f24f4b186ee5e22 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -676,7 +676,13 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
// any evaluation result.
expect(rImpl.evaluationResult, isNull);
} else {
- expect(rImpl.runtimeType, oImpl.runtimeType);
+ Type rRuntimeType;
+ if (rImpl is FunctionElementImpl) {
+ rRuntimeType = FunctionElementImpl;
+ } else {
+ rRuntimeType = rImpl.runtimeType;
+ }
+ expect(rRuntimeType, oImpl.runtimeType);
}
expect(resynthesized.kind, original.kind);
expect(resynthesized.location, original.location, reason: desc);
@@ -3416,14 +3422,6 @@ Stream s;
checkLibrary('import "a.dart"; import "b.dart"; C c; D d;');
}
- void test_inferedType_usesSyntheticFunctionType_functionTypedParam() {
- checkLibrary('''
-int f(int x(String y)) => null;
-String g(int x(String y)) => null;
-var v = [f, g];
-''');
- }
-
test_inferred_function_type_for_variable_in_generic_function() {
// In the code below, `x` has an inferred type of `() => int`, with 2
// (unused) type parameters from the enclosing top level function.
@@ -3574,6 +3572,14 @@ var v = f(g: (x, y) {});
' abstract class D { void set f(int g(String s)); }');
}
+ void test_inferredType_usesSyntheticFunctionType_functionTypedParam() {
+ checkLibrary('''
+int f(int x(String y)) => null;
+String g(int x(String y)) => null;
+var v = [f, g];
+''');
+ }
+
test_initializer_executable_with_return_type_from_closure() {
checkLibrary('var v = () => 0;');
}

Powered by Google App Engine
This is Rietveld 408576698