Skip to content

Commit

Permalink
K2: reproduce KT-67912
Browse files Browse the repository at this point in the history
(cherry picked from commit f6a80b8)
  • Loading branch information
mglukhikh authored and qodana-bot committed May 7, 2024
1 parent 8e0919e commit cda1ad4
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// ISSUE: KT-67912
// WITH_STDLIB

interface Bound

inline fun <reified F : Bound> foo(key: String): F? = null

fun main() {
val otherValue: Map<String, String> by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>lazy {
foo("") ?: emptyMap()
}<!>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// ISSUE: KT-67912
// WITH_STDLIB

interface Bound

inline fun <reified F : Bound> foo(key: String): F? = null

fun main() {
val otherValue: Map<String, String> by lazy {
foo("") ?: emptyMap()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// ISSUE: KT-67912
// WITH_STDLIB

interface Bound

inline fun <reified F : Bound> foo(key: String): F? = null

fun main() {
val value: Map<String, String> = <!INITIALIZER_TYPE_MISMATCH, NEW_INFERENCE_ERROR!>requireNotNull(
foo("")
)<!>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// ISSUE: KT-67912
// WITH_STDLIB

interface Bound

inline fun <reified F : Bound> foo(key: String): F? = null

fun main() {
val value: Map<String, String> = requireNotNull(
foo("")
)
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cda1ad4

Please sign in to comment.