Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-104751

Can't have type annotations and default arguments

    XMLWordPrintable

Details

    • All

    Description

      This basic function with a default argument works both interpreted and compiled:

      function f(a = true) { } 

      Adding a type annotation like so

      function f(a : bool = true) { } 

      breaks the interpreted run:

      qml: Type annotations are not supported (yet). 

      But worse yet, qmlsc silently crashes on this line.

      Attachments

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              rgriebl Robert Griebl
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes