Typo fixed
This commit is contained in:
@@ -527,7 +527,7 @@ public interface Errors {
|
||||
|
||||
DiagnosticFactory1<JetSimpleNameExpression, JetType> COMPARE_TO_TYPE_MISMATCH = DiagnosticFactory1.create(ERROR);
|
||||
|
||||
DiagnosticFactory0<PsiElement> UNDESCORE_IS_DEPRECATED = DiagnosticFactory0.create(WARNING);
|
||||
DiagnosticFactory0<PsiElement> UNDERSCORE_IS_DEPRECATED = DiagnosticFactory0.create(WARNING);
|
||||
|
||||
DiagnosticFactory0<PsiElement> INAPPLICABLE_OPERATOR_MODIFIER = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
|
||||
+1
-1
@@ -357,7 +357,7 @@ public class DefaultErrorMessages {
|
||||
|
||||
MAP.put(COMPARE_TO_TYPE_MISMATCH, "''compareTo()'' must return kotlin.Int, but returns {0}", RENDER_TYPE);
|
||||
|
||||
MAP.put(UNDESCORE_IS_DEPRECATED, "Names _, __, ___, ..., are deprecated");
|
||||
MAP.put(UNDERSCORE_IS_DEPRECATED, "Names _, __, ___, ..., are deprecated");
|
||||
|
||||
MAP.put(INAPPLICABLE_OPERATOR_MODIFIER, "'operator' modifier is inapplicable on this function");
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ object UnderscoreChecker : DeclarationChecker {
|
||||
fun checkIdentifier(identifier: PsiElement?, diagnosticHolder: DiagnosticSink) {
|
||||
if (identifier == null || identifier.text.isEmpty()) return
|
||||
if (identifier.text.all { it == '_' }) {
|
||||
diagnosticHolder.report(Errors.UNDESCORE_IS_DEPRECATED.on(identifier))
|
||||
diagnosticHolder.report(Errors.UNDERSCORE_IS_DEPRECATED.on(identifier))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class LazyImportResolver(
|
||||
}
|
||||
for ((alias, import) in explicitClassImports.entries()) {
|
||||
if (alias.all { it == '_' }) {
|
||||
traceForImportResolve.report(Errors.UNDESCORE_IS_DEPRECATED.on(import))
|
||||
traceForImportResolve.report(Errors.UNDERSCORE_IS_DEPRECATED.on(import))
|
||||
}
|
||||
}
|
||||
for (alias in explicitClassImports.keySet()) {
|
||||
|
||||
+7
-7
@@ -1,16 +1,16 @@
|
||||
// !DIAGNOSTICS: -DEPRECATED_SYMBOL_WITH_MESSAGE
|
||||
|
||||
<!UNDESCORE_IS_DEPRECATED!>import kotlin.Deprecated as ___<!>
|
||||
<!UNDERSCORE_IS_DEPRECATED!>import kotlin.Deprecated as ___<!>
|
||||
|
||||
@___("") data class Pair(val x: Int, val y: Int)
|
||||
|
||||
class <!UNDESCORE_IS_DEPRECATED!>_<!><<!UNDESCORE_IS_DEPRECATED!>________<!>>
|
||||
val <!UNDESCORE_IS_DEPRECATED!>______<!> = _<Int>()
|
||||
class <!UNDERSCORE_IS_DEPRECATED!>_<!><<!UNDERSCORE_IS_DEPRECATED!>________<!>>
|
||||
val <!UNDERSCORE_IS_DEPRECATED!>______<!> = _<Int>()
|
||||
|
||||
fun <!UNDESCORE_IS_DEPRECATED!>__<!>(<!UNDESCORE_IS_DEPRECATED!>___<!>: Int, y: _<Int>?): Int {
|
||||
val (x, <!UNDESCORE_IS_DEPRECATED!>__________<!>) = Pair(___ - 1, 42)
|
||||
val <!UNDESCORE_IS_DEPRECATED!>____<!> = x
|
||||
fun <!UNDERSCORE_IS_DEPRECATED!>__<!>(<!UNDERSCORE_IS_DEPRECATED!>___<!>: Int, y: _<Int>?): Int {
|
||||
val (x, <!UNDERSCORE_IS_DEPRECATED!>__________<!>) = Pair(___ - 1, 42)
|
||||
val <!UNDERSCORE_IS_DEPRECATED!>____<!> = x
|
||||
// in backquotes: allowed
|
||||
val `_` = __________
|
||||
<!UNDESCORE_IS_DEPRECATED!>__<!>@ return if (y != null) __(____, y) else __(`_`, ______)
|
||||
<!UNDERSCORE_IS_DEPRECATED!>__<!>@ return if (y != null) __(____, y) else __(`_`, ______)
|
||||
}
|
||||
Reference in New Issue
Block a user