Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.6.2
-
None
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.