Skip to content

Possible regression: x > y == z should not be allowed #2227

Closed
@certik

Description

@certik

This used to correctly fail:

semantic error: Type mismatch in comparison operator, the types must be compatible
 --> /Users/ondrej/repos/lpython/integration_tests/expr_22.py:8:12
  |
8 |     assert x > y == z
  |            ^^^^^    ^ type mismatch ('bool' and 'i32')

But now it works. It seems this could should keep returning the same error, so we should add a test for this error message.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions