Drop @native from stdlib

This commit is contained in:
Alexey Tsvetkov
2015-10-19 21:10:07 +03:00
parent 715893446c
commit 3476bed18a
4 changed files with 2 additions and 19 deletions
@@ -29,15 +29,10 @@ import org.jetbrains.kotlin.resolve.diagnostics.SuppressDiagnosticsByAnnotations
import org.jetbrains.kotlin.resolve.inline.InlineUtil
import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm
private val NATIVE_ANNOTATION_CLASS_NAME = FqName("kotlin.jvm.native")
public fun DeclarationDescriptor.hasNativeAnnotation(): Boolean {
return this is FunctionDescriptor && this.isExternal
|| annotations.findAnnotation(NATIVE_ANNOTATION_CLASS_NAME) != null
}
public class SuppressNoBodyErrorsForNativeDeclarations : SuppressDiagnosticsByAnnotations(FUNCTION_NO_BODY_ERRORS, NATIVE_ANNOTATION_CLASS_NAME)
public class NativeFunChecker : DeclarationChecker {
override fun check(
declaration: JetDeclaration,