[FIR] Unwrap error expressions when detecting USAGE_IS_NOT_INLINABLE
Otherwise, false positive USAGE_IS_NOT_INLINABLE may be detected ^KT-65316: Fixed
This commit is contained in:
committed by
Space Team
parent
ed246d372b
commit
cd5b38b958
@@ -0,0 +1,37 @@
|
||||
// !DIAGNOSTICS: -REDUNDANT_LABEL_WARNING -UNDERSCORE_IS_RESERVED
|
||||
|
||||
// See KT-65337
|
||||
// !DIAGNOSTICS: -UNRESOLVED_REFERENCE
|
||||
|
||||
// KT-65319
|
||||
inline fun inline(s: () -> Unit) {}
|
||||
fun noInline(s: () -> Unit) {}
|
||||
|
||||
inline fun bar(s: () -> Unit) {
|
||||
inline(s)
|
||||
noInline(<!USAGE_IS_NOT_INLINABLE!>s<!>)
|
||||
|
||||
inline(l@ s)
|
||||
noInline(l@ <!USAGE_IS_NOT_INLINABLE!>s<!>)
|
||||
|
||||
inline(l2@ l1@ s)
|
||||
noInline(l2@ l1@ <!USAGE_IS_NOT_INLINABLE!>s<!>)
|
||||
|
||||
inline(_@ s)
|
||||
noInline(_@ <!USAGE_IS_NOT_INLINABLE!>s<!>)
|
||||
|
||||
inline(__@ _@ s)
|
||||
noInline(__@ _@ <!USAGE_IS_NOT_INLINABLE!>s<!>)
|
||||
|
||||
s()
|
||||
(l@ s)()
|
||||
(l2@ l1@ s)()
|
||||
(_@ s)()
|
||||
(__@ _@ s)()
|
||||
|
||||
s.invoke()
|
||||
(l@ s).invoke()
|
||||
(l2@ l1@ s).invoke()
|
||||
(_@ s).invoke()
|
||||
(__@ _@ s).invoke()
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// !DIAGNOSTICS: -REDUNDANT_LABEL_WARNING -UNDERSCORE_IS_RESERVED
|
||||
|
||||
// See KT-65337
|
||||
// !DIAGNOSTICS: -UNRESOLVED_REFERENCE
|
||||
|
||||
// KT-65319
|
||||
inline fun inline(s: () -> Unit) {}
|
||||
fun noInline(s: () -> Unit) {}
|
||||
|
||||
inline fun bar(s: () -> Unit) {
|
||||
inline(s)
|
||||
noInline(<!USAGE_IS_NOT_INLINABLE!>s<!>)
|
||||
|
||||
inline(l@ s)
|
||||
noInline(l@ s)
|
||||
|
||||
inline(l2@ l1@ s)
|
||||
noInline(l2@ l1@ s)
|
||||
|
||||
inline(_@ s)
|
||||
noInline(_@ s)
|
||||
|
||||
inline(__@ _@ s)
|
||||
noInline(__@ _@ s)
|
||||
|
||||
s()
|
||||
(l@ s)()
|
||||
(l2@ l1@ s)()
|
||||
(_@ s)()
|
||||
(__@ _@ s)()
|
||||
|
||||
s.invoke()
|
||||
(l@ s).invoke()
|
||||
(l2@ l1@ s).invoke()
|
||||
(_@ s).invoke()
|
||||
(__@ _@ s).invoke()
|
||||
}
|
||||
Reference in New Issue
Block a user