Why propertyWrapper composition doesn't work for func local var?

@propertyWrapper
struct A<T> {
    var wrappedValue: T
}

@propertyWrapper
struct B<T> {
    var wrappedValue: T
}

struct Foo {
    @A @B var vv = 1    // <== works here
}

func foo() {
    @A @B var vv = 1    // error: closure captures '_vv' before it is declared
}

I can't reproduce the mentioned error using the latest development snapshot.

Terms of Service

Privacy Policy

Cookie Policy