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
Attachments
For Gerrit Dashboard: QTBUG-94456 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
354218,3 | Disallow alias property and normal property having the same name | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
354299,1 | Disallow alias property and normal property having the same name | 6.1 | qt/qtdeclarative | Status: ABANDONED | 0 | 0 |
354300,3 | Disallow alias property and normal property having the same name | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
354301,1 | Disallow alias property and normal property having the same name | tqtc/lts-5.15 | qt/tqtc-qtdeclarative | Status: ABANDONED | 0 | 0 |