Provide no-arg constructors for common expected annotations in stdlib

This is needed because we treat `expect` classes as not having implicit default constructors (see more in KT-15522, f3344ec)
This commit is contained in:
Mikhail Zarechenskiy
2017-10-09 14:19:11 +03:00
parent bd9ac65eaf
commit 1845a87813
2 changed files with 22 additions and 5 deletions
@@ -1,3 +1,19 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kotlin.jvm
import kotlin.annotation.AnnotationTarget.*
@@ -6,6 +22,6 @@ import kotlin.annotation.AnnotationTarget.*
expect annotation class JvmName(val name: String)
@Target(FILE)
expect annotation class JvmMultifileClass
expect annotation class JvmMultifileClass()
expect annotation class JvmField
expect annotation class JvmField()
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,8 @@
package kotlin
import kotlin.annotation.AnnotationTarget.*
import kotlin.annotation.AnnotationTarget.FIELD
import kotlin.annotation.AnnotationTarget.PROPERTY
open expect class Error : Throwable {
constructor()
@@ -93,7 +94,7 @@ expect fun Float.isFinite(): Boolean
// From concurrent.kt
@Target(PROPERTY, FIELD)
expect annotation class Volatile
expect annotation class Volatile()
public expect inline fun <R> synchronized(lock: Any, block: () -> R): R