Fix for KT-9364: M13 Wrong compiler error for "unable to inline function"

#KT-9364 Fixed
This commit is contained in:
Michael Bogdanov
2015-10-22 15:28:35 +03:00
parent a7b3c70d21
commit d5126213d3
10 changed files with 93 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION
inline public fun reg(converter: (Any) -> Any) {
converter("")
}
public inline fun register(converter: (Any) -> Any) {
reg(when(<!USAGE_IS_NOT_INLINABLE!>converter<!>) {
is (Any) -> Any -> <!USAGE_IS_NOT_INLINABLE!>converter<!>
else -> <!USAGE_IS_NOT_INLINABLE!>converter<!>
})
}