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 c7c4c895252bf5b033439c781398343b2087cb29..a64639106df7cc0186fcffa08a2d51ecc0f340db 100644 |
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart |
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart |
@@ -69,6 +69,11 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest { |
*/ |
bool get isStrongMode; |
+ /** |
+ * Return `true` if shared front-end is used. |
+ */ |
+ bool get isSharedFrontEnd => false; |
+ |
void addLibrary(String uri) { |
otherLibrarySources.add(context.sourceFactory.forUri(uri)); |
} |
@@ -3599,7 +3604,17 @@ class C { |
const int v = C.F.length; |
'''); |
if (isStrongMode) { |
- checkElementText(library, r''' |
+ if (isSharedFrontEnd) { |
+ checkElementText(library, r''' |
+class C { |
+ static const String F = ''; |
+} |
+const int v = |
+ F/*location: test.dart;C;F?*/. |
Paul Berry
2017/07/18 18:00:14
I'm ok with not resynthesizing identifiers associa
scheglov
2017/07/18 19:01:11
Done.
|
+ length/*location: dart:core;String;length?*/; |
+'''); |
+ } else { |
+ checkElementText(library, r''' |
class C { |
static const String F = ''; |
} |
@@ -3608,6 +3623,7 @@ const int v = |
F/*location: test.dart;C;F?*/. |
length/*location: dart:core;String;length?*/; |
'''); |
+ } |
} else { |
checkElementText(library, r''' |
class C { |
@@ -3686,10 +3702,17 @@ const int v = |
const v = 'abc'.length; |
'''); |
if (isStrongMode) { |
- checkElementText(library, r''' |
+ if (isSharedFrontEnd) { |
+ checkElementText(library, r''' |
+const int v = 'abc'. |
+ length/*location: dart:core;String;length?*/; |
+'''); |
+ } else { |
+ checkElementText(library, r''' |
const dynamic v/*error: instanceGetter*/ = 'abc'. |
length/*location: dart:core;String;length?*/; |
'''); |
+ } |
} else { |
checkElementText(library, r''' |
const dynamic v = 'abc'. |
@@ -3704,12 +3727,21 @@ const String S = 'abc'; |
const v = S.length; |
'''); |
if (isStrongMode) { |
- checkElementText(library, r''' |
+ if (isSharedFrontEnd) { |
+ checkElementText(library, r''' |
+const String S = 'abc'; |
+const int v = |
+ S/*location: test.dart;S?*/. |
+ length/*location: dart:core;String;length?*/; |
+'''); |
+ } else { |
+ checkElementText(library, r''' |
const String S = 'abc'; |
const dynamic v/*error: instanceGetter*/ = |
S/*location: test.dart;S?*/. |
length/*location: dart:core;String;length?*/; |
'''); |
+ } |
} else { |
checkElementText(library, r''' |
const String S = 'abc'; |