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

Can't have type annotations and default arguments

XMLWordPrintable

    • All
    • 5a40388db (dev), 64bb083e6 (6.9), f43859de9 (6.8)

      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.

        For Gerrit Dashboard: QTBUG-104751
        # Subject Branch Project Status CR V

            ulherman Ulf Hermann
            rgriebl Robert Griebl
            Votes:
            5 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: