-
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.
Namely, remove incorporation “otherInsideMyConstraint” to eliminate constraint system redundancy and produce a potentially very large number of constructs. Instead, introduce not so “spreadable” incorporation during variable fixation (equality constraint with result type into other constraints). ^KT-41644 Fixed ^KT-42195 Fixed ^KT-42920 Fixed ^KT-42791 Fixed ^KT-41741 Fixed
- Loading branch information
Showing
24 changed files
with
299 additions
and
136 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
51 changes: 28 additions & 23 deletions
51
...ests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestWithStdlibGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
14 changes: 14 additions & 0 deletions
14
...iagnostics/tests/inference/upperBounds/inferringVariableByMaterializeAndUpperBound.fir.kt
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,14 @@ | ||
// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS | ||
|
||
interface I | ||
|
||
interface Inv<P> | ||
interface Out<out T> | ||
|
||
class Bar<U : I>(val x: Inv<Out<U>>) | ||
|
||
fun <T> materializeFoo(): Inv<T> = null as Inv<T> | ||
|
||
fun main() { | ||
Bar(materializeFoo()) | ||
} |
14 changes: 14 additions & 0 deletions
14
...ta/diagnostics/tests/inference/upperBounds/inferringVariableByMaterializeAndUpperBound.kt
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,14 @@ | ||
// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS | ||
|
||
interface I | ||
|
||
interface Inv<P> | ||
interface Out<out T> | ||
|
||
class Bar<U : I>(val x: Inv<Out<U>>) | ||
|
||
fun <T> materializeFoo(): Inv<T> = null as Inv<T> | ||
|
||
fun main() { | ||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Bar<!>(<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materializeFoo<!>()) | ||
} |
30 changes: 30 additions & 0 deletions
30
...a/diagnostics/tests/inference/upperBounds/inferringVariableByMaterializeAndUpperBound.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,30 @@ | ||
package | ||
|
||
public fun main(): kotlin.Unit | ||
public fun </*0*/ T> materializeFoo(): Inv<T> | ||
|
||
public final class Bar</*0*/ U : I> { | ||
public constructor Bar</*0*/ U : I>(/*0*/ x: Inv<Out<U>>) | ||
public final val x: Inv<Out<U>> | ||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean | ||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int | ||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String | ||
} | ||
|
||
public interface I { | ||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean | ||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int | ||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String | ||
} | ||
|
||
public interface Inv</*0*/ P> { | ||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean | ||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int | ||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String | ||
} | ||
|
||
public interface Out</*0*/ out T> { | ||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean | ||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int | ||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String | ||
} |
Oops, something went wrong.