kotlin-inject
kotlin-inject copied to clipboard
Fix #459: Suppress "Redundant visibility modifier" Warnings in Generated Code
Fix for #459
Going to wait for https://github.com/evant/kotlin-inject/pull/350 to be merged first so that a test can be written using -Wextra, ex:
@ParameterizedTest
@EnumSource(Target::class)
fun does_not_warn_by_default(target: Target) {
val projectCompiler = ProjectCompiler(target, workingDir)
assertThat(
projectCompiler.source(
"MyComponent.kt",
"""
import me.tatarka.inject.annotations.Component
@Component abstract class MyComponent {
}
""".trimIndent()
).compile()
).warnings().isEmpty()
}
@evant Hey, now that #350 has been merged, could you add the test so we can merge this PR as well? I’d do it myself, but I’m not too familiar with this particular test. I’d really appreciate it if you could take care of it.
Yep was planning on adding it eventually if you didn't get to it.