Use the new type inference for top-level callable reference resolution
^KT-47797 Fixed ^KT-47987 Fixed ^KT-45034 Fixed ^KT-48446 Fixed ^KT-13934 Fixed
This commit is contained in:
+13
@@ -19,8 +19,21 @@ val j1: J<String> = Impl("O")
|
||||
// would produce an error.
|
||||
val x by j1::value
|
||||
|
||||
@Target(AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.EXPRESSION, AnnotationTarget.FILE)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class Anno
|
||||
|
||||
fun box(): String {
|
||||
val j2: J<String> = Impl("K")
|
||||
val y by j2::value
|
||||
val y1 by @Anno j2::value
|
||||
val y2 by (j2::value)
|
||||
val y3 by (j2)::value
|
||||
val y4 by ((j2)::value)
|
||||
val y5 by (((j2)::value))
|
||||
val y6 by @Anno() (((j2)::value))
|
||||
val y7 by (@Anno() ((j2)::value))
|
||||
val y8 by ((@Anno() (j2)::value))
|
||||
val y9 by @Anno() ((@Anno() (j2)::value))
|
||||
return x + y
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user