Open ZacSweers opened 2 months ago
Thanks for reporting! No, this was not intentional.
In KAPT, this would turn into an abstract method + static DefaultImpls
implementation in the Java stub, so I think things just happened to fail since we don't allow @Provides
on an abstract method. My guess is that KSP represents this case more accurately and the method isn't considered abstract due to the default implementation.
In any case, I think the "fix" for this to make it behave the same as KAPT (i.e. fail the build).
This is a slight behavior change from apt to KSP. The following snippet is an error in apt but has no error in KSP
It may be intentional if the intention is to support the default value, but I can't find any docs that confirm this.