outfoxx / swiftpoet

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

Add convenience modifier #92

Closed dnkoutso closed 9 months ago

dnkoutso commented 9 months ago

closes https://github.com/outfoxx/swiftpoet/issues/83

An alternative implementation is to pass a boolean in constructorBuilder() of FunctionSpec. Not sure if this is the recommended way and happy to do that instead. I guess the problem is that a func can never be marked as convenience but there are other modifiers which can cause a problem anyway so I think the current solution is fine.