C#: Address review comments. Introduce Member::isEffectivelyPublic() because isEffectivelyPrivate and isEffectivelyInternal are almost always used together.

This commit is contained in:
calum
2019-01-22 15:31:04 +00:00
parent 26365c82f7
commit 423513169f
10 changed files with 40 additions and 12 deletions

View File

@@ -55,8 +55,11 @@ predicate alwaysDefaultToString(ValueOrRefType t) {
overriding.getAMethod() instanceof ToStringMethod and
overriding.getABaseType+() = t
) and
not t.isAbstract() and
not t instanceof Interface
(
(t.isAbstract() or t instanceof Interface)
implies
not t.isEffectivelyPublic()
)
}
newtype TDefaultToStringType = TDefaultToStringType0(ValueOrRefType t) { alwaysDefaultToString(t) }