outfoxx / swiftpoet

Kotlin and Java API for generating .swift source files.
Apache License 2.0
284 stars 27 forks source link

Is there a way to add 'weak' modifier to a property? #58

Closed rjuszczyk closed 2 years ago

rjuszczyk commented 2 years ago

Is there a way to add 'weak' modifier to a property?

kdubb commented 2 years ago

There is not. This needs to be added.

kdubb commented 2 years ago

@rjuszczyk Two new modifiers were added, WEAK and UNOWNED that can be used on mutable PropertySpecs.

For example:

val property = PropertySpec.varBuilder("test", STRING, UNOWNED)