This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 6e0f119 Language.string() without a cast and without coercion by the
compiler (references apache/royale-compiler#74)
6e0f119 is described below
commit 6e0f1198138fede5a54e15dcad37dac0b7ba20c2
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue Jan 29 11:28:02 2019 -0800
Language.string() without a cast and without coercion by the compiler
(references apache/royale-compiler#74)
---
.../Language/src/main/royale/org/apache/royale/utils/Language.as | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
b/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
index 89d391d..233583f 100644
---
a/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
+++
b/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
@@ -106,13 +106,16 @@ package org.apache.royale.utils
/**
* string()
- * @royaleignorecoercion String
* @param value The value to be cast.
* @return {string}
*/
static public function string(value:*):String
{
- return (value == null ? null : value.toString()) as
String;
+ if(value == null)
+ {
+ return null;
+ }
+ return String(value);
}
/**