Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
6.5
-
None
Description
import QtQml QtObject { function f(a: Main.Whatever) : int { return 1 } Component.onCompleted: console.log(f(1)) }
The type annotation does not make sense. (I stumbled upon this while working on https://bugreports.qt.io/browse/QTBUG-135255) However, this code generates a dependency cycle warning at runtime and does not execute f.
qt.qml.typeresolution.cycle: Cyclic dependency detected between "qrc:/qt/qml/Truc/Main.qml" and "qrc:/qt/qml/Truc/Main.qml"
Removing the type annotation or replacing it with int fixes the issue.
This does not reproduce in 6.8 or later.