Add missing classes to work without builtins. (#57)

This commit is contained in:
Nikolay Igotti
2016-11-14 14:08:20 +03:00
committed by GitHub
parent ae5e838305
commit fe032a8ba9
3 changed files with 34 additions and 2 deletions
@@ -0,0 +1,8 @@
package kotlin
/**
* Base interface implicitly implemented by all annotation interfaces.
* See [Kotlin language documentation](http://kotlinlang.org/docs/reference/annotations.html) for more information
* on annotations.
*/
public interface Annotation
@@ -0,0 +1,15 @@
package kotlin
/**
* The base class for all errors and exceptions. Only instances of this class can be thrown or caught.
*
* @param message the detail message string.
* @param cause the cause of this throwable.
*/
public open class Throwable(open val message: String?, open val cause: Throwable?) {
constructor(message: String?) : this(message, null)
constructor(cause: Throwable?) : this(cause?.toString(), cause)
constructor() : this(null, null)
}
+11 -2
View File
@@ -10,11 +10,20 @@ package kotlin
*/
//@Target(AnnotationTarget.FUNCTION)
//@Retention(AnnotationRetention.SOURCE)
annotation class SymbolName(val name: kotlin.String)
annotation class SymbolName(val name: String)
/**
* Exports the TypeInfo of this class by given name to use it from runtime.
*/
//@Target(AnnotationTarget.CLASS)
//@Retention(AnnotationRetention.SOURCE)
annotation class ExportTypeInfo(val name: kotlin.String)
annotation class ExportTypeInfo(val name: String)
/**
* Suppresses the given compilation warnings in the annotated element.
* @property names names of the compiler diagnostics to suppress.
*/
//@Target(CLASS, ANNOTATION_CLASS, PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER,
// CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER, TYPE, EXPRESSION, FILE, TYPEALIAS)
//@Retention(SOURCE)
public annotation class Suppress(vararg val names: String)