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 28cd8a8 commit 8108c72Copy full SHA for 8108c72
csharp/ql/src/Language Abuse/MissedReadonlyOpportunity.ql
@@ -27,6 +27,7 @@ predicate isReadonlyCompatibleDefinition(AssignableDefinition def, Field f) {
27
}
28
29
predicate canBeReadonly(Field f) {
30
+ exists(Type t | t = f.getType() | not t instanceof Struct or t.(Struct).isReadonly()) and
31
forex(AssignableDefinition def | defTargetsField(def, f) | isReadonlyCompatibleDefinition(def, f))
32
33
0 commit comments