Test for KT-5502 (works after KT-4450 / KT-5907 fix)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// NB: should work after KT-5907 / KT-4450 fix
|
||||
|
||||
val currentTimeMillis = 1234L
|
||||
|
||||
public class Foo(protected val maxParsingTimeInMillis: Long?) {
|
||||
|
||||
var parsingStartTimeStamp = 0L
|
||||
|
||||
protected fun checkForParsingTimeout(): Boolean {
|
||||
if (maxParsingTimeInMillis == null)
|
||||
return true
|
||||
if (currentTimeMillis - parsingStartTimeStamp > <!DEBUG_INFO_SMARTCAST!>maxParsingTimeInMillis<!>)
|
||||
return false
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package
|
||||
|
||||
internal val currentTimeMillis: kotlin.Long = 1234.toLong()
|
||||
|
||||
public final class Foo {
|
||||
public constructor Foo(/*0*/ maxParsingTimeInMillis: kotlin.Long?)
|
||||
protected final val maxParsingTimeInMillis: kotlin.Long?
|
||||
internal final var parsingStartTimeStamp: kotlin.Long
|
||||
protected final fun checkForParsingTimeout(): kotlin.Boolean
|
||||
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
|
||||
}
|
||||
@@ -11341,6 +11341,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt5502.kt")
|
||||
public void testKt5502() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/kt5502.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt5907.kt")
|
||||
public void testKt5907() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/kt5907.kt");
|
||||
|
||||
Reference in New Issue
Block a user