-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
Before this commit, we used classId-based methods which didn't work correctly on local classes / objects, thus provoking exceptions. Now we use lookupTag-based methods which don't have such problems. #KT-67993 Fixed
- Loading branch information
There are no files selected for viewing
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.
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.
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,32 @@ | ||
// ISSUE: KT-67993 | ||
// IGNORE_REVERSED_RESOLVE | ||
// IGNORE_NON_REVERSED_RESOLVE | ||
// Reason: see KT-68031 | ||
|
||
class Builder<T> { | ||
var res: T? = null | ||
|
||
fun add(x: T) { | ||
res = x | ||
} | ||
} | ||
|
||
fun <T> foo(build: Builder<T>.() -> Unit): T { | ||
return Builder<T>().apply(build).res!! | ||
} | ||
|
||
class C { | ||
val a = foo { | ||
object { | ||
fun bar() { | ||
add(foo()) | ||
} | ||
|
||
private fun foo() = "OK" | ||
}.bar() | ||
} | ||
} | ||
|
||
fun box(): String { | ||
return C().a | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// FIR_IDENTICAL | ||
// ISSUE: KT-67993 | ||
// IGNORE_REVERSED_RESOLVE | ||
// IGNORE_NON_REVERSED_RESOLVE | ||
// Reason: see KT-68031 | ||
|
||
class Builder<T> { | ||
fun add(x: T) {} | ||
} | ||
|
||
fun <T> foo(build: Builder<T>.() -> Unit) { | ||
Builder<T>().apply(build) | ||
} | ||
|
||
class C { | ||
val a = foo { | ||
object { | ||
fun bar() { | ||
add(foo()) | ||
} | ||
|
||
private fun foo() = "..." | ||
} | ||
} | ||
} |
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.
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.
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.
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.