codeql icon indicating copy to clipboard operation
codeql copied to clipboard

Kotlin: annotation properties should be java.lang.Class not KClass

Open smowton opened this issue 3 years ago • 1 comments
trafficstars

As documented at https://kotlinlang.org/docs/annotations.html#constructors, annotation properties of type KClass get rewritten when targeting the JVM.

smowton avatar Jul 14 '22 17:07 smowton

That probably is an issue; I'll take another pass at this once I'm done with Java extractors

smowton avatar Aug 09 '22 08:08 smowton

I've updated this to fix expression types in the annotation class' constructor and to handle arrays of classes. However I haven't addressed the expressions at annotation use site because we currently don't handle annotation uses at all (i.e., we never populate the annotValue table). We'll have to remember to fix this when we get around to that.

smowton avatar Sep 25 '22 10:09 smowton

I've updated this to fix expression types in the annotation class' constructor and to handle arrays of classes. However I haven't addressed the expressions at annotation use site because we currently don't handle annotation uses at all (i.e., we never populate the annotValue table). We'll have to remember to fix this when we get around to that.

To remember this, I added this case to the issue tracking annotation extraction.

tamasvajk avatar Sep 26 '22 07:09 tamasvajk