[K2] Disappeared UNSUPPORTED
Forbid prefixes and suffixes for numeric literals and string ^KT-59881
This commit is contained in:
committed by
Space Team
parent
c5248fc5f4
commit
b83d8595e5
@@ -1,54 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -USELESS_CAST
|
||||
|
||||
infix fun Any?.foo(a: Any) {}
|
||||
infix fun Any?.zoo(a: Any) {}
|
||||
infix fun Any?.Loo(a: Any) {}
|
||||
infix fun Any?.doo(a: Any) {}
|
||||
infix fun Any?.ddoo(a: Any) {}
|
||||
operator fun Any?.contains(a: Any): Boolean = true
|
||||
|
||||
fun test(a: Any) {
|
||||
1f<!UNRESOLVED_REFERENCE!>oo<!> a
|
||||
1ffoo a
|
||||
1doo a
|
||||
1ddoo a
|
||||
1<!INFIX_MODIFIER_REQUIRED!>contains<!> a
|
||||
|
||||
1Lfoo a
|
||||
1L<!UNRESOLVED_REFERENCE!>oo<!> a
|
||||
1LLoo a
|
||||
|
||||
0b1foo a
|
||||
0b1Lfoo a
|
||||
0b1L<!UNRESOLVED_REFERENCE!>oo<!> a
|
||||
0b1LLoo a
|
||||
|
||||
0xf<!UNRESOLVED_REFERENCE!>oo<!> a
|
||||
0xff<!UNRESOLVED_REFERENCE!>oo<!> a
|
||||
0xfLLoo a
|
||||
|
||||
1.0f<!UNRESOLVED_REFERENCE!>oo<!> a
|
||||
1.0ffoo a
|
||||
1.0doo a
|
||||
1.0ddoo a
|
||||
|
||||
.0f<!UNRESOLVED_REFERENCE!>oo<!> a
|
||||
.0ffoo a
|
||||
.0doo a
|
||||
.0ddoo a
|
||||
|
||||
1in a
|
||||
1.0in a
|
||||
1.0fin a
|
||||
1.0<!UNRESOLVED_REFERENCE!>din<!> a
|
||||
.0in a
|
||||
.0fin a
|
||||
.0<!UNRESOLVED_REFERENCE!>din<!> a
|
||||
|
||||
<!USELESS_IS_CHECK!>1is Any<!>
|
||||
1as Any
|
||||
1as? Any
|
||||
|
||||
<!USELESS_IS_CHECK!>1!is Any<!>
|
||||
1!in a
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -USELESS_CAST
|
||||
|
||||
infix fun Any?.foo(a: Any) {}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
infix fun Any?.foo(a: Any) {}
|
||||
operator fun Any?.contains(a: Any): Boolean = true
|
||||
|
||||
fun test(a: Any) {
|
||||
|
||||
a foo""
|
||||
a foo"asd"
|
||||
a foo"$a"
|
||||
a foo"asd${a}sfsa"
|
||||
a foo"""sdf"""
|
||||
a foo'd'
|
||||
a foo<!EMPTY_CHARACTER_LITERAL!>''<!>
|
||||
|
||||
a foo""foo a
|
||||
a foo"asd"foo a
|
||||
a foo"$a"foo a
|
||||
a foo"asd${a}sfsa"foo a
|
||||
a foo"""sdf"""foo a
|
||||
a foo'd'foo a
|
||||
a foo<!EMPTY_CHARACTER_LITERAL!>''<!>foo a
|
||||
|
||||
a in"foo"
|
||||
a in"""foo"""
|
||||
a in's'
|
||||
a in<!EMPTY_CHARACTER_LITERAL!>''<!>
|
||||
|
||||
a !in"foo"
|
||||
a !in"""foo"""
|
||||
a !in's'
|
||||
a !in<!EMPTY_CHARACTER_LITERAL!>''<!>
|
||||
|
||||
if(<!USELESS_IS_CHECK!>"s"is Any<!>) {}
|
||||
if(<!USELESS_IS_CHECK!>"s"is Any<!>) {}
|
||||
test("s"as Any)
|
||||
|
||||
a foo""<!SYNTAX!>1<!>
|
||||
a foo""<!SYNTAX!>1.0<!>
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
infix fun Any?.foo(a: Any) {}
|
||||
|
||||
Reference in New Issue
Block a user