发现懒加载属性不能赋值。
- Dominant language
- Swift
- Stars
- 4.3k
- Forks
- 677
- PR merge metrics
- No merged PRs in 30d
Description
```swift
class MnlModel: HandyJSON {
lazy var advert = [[String: Any]]()
required init() {}
}
```
```swift
let dict = ["m_url": "http://m.meinali.com/ap_show-113.html",
"pid": 113,
"title": "俏佳人无痕美鼻免费案例征集——长沙雅美"]
if let model = MnlRecommendModel.deserialize(from: dict) {
print(model.advert)
// []
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the MnlModel example with HandyJSON's deserialize(from:) entry point and confirm that the lazy advert property remains an empty array. Trace how deserialization discovers and assigns properties, then add a regression test showing the expected dictionary value is preserved for lazy properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100