Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.4.1, 6.5
Description
Having code like
Window { width: 640 height: 480 visible: true title: qsTr("Hello World") function grumble(info, popup = true) { console.log(info, popup) } }
and
Item {
function wohoooo(info : string, popup : bool = true) {
console.log(info, popup)
}
}
runs into contradictionary messages like
Error compiling qml file: /home/prcs1076/tmp/loader/Foo.qml:4:43: error: Type annotations are not supported (yet). [12/21 112.6/sec] Generating .rcc/qmlcache/apploader_main_qml.cpp Error: main.qml:9:5: Could not compile function grumble: Functions without type annotations won't be compiled function grumble(info, popup = true) { ^^^^^^^^^ ninja: build stopped: subcommand failed.
.
Removing the = true works.
Attachments
Issue Links
- duplicates
-
QTBUG-104751 Can't have type annotations and default arguments
- Open