uber / needle

Compile-time safe Swift dependency injection framework
Apache License 2.0
1.84k stars 144 forks source link

Needle's parsing of Component's properties is going "too deep" #454

Closed rudro closed 1 year ago

rudro commented 1 year ago

Given a class like

class RootComponent {
    var message: String {
        let name: String = "Alice"
        return "Hello" + name
    }
}

needle should only consider the message var. Unfortunately, today, the name var is also considered as a property available on RootComponent.

We need to limit the variable parsing to just one level to avoid this issue.