RUNTIME: grant access to symvols marked with konan.internal.ExportForCompiler

This commit is contained in:
Vasily Levchenko
2017-01-30 15:04:22 +03:00
committed by vvlevchenko
parent 47a5e13ff3
commit 458aa058c0
@@ -33,6 +33,10 @@ internal tailrec fun DeclarationDescriptor.isExported(): Boolean {
// Treat any `@ExportForCppRuntime` declaration as exported.
return true
}
if (this.annotations.hasAnnotation(exportForCompilerAnnotation)){
return true
}
if (this is ConstructorDescriptor && constructedClass.kind.isSingleton) {
// Currently code generator can access the constructor of the singleton,
@@ -58,6 +62,8 @@ private val symbolNameAnnotation = FqName("konan.SymbolName")
private val exportForCppRuntimeAnnotation = FqName("konan.internal.ExportForCppRuntime")
private val exportForCompilerAnnotation = FqName("konan.internal.ExportForCompiler")
private fun typeToHashString(type: KotlinType): String {
if (TypeUtils.isTypeParameter(type)) return "GENERIC"