Index: pkg/compiler/lib/src/constants/constructors.dart |
diff --git a/pkg/compiler/lib/src/constants/constructors.dart b/pkg/compiler/lib/src/constants/constructors.dart |
index b8e747114d3d3ec88f60f3e2b33aa38f93f88b01..c0e09b699f78026b65041158d6914297053b5558 100644 |
--- a/pkg/compiler/lib/src/constants/constructors.dart |
+++ b/pkg/compiler/lib/src/constants/constructors.dart |
@@ -99,13 +99,13 @@ class GenerativeConstantConstructor implements ConstantConstructor { |
StringBuffer sb = new StringBuffer(); |
sb.write("{'type': $type"); |
defaultValues.forEach((key, ConstantExpression expression) { |
- sb.write(",\n 'default:${key}': ${expression.getText()}"); |
+ sb.write(",\n 'default:${key}': ${expression.toDartText()}"); |
}); |
fieldMap.forEach((FieldElement field, ConstantExpression expression) { |
- sb.write(",\n 'field:${field}': ${expression.getText()}"); |
+ sb.write(",\n 'field:${field}': ${expression.toDartText()}"); |
}); |
if (superConstructorInvocation != null) { |
- sb.write(",\n 'constructor: ${superConstructorInvocation.getText()}"); |
+ sb.write(",\n 'constructor: ${superConstructorInvocation.toDartText()}"); |
} |
sb.write("}"); |
return sb.toString(); |
@@ -189,9 +189,9 @@ class RedirectingGenerativeConstantConstructor implements ConstantConstructor { |
StringBuffer sb = new StringBuffer(); |
sb.write("{'type': ${thisConstructorInvocation.type}"); |
defaultValues.forEach((key, ConstantExpression expression) { |
- sb.write(",\n 'default:${key}': ${expression.getText()}"); |
+ sb.write(",\n 'default:${key}': ${expression.toDartText()}"); |
}); |
- sb.write(",\n 'constructor': ${thisConstructorInvocation.getText()}"); |
+ sb.write(",\n 'constructor': ${thisConstructorInvocation.toDartText()}"); |
sb.write("}"); |
return sb.toString(); |
} |
@@ -237,7 +237,7 @@ class RedirectingFactoryConstantConstructor implements ConstantConstructor { |
String toString() { |
StringBuffer sb = new StringBuffer(); |
sb.write("{"); |
- sb.write("'constructor': ${targetConstructorInvocation.getText()}"); |
+ sb.write("'constructor': ${targetConstructorInvocation.toDartText()}"); |
sb.write("}"); |
return sb.toString(); |
} |