flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Harui (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLEX-34989) String literals cross-compile incorrectly
Date Mon, 21 Dec 2015 19:48:46 GMT

     [ https://issues.apache.org/jira/browse/FLEX-34989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alex Harui resolved FLEX-34989.
-------------------------------
       Resolution: Fixed
    Fix Version/s: Apache FalconJX 0.6.0

3b19a07370e2c8daf2610e217bcbe16c53c9b19e

> String literals cross-compile incorrectly
> -----------------------------------------
>
>                 Key: FLEX-34989
>                 URL: https://issues.apache.org/jira/browse/FLEX-34989
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Falcon, FlexJS
>    Affects Versions: Apache FlexJS 0.5.0
>            Reporter: Andy Dufilie
>            Assignee: Alex Harui
>             Fix For: Apache FalconJX 0.6.0
>
>
> String literals containing escaped quotes and unicode characters compile incorrectly.
> AS input:
> {code}
> public static function test1():String {
> 	return " ' \" ";
> }
> public static function test2():String {
> 	return ' \' " ';
> }
> public static function test3():String {
> 	return "\u2028";
> }
> {code}
> Incorrect JS output:
> {code}
> WeaveTest.test1 = function() {
>   return " ' " ";
> };
> WeaveTest.test2 = function() {
>   return ' ' " ';
> };
> WeaveTest.test3 = function() {
>   return "
> ";
> };
> {code}
> Error messages:
> {code}
> Dec 11, 2015 3:23:30 PM com.google.javascript.jscomp.LoggerErrorManager println
> SEVERE: C:\Weave\WeaveJS\bin\js-debug\WeaveTest.js:74: ERROR - Parse error. Unterminated
string literal
>   return " ' " ";
>                ^
> Dec 11, 2015 3:27:44 PM com.google.javascript.jscomp.LoggerErrorManager println
> SEVERE: C:\Weave\WeaveJS\bin\js-debug\WeaveTest.js:74: ERROR - Parse error. Unterminated
string literal
>   return ' ' " ';
>              ^
> Dec 11, 2015 2:27:32 PM com.google.javascript.jscomp.LoggerErrorManager println
> SEVERE: /home/pkovac/Source/Weave/WeaveJS/bin/js-debug/weavejs/util/StandardLib.js:313:
ERROR - Parse error. Unterminated string literal
>    return "

> ";
> {code}
> That last error only appears when building on Linux.
> It looks like the offending code is getStringLiteralContent() in JSGeneratingReducer.java:
> https://github.com/apache/flex-falcon/blob/808fd1601a0228883b06d061d0f6bd101888284e/compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSGeneratingReducer.java#L1865



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message