Treat SEALED_SUBCLASS_FQ_NAME_LIST change as a class signature change
#KT-19580
This commit is contained in:
+4
@@ -0,0 +1,4 @@
|
||||
sealed class Base {
|
||||
class A : Base()
|
||||
class B : Base()
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
sealed class Base {
|
||||
class A : Base()
|
||||
class B : Base()
|
||||
class C : Base()
|
||||
}
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/Base$A.class
|
||||
out/production/module/Base$B.class
|
||||
out/production/module/Base.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Base.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/use.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/UseKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/use.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
'when' expression must be exhaustive, add necessary 'is C' branch or 'else' branch instead
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/Base$A.class
|
||||
out/production/module/Base$B.class
|
||||
out/production/module/Base$C.class
|
||||
out/production/module/Base.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Base.kt
|
||||
src/use.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import Base.*
|
||||
|
||||
fun use(x: Base): String =
|
||||
when (x) {
|
||||
is A -> "A"
|
||||
is B -> "B"
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
import Base.*
|
||||
|
||||
fun use(x: Base): String =
|
||||
when (x) {
|
||||
is A -> "A"
|
||||
is B -> "B"
|
||||
is C -> "C"
|
||||
}
|
||||
Reference in New Issue
Block a user