-
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.
Random-order variable sets are no more in use in CFG #KT-13990 Fixed
- Loading branch information
Showing
4 changed files
with
67 additions
and
9 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
24 changes: 24 additions & 0 deletions
24
compiler/testData/diagnostics/tests/constructorConsistency/multipleAreNull.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,24 @@ | ||
// !DIAGNOSTICS: -UNUSED_PARAMETER | ||
|
||
interface Context | ||
class Point | ||
|
||
class Example { | ||
constructor(context: Context?) | ||
constructor(context: Context?, arg1: Int) | ||
constructor(context: Context?, arg1: Int, arg2: Int) | ||
constructor(context: Context?, arg1: Int, arg2: Int, arg3: Int) | ||
|
||
var condition: Boolean = false | ||
private var index = <!DEBUG_INFO_LEAKING_THIS!>newIndex<!>(condition) | ||
private fun newIndex(zero: Boolean) = if (zero) 0 else 1 | ||
|
||
private lateinit var latePoint1: Point | ||
private lateinit var latePoint2: Point | ||
|
||
private val point1 = Point() | ||
private val point2 = Point() | ||
private val point3 = Point() | ||
private val point4 = Point() | ||
private var nullPoint: Point? = null | ||
} |
34 changes: 34 additions & 0 deletions
34
compiler/testData/diagnostics/tests/constructorConsistency/multipleAreNull.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,34 @@ | ||
package | ||
|
||
public interface Context { | ||
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 final class Example { | ||
public constructor Example(/*0*/ context: Context?) | ||
public constructor Example(/*0*/ context: Context?, /*1*/ arg1: kotlin.Int) | ||
public constructor Example(/*0*/ context: Context?, /*1*/ arg1: kotlin.Int, /*2*/ arg2: kotlin.Int) | ||
public constructor Example(/*0*/ context: Context?, /*1*/ arg1: kotlin.Int, /*2*/ arg2: kotlin.Int, /*3*/ arg3: kotlin.Int) | ||
public final var condition: kotlin.Boolean | ||
private final var index: kotlin.Int | ||
private final lateinit var latePoint1: Point | ||
private final lateinit var latePoint2: Point | ||
private final var nullPoint: Point? | ||
private final val point1: Point | ||
private final val point2: Point | ||
private final val point3: Point | ||
private final val point4: Point | ||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean | ||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int | ||
private final fun newIndex(/*0*/ zero: kotlin.Boolean): kotlin.Int | ||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String | ||
} | ||
|
||
public final class Point { | ||
public constructor Point() | ||
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 | ||
} |
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