Index: sdk/lib/_internal/compiler/js_lib/js_helper.dart |
diff --git a/sdk/lib/_internal/compiler/js_lib/js_helper.dart b/sdk/lib/_internal/compiler/js_lib/js_helper.dart |
index 58ead91eccca459b81a8b306ed7d8bb499710967..0421f365610b92aea8b99935f2183ec95cbb9855 100644 |
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart |
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart |
@@ -92,6 +92,15 @@ part 'linked_hash_map.dart'; |
abstract class InternalMap { |
} |
+/// Extracts the classname from the isCheckProperty. |
+// TODO(floitsch): move this to foreign_helper.dart or similar. |
+@ForceInline() |
+String classNameFromIsCheckProperty(String isCheckProperty) { |
+ return JS_BUILTIN('returns:String;depends:none;effects:none', |
+ JsBuiltin.classNameFromIsCheckProperty, |
+ isCheckProperty); |
+} |
+ |
/// Returns true if the given [type] is a function type object. |
// TODO(floitsch): move this to foreign_helper.dart or similar. |
@ForceInline() |
@@ -2823,8 +2832,7 @@ intTypeCast(value) { |
} |
void propertyTypeError(value, property) { |
- // Cuts the property name to the class name. |
- String name = property.substring(3, property.length); |
+ String name = classNameFromIsCheckProperty(property); |
throw new TypeErrorImplementation(value, name); |
} |