Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0
-
None
-
Ia4b99d3c58c4482e9505cf2461bd14942a9a00ca
Description
The return value from a function assigned to a property var (only declarative style) is always undefined. See the code snippet below
import QtQuick 2.0 Rectangle { width: 360 height: 360 property var f1 : function () { console.log("Test case 1"); return 100; } property var f2; function testcase2() { console.log("Test case 2"); return 200; } Component.onCompleted: { f2 = testcase2; console.log('f1 :'+f1); console.log('f2 :'+f2); } }
Attachments
For Gerrit Dashboard: QTBUG-25901 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
27108,2 | Don't rewrite the body of function expressions | master | qt/qtdeclarative | Status: MERGED | +2 | 0 |