Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1205

outer.concat fails inside Properties block

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 1.10.0
    • 1.9.0
    • General
    • None
    • 6d568728aceb0beda1545706fe70450333410c86

    Description

      This was originally reported as -QBS-270-, but because that was about version 0.3 and we are now at 1.9 and since then at least the documentation has changed, I made a new report.

      outer.concat() fails inside a Properties block when 'outer' depends on a property set in the outside scope.

      ERROR: /home/tvanengelen/Sources/QbsCppDefinesExample/QbsCppDefinesExample.qbs:14:5 ReferenceError: Can't find variable: foo

      Example:

      import qbs 1.0
      
      CppApplication {
        name: "outerconcat"
      
        Depends { name: "cpp" }
        
        files: [
          'main.cpp'
        ]
      
        property string foo: "foo"
        
        cpp.includePaths: [ foo ]
        
        Properties {
          condition: true
          cpp.includePaths: outer.concat([ "bar" ])
        }
      }
      

      When

        cpp.includePaths: [ foo ] 

      is changed to

        cpp.includePaths: [ "foo" ] 

      there is no error and everything works as expected.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jbornema Joerg Bornemann
              ThiemoVanEngelen Thiemo van Engelen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes