Index: tests/compiler/dart2js/metadata_test.dart |
diff --git a/tests/compiler/dart2js/metadata_test.dart b/tests/compiler/dart2js/metadata_test.dart |
index ab302ebf960390b577db4f90d0068c9fdb86c55b..1c7f596f7e751c3dd7e83333c3f3884eab53ab7d 100644 |
--- a/tests/compiler/dart2js/metadata_test.dart |
+++ b/tests/compiler/dart2js/metadata_test.dart |
@@ -6,6 +6,8 @@ import "package:expect/expect.dart"; |
import "package:async_helper/async_helper.dart"; |
import 'compiler_helper.dart'; |
import 'parser_helper.dart'; |
+import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' |
+ show PrimitiveConstant; |
void checkPosition(Spannable spannable, Node node, String source, compiler) { |
SourceSpan span = compiler.spanFromSpannable(spannable); |
@@ -34,7 +36,7 @@ void checkAnnotation(String name, String declaration, |
'Unexpected metadata count on $element.'); |
PartialMetadataAnnotation annotation = element.metadata.head; |
annotation.ensureResolved(compiler); |
- Constant value = annotation.value; |
+ PrimitiveConstant value = annotation.value; |
Expect.stringEquals('xyz', value.value.slowToString()); |
checkPosition(annotation, annotation.cachedNode, source1, compiler); |
@@ -57,8 +59,8 @@ void checkAnnotation(String name, String declaration, |
Expect.isFalse(identical(annotation1, annotation2), |
'expected unique instances'); |
Expect.notEquals(annotation1, annotation2, 'expected unequal instances'); |
- Constant value1 = annotation1.value; |
- Constant value2 = annotation2.value; |
+ PrimitiveConstant value1 = annotation1.value; |
+ PrimitiveConstant value2 = annotation2.value; |
Expect.identical(value1, value2, 'expected same compile-time constant'); |
Expect.stringEquals('xyz', value1.value.slowToString()); |
Expect.stringEquals('xyz', value2.value.slowToString()); |
@@ -87,7 +89,7 @@ void checkAnnotation(String name, String declaration, |
Expect.equals(1, length(element.metadata)); |
PartialMetadataAnnotation annotation = element.metadata.head; |
annotation.ensureResolved(compiler); |
- Constant value = annotation.value; |
+ PrimitiveConstant value = annotation.value; |
Expect.stringEquals('xyz', value.value.slowToString()); |
checkPosition(annotation, annotation.cachedNode, source3, compiler); |
@@ -116,8 +118,8 @@ void checkAnnotation(String name, String declaration, |
Expect.isFalse(identical(annotation1, annotation2), |
'expected unique instances'); |
Expect.notEquals(annotation1, annotation2, 'expected unequal instances'); |
- Constant value1 = annotation1.value; |
- Constant value2 = annotation2.value; |
+ PrimitiveConstant value1 = annotation1.value; |
+ PrimitiveConstant value2 = annotation2.value; |
Expect.identical(value1, value2, 'expected same compile-time constant'); |
Expect.stringEquals('xyz', value1.value.slowToString()); |
Expect.stringEquals('xyz', value2.value.slowToString()); |
@@ -169,7 +171,7 @@ void testLibraryTags() { |
PartialMetadataAnnotation annotation = metadata.head; |
annotation.ensureResolved(compiler); |
- Constant value = annotation.value; |
+ PrimitiveConstant value = annotation.value; |
Expect.stringEquals('xyz', value.value.slowToString()); |
checkPosition(annotation, annotation.cachedNode, source, compiler); |