- 
    Bug 
- 
    Resolution: Done
- 
    P1: Critical 
- 
    5.15, 6.0, 6.1
- 
        7ea690c61dabd2485e80e7fae9aed392ba02c846 (qt/qtdeclarative/dev) b1e47b795e09a7834783a7418468f3cd184ef082 (qt/qtdeclarative/6.0) 703f41d5a51aacf4d481f49daea2b68d9ad5a797 (qt/qtdeclarative/6.1) 18b1e8266f (qt/tqtc-qtdeclarative/5.15-opensource)
import QtQuick 2.15 Rectangle { id: fileContainer property real a: 42 property real b: 0 function f(myfunc) { let gen = myfunc(); gen["u"] = 0 console.log(gen.next().value) } function refreshA() { f(function*() { b= 12; return a }); } TapHandler { onTapped:() => {fileContainer.refreshA(); console.log(fileContainer.b)} } }
leads to a crash.
- resulted from
- 
                    QTBUG-91481 Generator functions can't access properties -           
- Closed
 
-         
| For Gerrit Dashboard: QTBUG-91491 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 337591,3 | qv4generatorobject: Fix crash when creating new properties | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 | 
| 337922,2 | qv4generatorobject: Fix crash when creating new properties | 6.1 | qt/qtdeclarative | Status: MERGED | +2 | 0 | 
| 337923,2 | qv4generatorobject: Fix crash when creating new properties | 6.0 | qt/qtdeclarative | Status: MERGED | +2 | 0 | 
| 337924,2 | qv4generatorobject: Fix crash when creating new properties | tqtc/lts-5.15 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |