flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [2/6] git commit: [flex-asjs] [refs/heads/develop] - allow Number in is/as checks
Date Sat, 24 May 2014 15:42:37 GMT
allow Number in is/as checks


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/086d3639
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/086d3639
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/086d3639

Branch: refs/heads/develop
Commit: 086d36395cd8944793e85ece05da9d24beff2e2d
Parents: ed2b78f
Author: Alex Harui <aharui@apache.org>
Authored: Sat May 24 08:37:06 2014 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Sat May 24 08:37:06 2014 -0700

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/086d3639/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
index 2d43ecb..619edb1 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
@@ -121,6 +121,10 @@ org.apache.flex.utils.Language.is = function(leftOperand, rightOperand)
{
       (leftOperand instanceof /** @type {Object} */(rightOperand))) {
     return true;
   }
+  if ((rightOperand === Number && typeof leftOperand === 'number') ||
+    (leftOperand instanceof /** @type {Object} */(rightOperand))) {
+    return true;
+  }
 
   if (leftOperand.FLEXJS_CLASS_INFO.interfaces) {
     if (checkInterfaces(leftOperand)) {


Mime
View raw message