Skip to content

Commit 28c8fcd

Browse files
committed
Sealed subclasses are now not illegal - but handled by registering the child serializers (polymorphically), remove the test for them.
1 parent c982e48 commit 28c8fcd

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

formats/json-tests/commonTest/src/kotlinx/serialization/json/polymorphic/JsonProhibitedPolymorphicKindsTest.kt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,6 @@ class JsonProhibitedPolymorphicKindsTest : JsonTestBase() {
2020
@Serializable
2121
enum class MyEnum
2222

23-
@Test
24-
fun testSealedSubclass() {
25-
assertFailsWith<IllegalArgumentException> {
26-
Json(true) {
27-
subclass(Base::class)
28-
}
29-
}
30-
assertFailsWith<IllegalArgumentException> {
31-
Json(false) {
32-
subclass(Base::class)
33-
}
34-
}
35-
}
36-
3723
@Test
3824
fun testPrimitive() {
3925
assertFailsWith<IllegalArgumentException> {

0 commit comments

Comments
 (0)