google-developer-training / kotlin-bootcamp

Report issues with the Kotlin Bootcamp for Programmers codelab
7 stars 2 forks source link

Kotlin Bootcamp issue: Seal can be subclassed in another file #201

Open mrdor1stan opened 10 months ago

mrdor1stan commented 10 months ago

Describe the problem

The Seal class can't be subclassed in another file. If you want to add more Seal types, you have to add them in the same file.

It is false, it can't be subclassed in another package, but has no problem with different files of the same package

In which step of the codelab can this issue be found? step 10

Steps to reproduce? Create two files inside one package. In the first one, create a sealed class Seal. In second file try subclassing Seal class.

Versions IntelliJ IDEA 2022.1 (Ultimate Edition), Build #IU-221.5080.210, built on April 12, 2022

codelab: Kotlin Bootcamp for Programmers 4: Object-oriented programming