Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.6.1
-
None
Description
import QtQuick Window { onWidthChanged: function(): void{ console.log(width) } // error function fn(): void { } }
In the above code, it seems that type annotation in the signal handler of onWidthChanged is not allowed.
Error compiling qml file: .../Main.qml:4:31: error: Type annotations are not permitted for the return value of JavaScript functions
However, as far as I know, QML allows type annotation and utilizes it for optimzation like the function `fn()`.