[FIR] KT-46483: Forbid annotations in where Clauses
Merge-request: KT-MR-7208 Merged-by: Nikolay Lunyak <lunyak.kolya@mail.ru>
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
@Repeatable
|
||||
@Target( AnnotationTarget.TYPE_PARAMETER)
|
||||
annotation class TypeParameterAnn(val name: String)
|
||||
|
||||
interface Generic<Z>
|
||||
|
||||
fun <<!MISPLACED_TYPE_PARAMETER_CONSTRAINTS!>@TypeParameterAnn("T") T: Any<!>> whereClauseWithAnnotation() where <!ANNOTATION_IN_WHERE_CLAUSE_WARNING!>@<!DEBUG_INFO_MISSING_UNRESOLVED!>TypeParameterAnn<!>("Prohibit me!!!")<!> T : Generic<String> {
|
||||
}
|
||||
|
||||
class Foo<<!MISPLACED_TYPE_PARAMETER_CONSTRAINTS!>@TypeParameterAnn("T") T: Any<!>> () where <!ANNOTATION_IN_WHERE_CLAUSE_WARNING!>@<!DEBUG_INFO_MISSING_UNRESOLVED!>TypeParameterAnn<!>("Prohibit me!!!")<!> T : Generic<String> {
|
||||
}
|
||||
Reference in New Issue
Block a user