File tree Expand file tree Collapse file tree 1 file changed +4
-26
lines changed
csharp/ql/test/library-tests/csharp9 Expand file tree Collapse file tree 1 file changed +4
-26
lines changed Original file line number Diff line number Diff line change 11import csharp
22
3- private predicate isRealRefTypeConstraint ( Type t ) {
4- t instanceof RefType and
5- not t instanceof Interface
6- }
7-
83query predicate refType ( TypeParameter tp ) {
94 tp .fromSource ( ) and
10- (
11- not exists ( tp .getConstraints ( ) )
12- or
13- tp .getConstraints ( ) .hasRefTypeConstraint ( )
14- or
15- tp .getConstraints ( ) .hasNullableRefTypeConstraint ( )
16- or
17- isRealRefTypeConstraint ( tp .getConstraints ( ) .getATypeConstraint ( ) )
18- )
5+ tp .isRefType ( )
196}
207
218query predicate valueType ( TypeParameter tp ) {
229 tp .fromSource ( ) and
23- (
24- not exists ( tp .getConstraints ( ) ) or
25- tp .getConstraints ( ) .hasValueTypeConstraint ( ) or
26- tp .getConstraints ( ) .getATypeConstraint ( ) instanceof ValueType
27- )
10+ tp .isValueType ( )
2811}
2912
3013query predicate valueOrRefType ( TypeParameter tp ) {
3114 tp .fromSource ( ) and
32- (
33- not exists ( tp .getConstraints ( ) )
34- or
35- not tp .getConstraints ( ) .hasValueTypeConstraint ( ) and
36- not tp .getConstraints ( ) .hasRefTypeConstraint ( ) and
37- not isRealRefTypeConstraint ( tp .getConstraints ( ) .getATypeConstraint ( ) )
38- )
15+ not tp .isRefType ( ) and
16+ not tp .isValueType ( )
3917}
You can’t perform that action at this time.
0 commit comments