-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIR] Correctly detect super type in delegated constructor call
- Loading branch information
1 parent
adfd478
commit 7f02d57
Showing
56 changed files
with
199 additions
and
230 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
compiler/fir/analysis-tests/testData/resolve/constructors/noSuperCallInSupertypes.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,27 @@ | ||
// FILE: AJava.java | ||
|
||
public class AJava { | ||
public AJava(String s) {} | ||
} | ||
|
||
// FILE: main.kt | ||
|
||
class BJava : AJava, C { | ||
constructor(s: String) : super(s) | ||
} | ||
|
||
open class AKt(val s: String) | ||
|
||
class BKt : AKt, C { | ||
constructor(s: String) : super(s) | ||
} | ||
|
||
interface C | ||
|
||
typealias QQQ = AKt | ||
|
||
typealias DDD = C | ||
|
||
class CKt : QQQ, DDD { | ||
constructor(s: String) : super(s) | ||
} |
32 changes: 32 additions & 0 deletions
32
compiler/fir/analysis-tests/testData/resolve/constructors/noSuperCallInSupertypes.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,32 @@ | ||
FILE: main.kt | ||
public final class BJava : R|AJava|, R|C| { | ||
public constructor(s: R|kotlin/String|): R|BJava| { | ||
super<R|AJava|>(R|<local>/s|) | ||
} | ||
|
||
} | ||
public open class AKt : R|kotlin/Any| { | ||
public constructor(s: R|kotlin/String|): R|AKt| { | ||
super<R|kotlin/Any|>() | ||
} | ||
|
||
public final val s: R|kotlin/String| = R|<local>/s| | ||
public get(): R|kotlin/String| | ||
|
||
} | ||
public final class BKt : R|AKt|, R|C| { | ||
public constructor(s: R|kotlin/String|): R|BKt| { | ||
super<R|AKt|>(R|<local>/s|) | ||
} | ||
|
||
} | ||
public abstract interface C : R|kotlin/Any| { | ||
} | ||
public final typealias QQQ = R|AKt| | ||
public final typealias DDD = R|C| | ||
public final class CKt : R|QQQ|, R|DDD| { | ||
public constructor(s: R|kotlin/String|): R|CKt| { | ||
super<R|QQQ|>(R|<local>/s|) | ||
} | ||
|
||
} |
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
2 changes: 1 addition & 1 deletion
2
compiler/fir/analysis-tests/testData/resolve/expresssions/genericDecorator.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
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
18 changes: 18 additions & 0 deletions
18
compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
...alysis-tests/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.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
1 change: 0 additions & 1 deletion
1
compiler/testData/codegen/box/classes/delegateConstructorCallWithKeywords.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
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// IGNORE_BACKEND_FIR: JVM_IR | ||
class B : A() | ||
|
||
sealed class A() { | ||
|
1 change: 0 additions & 1 deletion
1
...box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSecondaryConstructor.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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// IGNORE_BACKEND_FIR: JVM_IR | ||
open class Base(val callback: () -> String) | ||
|
||
class Outer { | ||
|
1 change: 0 additions & 1 deletion
1
...x/inlineClasses/hiddenConstructor/delegatingSuperConstructorCallInSecondaryConstructor.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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
// !LANGUAGE: +InlineClasses | ||
// IGNORE_BACKEND_FIR: JVM_IR | ||
|
||
inline class S(val string: String) | ||
|
||
|
1 change: 0 additions & 1 deletion
1
compiler/testData/codegen/box/secondaryConstructors/clashingDefaultConstructors.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
1 change: 0 additions & 1 deletion
1
compiler/testData/codegen/box/secondaryConstructors/delegateWithComplexExpression.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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// IGNORE_BACKEND_FIR: JVM_IR | ||
var log = "" | ||
|
||
open class Base(val s: String) | ||
|
1 change: 0 additions & 1 deletion
1
compiler/testData/codegen/box/secondaryConstructors/generics.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
1 change: 0 additions & 1 deletion
1
compiler/testData/codegen/box/secondaryConstructors/localClasses.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
1 change: 0 additions & 1 deletion
1
compiler/testData/codegen/box/secondaryConstructors/superCallSecondary.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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// IGNORE_BACKEND_FIR: JVM_IR | ||
var sideEffects: String = "" | ||
|
||
internal abstract class B { | ||
|
1 change: 0 additions & 1 deletion
1
compiler/testData/codegen/box/specialBuiltins/exceptionCause.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
1 change: 0 additions & 1 deletion
1
compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// IGNORE_BACKEND_FIR: JVM_IR | ||
class MyThrowable : Throwable { | ||
val x: String | ||
|
||
|
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
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
19 changes: 0 additions & 19 deletions
19
compiler/testData/diagnostics/tests/scopes/protectedVisibility/constructorsInner.fir.kt
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
compiler/testData/diagnostics/tests/scopes/protectedVisibility/constructorsInner.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
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
Oops, something went wrong.