Add CompileTimeCalculation annotation as helper to interpreter's tests
This commit is contained in:
committed by
TeamCityServer
parent
524189132b
commit
6482abc602
@@ -0,0 +1,9 @@
|
||||
package kotlin
|
||||
|
||||
/**
|
||||
* Specify that marked function is calculated in compile time and it result can be stored as "const val"
|
||||
* Must be used only on built ins methods and further will be replaced with "constexpr" modifier
|
||||
*/
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
public annotation class CompileTimeCalculation
|
||||
+2
-1
@@ -35,7 +35,8 @@ class IrInterpreterHelpersSourceFilesProvider(testServices: TestServices) : Addi
|
||||
)
|
||||
private const val REFLECT_PATH = "./libraries/stdlib/jvm/src/kotlin/reflect"
|
||||
private val EXCLUDES = listOf(
|
||||
"src/kotlin/UStrings.kt", "src/kotlin/UMath.kt", "src/kotlin/UNumbers.kt", "src/kotlin/reflect/TypesJVM.kt"
|
||||
"src/kotlin/UStrings.kt", "src/kotlin/UMath.kt", "src/kotlin/UNumbers.kt", "src/kotlin/reflect/TypesJVM.kt",
|
||||
"core/builtins/src/kotlin/CompileTimeAnnotations.kt"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user