Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.0
-
28d133a8a779f9bf1432a6003456b62f74b3c492 (qt/qtdeclarative/dev) 1c6ddb892d7570728e6a9d07b572a2a8e3defb36 (qt/qtdeclarative/6.2)
Description
Look at the following code:
import QtQuick 2.6 Item { property alias currentText: myText.text readonly property string currentText: myText.text //readonly property string currentText: myText.text Text { id: myText text: "hello" } }
Note that it defines currentText twice. Once as an alias, once as a property. Notice that it runs without error, which already seems very questionable/wrong.
Then uncomment the second declaration, and notice that it does correctly error in that case:
test.qml:6 Duplicate property name