Inner classes of generic classes can't extend Throwable
Do it in the same way as Java: prohibit inner classes (including anonymous inner classes) capturing type parameters from outer classes (but not outer methods) extending Throwable. See KT-17981: - Deprecated in 1.2 - Error in 1.3
This commit is contained in:
@@ -69,6 +69,7 @@ enum class LanguageFeature(
|
||||
NestedClassesInEnumEntryShouldBeInner(KOTLIN_1_3),
|
||||
ProhibitDataClassesOverridingCopy(KOTLIN_1_3),
|
||||
RestrictionOfWrongAnnotationsWithUseSiteTargetsOnTypes(KOTLIN_1_3),
|
||||
ProhibitInnerClassesOfGenericClassExtendingThrowable(KOTLIN_1_3),
|
||||
|
||||
// Experimental features
|
||||
|
||||
|
||||
Reference in New Issue
Block a user