Kapt: Allow passing primitive types and void to erasure() (KT-13617)

(cherry picked from commit 91444c5)
This commit is contained in:
Yan Zhulanow
2016-08-29 17:25:37 +03:00
committed by Yan Zhulanow
parent 3f2f79ef59
commit cc7eaeb910
3 changed files with 18 additions and 3 deletions
@@ -153,4 +153,12 @@ class ProcessorTests : AbstractProcessorTest() {
val typeArg = cai.typeArguments.first()
assertTrue(typeArg is TypeVariable)
}
fun testErasureSimple() = test("ErasureSimple", "*") { set, roundEnv, env ->
val test = env.findClass("Test")
val int = test.findMethod("a").returnType
val void = test.findMethod("b").returnType
assertEquals(int, env.typeUtils.erasure(int))
assertEquals(void, env.typeUtils.erasure(void))
}
}