Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.7.0 FF
-
None
-
b7f4779cc (dev), 8bf5aae19 (dev)
Description
Consider:
import QtQml QtObject { id: mainItem function a(item: Binding) : QtObject { return item } Component.onCompleted: console.log(a(mainItem)); }
This correctly prints 'null' when interpreted, but it prints the object when compiled. This is because the type for item cannot be expressed at compile time. We would need to use private API or construct the metatype from name.
It follows that we cannot use the QMetaTypes stored in the CU for enforcement of type annotations. We rather have to use the names like we do for the JS-to-JS coercion.
Attachments
Issue Links
- relates to
-
QTBUG-119395 crash on QML property bindings
-
- Closed
-
-
QTBUG-129241 Crash at QV4::Value::as<T>
-
- Closed
-