mirror of
https://github.com/github/codeql.git
synced 2026-03-22 23:49:43 +01:00
15 lines
597 B
Plaintext
15 lines
597 B
Plaintext
/**
|
|
* @name Test for generics
|
|
*/
|
|
import csharp
|
|
|
|
from ConstructedClass bString, Event e
|
|
where bString.hasName("B<String>")
|
|
and e.getDeclaringType() = bString
|
|
and e.hasName("myEvent")
|
|
and e.getSourceDeclaration().getDeclaringType() = e.getDeclaringType().getSourceDeclaration()
|
|
and e.getType().(ConstructedDelegateType).getTypeArgument(0) instanceof StringType
|
|
and e.getAddEventAccessor().getSourceDeclaration() = e.getSourceDeclaration().getAddEventAccessor()
|
|
and e.getRemoveEventAccessor().getSourceDeclaration() = e.getSourceDeclaration().getRemoveEventAccessor()
|
|
select bString, e
|