Index: pkg/analyzer/test/src/summary/linker_test.dart |
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart |
index 2a0706c880be4740492206342a238de8ba2cd721..cd70c5dac03aaaf0a7a4a2f8de82a2d6ce799972 100644 |
--- a/pkg/analyzer/test/src/summary/linker_test.dart |
+++ b/pkg/analyzer/test/src/summary/linker_test.dart |
@@ -351,6 +351,20 @@ var y = C.x; |
'(D) → E'); |
} |
+ void test_inferredType_instanceField_conditional_genericFunctions() { |
+ createLinker(''' |
+class C { |
+ final f = true ? <T>(T t) => 0 : <T>(T t) => 1; |
+} |
+'''); |
+ LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); |
+ library.libraryCycleForLink.ensureLinked(); |
+ ClassElementForLink_Class cls = library.getContainedName('C'); |
+ expect(cls.fields, hasLength(1)); |
+ var field = cls.fields[0]; |
+ expect(field.type.toString(), '(<bottom>) → dynamic'); |
+ } |
+ |
void test_inferredType_instanceField_dynamic() { |
createLinker(''' |
var x; |