Add error-level OptIn on safeAs, cast and assertedCast functions in addToStdlib
Usage of this function is unsafe because it does not have native compiler support. This means that compiler won't report UNCHECKED_CAST, CAST_NEVER_SUCCEED or similar diagnostics in case of error cast (which can happen immediately or after some refactoring of class hierarchy)
This commit is contained in:
committed by
teamcity
parent
1cd4f3ad2f
commit
9b63dde1c3
@@ -52,6 +52,7 @@ compileKotlin {
|
||||
"-Xno-optimized-callable-references",
|
||||
"-Xno-kotlin-nothing-value-exception",
|
||||
"-opt-in=kotlin.RequiresOptIn",
|
||||
"-opt-in=org.jetbrains.kotlin.utils.addToStdlib.UnsafeCastFunction",
|
||||
"-Xno-new-java-annotation-targets",
|
||||
]
|
||||
moduleName = "kotlin-reflection"
|
||||
|
||||
Reference in New Issue
Block a user