Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.4.0 Beta1
Description
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.
Attachments
Issue Links
- is duplicated by
-
QTBUG-105547 [QML] Default parameters with type annotations not supported
-
- Closed
-
-
QTBUG-101007 It should be possible to type javascript rest parameters
-
- Closed
-
-
QTBUG-123477 Allow typed functions to work with default parameters
-
- Closed
-
- relates to
-
QTBUG-98195 Default function arguments have the wrong scope
-
- Open
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-104751 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
420177,1 | WIP: Half-support arguments with type annotations and default values | dev | qt/qtdeclarative | Status: DEFERRED | -2 | 0 |