Open GoogleCodeExporter opened 8 years ago
Here is a minor tweak that will fall through to default cast if no coercion is
performed
Index: Base.js
===================================================================
--- Base.js (revision 310)
+++ Base.js (working copy)
@@ -23,6 +23,13 @@
delete this.__constructing;
} else {
// Casting.
+ var cls = _class;
+ do {
+ if (cls.coerce) {
+ var cast = cls.coerce.call(_class, arguments[0]);
+ if (cast) return cast;
+ }
+ } while ((cls = cls.ancestor) && (cls != Base));
return extend(arguments[0], _prototype);
}
}
Original comment by cneuw...@gmail.com
on 15 Jul 2014 at 12:11
Attachments:
Original issue reported on code.google.com by
cneuw...@gmail.com
on 14 Jul 2014 at 6:56Attachments: