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:
Dmitry Petrov
2017-10-03 13:13:44 +03:00
parent 27e319a279
commit 3405ae30a1
12 changed files with 392 additions and 4 deletions
@@ -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