Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.6.2
-
None
-
-
5204751af (dev), 56f8a5c45 (6.9), ea1700d00 (6.8), 7e0f1caec (tqtc/lts-6.5)
Description
The docs say:
Function declarations in QML documents can, and should, contain type annotations.
https://doc.qt.io/qt-6/qtqml-javascript-hostenvironment.html#type-annotations-and-assertions
But QML using annotations fails to parse:
import QtQuick import QtWebEngine WebEngineView { id: webView url: "https://www.qt.io" onAudioMutedChanged: function (muted: bool) {} }
$ qml /tmp/web.qml QQmlApplicationEngine failed to load component [file:///tmp/web.qml:8:41:] Type annotations are not permitted in function parameters in JavaScript functions qml: Did not load any objects, exiting.