Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-34983

Variables get annotated incorrectly when the class name contains "String"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Apache FlexJS 0.5.0
    • Apache FalconJX 0.6.0
    • Falcon, FlexJS
    • None

    Description

      If you create a class with "String" in the name, the type gets annotated incorrectly.

      For example, create a class named "LinkableString" and it becomes "Linkablestring" in the annotation, causing warnings as follows:

      AS Input:

      var test:LinkableString = new LinkableString();
      

      JS Output:

      WARNING: C:\Weave\WeaveJS\bin\js-debug\WeaveTest.js:74: WARNING - Bad type annotation. Unknown type weavejs.core.Linkablestring
        var /** @type {weavejs.core.Linkablestring} */ test = new weavejs.core.LinkableString();
      

      I believe the offending code is in mapBackToJS() in BaseReference.java:

      https://github.com/apache/flex-falcon/blob/808fd1601a0228883b06d061d0f6bd101888284e/compiler.jx/src/org/apache/flex/compiler/internal/codegen/externals/reference/BaseReference.java#L201

      Attachments

        Activity

          People

            aharui Alex Harui
            adufilie Andy Dufilie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: