Report errors on annotations with wrong use site targets

#KT-9580 In Progress
This commit is contained in:
Mikhail Zarechenskiy
2017-09-07 12:31:28 +03:00
parent dafb52a44a
commit a4766cc293
7 changed files with 49 additions and 8 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -312,7 +312,7 @@ class AnnotationChecker(private val additionalCheckers: Iterable<AdditionalAnnot
val T_OBJECT_LITERAL = targetList(OBJECT_LITERAL, CLASS, EXPRESSION)
val T_TYPE_REFERENCE = targetList(TYPE) {
onlyWithUseSiteTarget(VALUE_PARAMETER)
onlyWithUseSiteTarget(RECEIVER)
}
val T_TYPE_PARAMETER = targetList(TYPE_PARAMETER)