Closed dnkoutso closed 6 months ago
@kdubb any ideas would be greatly appreciated, or hints...
Seems somehow that resolve
returns back a type in the failing test.
Notice resolved came back as Parent.Element
In the passing test case this does not resolve to anything which then calls importableType(typeName)
and adds the import to the suggested import types...
@dnkoutso I'll have a look at this tonight
Thanks @kdubb !
@kdubb sorry for the additional ping, was hoping for any guidance on this. Currently it can cause an error in Wire output with a missing import.
Thanks again and apologies
Would love an update here as this is currently blocking us.
Given test:
Branch: https://github.com/outfoxx/swiftpoet/compare/extension_import_bug?expand=1
Seems related to https://github.com/outfoxx/swiftpoet/pull/55
It seems when using
obsElement
as the extension type imports are emitted correctly which is why the test that was added in #55 passes correctly.When removing:
Things start working, perhaps this is meant to check an additional condition? I am still getting familiarized with this code @kdubb
cc @lickel