Kapt3: Fix signature clash (return type is different) for non-generic methods

This commit is contained in:
Yan Zhulanow
2016-12-01 15:09:44 +03:00
committed by Yan Zhulanow
parent 5f0d270e9e
commit c0b772a896
4 changed files with 30 additions and 1 deletions
@@ -34,7 +34,8 @@ class KaptJavaLog(context: Context?) : Log(context) {
"compiler.err.name.clash.same.erasure",
"compiler.err.name.clash.same.erasure.no.override",
"compiler.err.name.clash.same.erasure.no.override.1",
"compiler.err.name.clash.same.erasure.no.hide")
"compiler.err.name.clash.same.erasure.no.hide",
"compiler.err.already.defined")
internal fun preRegister(context: Context) {
context.put(Log.logKey, Context.Factory<Log>(::KaptJavaLog))
@@ -138,6 +138,12 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi
doTest(fileName);
}
@TestMetadata("methodPropertySignatureClash.kt")
public void testMethodPropertySignatureClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/testData/converter/methodPropertySignatureClash.kt");
doTest(fileName);
}
@TestMetadata("modifiers.kt")
public void testModifiers() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/testData/converter/modifiers.kt");
@@ -0,0 +1,7 @@
class CrashMe {
val resources = 1
fun getResources(): String {
return ""
}
}
@@ -0,0 +1,15 @@
public final class CrashMe {
private final int resources = 1;
public final int getResources() {
return 0;
}
public final java.lang.String getResources() {
return null;
}
public CrashMe() {
super();
}
}