-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
class A { | ||
constructor() /* primary */ { | ||
super/*Any*/() | ||
/* <init>() */ | ||
|
||
} | ||
|
||
private val b: <no name provided> | ||
field = { // BLOCK | ||
local class <no name provided> : DoubleExpression { | ||
constructor() /* primary */ { | ||
super/*DoubleExpression*/() | ||
/* <init>() */ | ||
|
||
} | ||
|
||
override fun get(): Double { | ||
return 0.0D | ||
} | ||
|
||
} | ||
|
||
<no name provided>() | ||
} | ||
private get | ||
|
||
} | ||
|
||
class C : DoubleExpression { | ||
constructor() /* primary */ { | ||
super/*DoubleExpression*/() | ||
/* <init>() */ | ||
|
||
} | ||
|
||
override fun get(): Double { | ||
return 0.0D | ||
} | ||
|
||
} | ||
|
23 changes: 23 additions & 0 deletions
23
compiler/testData/ir/irText/firProblems/recursiveCapturedTypeInPropertyReference.kt.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
interface Something { | ||
|
||
} | ||
|
||
interface Recursive<R> where R : Recursive<R>, R : Something { | ||
abstract val symbol: AbstractSymbol<R> | ||
abstract get | ||
|
||
} | ||
|
||
abstract class AbstractSymbol<E> where E : Recursive<E>, E : Something { | ||
constructor() /* primary */ { | ||
super/*Any*/() | ||
/* <init>() */ | ||
|
||
} | ||
|
||
fun foo(list: List<Any>) { | ||
val result: List<AbstractSymbol<out Recursive<*>>> = list.filterIsInstance<Recursive<*>>().map<Recursive<*>, AbstractSymbol<out Recursive<*>>>(transform = Recursive::symbol) | ||
} | ||
|
||
} | ||
|