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

Unified Diff: lib/src/codegen/js_codegen.dart

Issue 1580803002: Fixes #410 (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 4 years, 11 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 | « lib/runtime/dart/math.js ('k') | test/codegen/expect/collection/src/unmodifiable_wrappers.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/js_codegen.dart
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
index a411957c9e51b597054c81dfdf3a415c5cd7dc35..dc64c5bb8d44c6ac9f0f03f52a83d044e09f708f 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -3423,8 +3423,12 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ClosureAnnotator {
}
// Dart "extension" methods. Used for JS Array, Boolean, Number, String.
+ var baseType = type;
+ while (baseType is TypeParameterType) {
+ baseType = baseType.element.bound;
+ }
if (allowExtensions &&
- _extensionTypes.contains(type.element) &&
+ _extensionTypes.contains(baseType.element) &&
!_isObjectProperty(name)) {
return js.call('dartx.#', _propertyName(name));
}
« no previous file with comments | « lib/runtime/dart/math.js ('k') | test/codegen/expect/collection/src/unmodifiable_wrappers.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698