It seems like extending interfaces or abstract cla...
# compose
a
It seems like extending interfaces or abstract classes containing @Composable annotations has a regression in dev-06+. I have an use case where I have an interface
interface Foo { val view: @Composable() -> Unit }
with an implementation in a different module, using dev-06 and above fails at compile time with this error:
Copy code
error: cannot access Foo
public final class FooImpl implements ...Foo {

bad class file: .../classes.jar(.../Foo.class)
undeclared type variable: N
l
hmm. can you share a full repro? what does
FooImpl
look like? interfaces with composables should work as long as both modules are being compiled with our compiler
a
Also, clean and rebuild all modules. iirc dev06 was when some binary breaking changes went into the compiler plugin
a
Ah, that makes sense. After digging into the issue more, it seems like the problem is that the implementing module transitively included the compose dependencies from a base module but without actually declaring
compose true
or
kotlinCompilerExtensionVersion
itself (because the implementing module needed to use kapt). In dev06 adding both options seems to at least make the original error disappear, and instead introduces IR compiler errors probably just complaining about kapt as usual, so that might fix the original issue.