2 Replies Latest reply on Jun 2, 2009 12:34 PM by piercer2

    Wrong Error


      I have the following code in a class


      var nodes:Vector.<Node> = collection.getParents();

      var parentCategory:Node = nodes[nodes.length-2];


      Flash Builder 4 reports the following error


      Description Resource Path Location Type

      1067: Implicit coercion of a value of type org.fwp.models:Node to an unrelated type org.fwp.models:Node. TitleBarMediator.as FWGCollectionViewer(SVN)/src/org/fwg/collectionviewer/view/titlebar line 56 Flex Problem

      Node is a model class and getParents does return a vector of nodes.
      Flex Builder 3 correctly did not point out any errors in this code.
      So is this a bug?

        • 1. Re: Wrong Error
          Jason San Jose Adobe Employee

          Hi Conrad,


          That does seem a bit odd. Anyhow, it would be a SDK 4 compiler bug against mxmlc and/or compc, not Flash Builder.


          Where is the AS type for your "collections" variable defined? Could it be that you have 2 different versions of org.fwp.models.Node in your library path? I tried a trivial example with only the SDK in my library path and saw no errors.


          Jason San Jose

          Quality Engineer, Flash Builder

          • 2. Re: Wrong Error
            piercer2 Level 1

            Thanks, it was exactly that - a project and a swc file conflicting.