We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a2edc3 commit ef9f09eCopy full SHA for ef9f09e
csharp/ql/lib/semmle/code/csharp/Conversion.qll
@@ -649,11 +649,14 @@ predicate convBoxing(Type fromType, Type toType) {
649
}
650
651
private predicate convBoxingValueType(ValueType fromType, Type toType) {
652
- toType instanceof ObjectType
653
- or
654
- toType instanceof DynamicType
655
656
- toType instanceof SystemValueTypeClass
+ (
+ toType instanceof ObjectType
+ or
+ toType instanceof DynamicType
657
+ toType instanceof SystemValueTypeClass
658
+ ) and
659
+ not fromType.(Struct).isRef()
660
or
661
toType = fromType.getABaseInterface+()
662
0 commit comments