mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
C#: Do not consider ref struct as being convertible to object, dynamic and valuetype.
This commit is contained in:
@@ -649,11 +649,14 @@ predicate convBoxing(Type fromType, Type toType) {
|
||||
}
|
||||
|
||||
private predicate convBoxingValueType(ValueType fromType, Type toType) {
|
||||
toType instanceof ObjectType
|
||||
or
|
||||
toType instanceof DynamicType
|
||||
or
|
||||
toType instanceof SystemValueTypeClass
|
||||
(
|
||||
toType instanceof ObjectType
|
||||
or
|
||||
toType instanceof DynamicType
|
||||
or
|
||||
toType instanceof SystemValueTypeClass
|
||||
) and
|
||||
not fromType.(Struct).isRef()
|
||||
or
|
||||
toType = fromType.getABaseInterface+()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user