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

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

Issue 2745283007: Fix also type inference for enum method invocation. (Closed)
Patch Set: Created 3 years, 9 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/lib/src/summary/link.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/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 5cbe2e9ead90d02675119aeee2da76ddd8440c8b..5d2a096d9443d7383f305e0560d3e781f2b37a68 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -5483,6 +5483,36 @@ final dynamic vIndex;
}
}
+ test_constExpr_pushReference_enum_method() {
+ var library = checkLibrary('''
+enum E {a}
+final vToString = E.a.toString();
+''');
+ if (isStrongMode) {
+ checkElementText(
+ library,
+ r'''
+enum E {
+ final int index;
+ static const List<E> values;
+ static const E a;
+}
+final String vToString;
+''');
+ } else {
+ checkElementText(
+ library,
+ r'''
+enum E {
+ final int index;
+ static const List<E> values;
+ static const E a;
+}
+final dynamic vToString;
+''');
+ }
+ }
+
test_constExpr_pushReference_field_simpleIdentifier() {
var library = checkLibrary('''
class C {
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698