Make FIR/FE1.0 report similar OptIn messages

This commit is contained in:
Mikhail Glukhikh
2022-02-21 18:26:13 +03:00
committed by Space
parent b42c236fb3
commit d823020c07
7 changed files with 23 additions and 14 deletions
@@ -38,4 +38,11 @@ object OptInNames {
)
@Suppress("unused")
val USE_EXPERIMENTAL_FQ_NAMES = OPT_IN_FQ_NAMES
fun buildDefaultDiagnosticMessage(prefix: String, fqName: FqName): String {
return "$prefix with '@${fqName.asString()}' or '@OptIn(${fqName.asString()}::class)'"
}
fun buildMessagePrefix(verb: String): String =
"This declaration needs OptIn. Its usage $verb be marked"
}