Disallow comparison operators on contracts

This commit is contained in:
Marenz
2022-08-18 17:56:22 +02:00
parent 777385f5d2
commit f426b5988e
12 changed files with 45 additions and 18 deletions
@@ -20,8 +20,8 @@ contract C {
}
// ----
// TypeError 2271: (144-157): Operator != not compatible with types type(contract super C) and contract C
// TypeError 2271: (167-180): Operator != not compatible with types contract C and type(contract super C)
// TypeError 2271: (167-180): Operator != not compatible with types contract C and type(contract super C). No arithmetic or comparison operations are allowed on contract types. Consider converting to "address".
// TypeError 2271: (254-264): Operator != not compatible with types type(contract super C) and contract C
// TypeError 2271: (274-284): Operator != not compatible with types contract C and type(contract super C)
// TypeError 2271: (274-284): Operator != not compatible with types contract C and type(contract super C). No arithmetic or comparison operations are allowed on contract types. Consider converting to "address".
// TypeError 2271: (349-359): Operator != not compatible with types type(contract super C) and contract D
// TypeError 2271: (369-379): Operator != not compatible with types contract D and type(contract super C)
// TypeError 2271: (369-379): Operator != not compatible with types contract D and type(contract super C). No arithmetic or comparison operations are allowed on contract types. Consider converting to "address".