Skip to content

Commit c70c43d

Browse files
committed
C#: Roll back changes for tuples in default to string.
1 parent 3487226 commit c70c43d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

csharp/ql/src/Useless code/DefaultToStringQuery.qll

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ private predicate alwaysInvokesToString(ParameterRead pr) {
4646
* method from `System.Object` or `System.ValueType`.
4747
*/
4848
predicate alwaysDefaultToString(ValueOrRefType t) {
49-
not t instanceof TupleType and
5049
exists(ToStringMethod m | t.hasMethod(m) |
5150
m.getDeclaringType() instanceof SystemObjectClass or
5251
m.getDeclaringType() instanceof SystemValueTypeClass
@@ -56,11 +55,6 @@ predicate alwaysDefaultToString(ValueOrRefType t) {
5655
overriding.getABaseType+() = t
5756
) and
5857
((t.isAbstract() or t instanceof Interface) implies not t.isEffectivelyPublic())
59-
or
60-
exists(ValueOrRefType elem |
61-
elem = t.(TupleType).getElementType(_) and
62-
alwaysDefaultToString(elem)
63-
)
6458
}
6559

6660
class DefaultToStringType extends ValueOrRefType {

0 commit comments

Comments
 (0)