Skip to content

[Bug] Optional types do not correctly propagate through binary operators #28902

@mohammadfawaz

Description

@mohammadfawaz

For example, this fails to compile:

let x: u8? = 1 + 1;

Easy fix in type checking but opening this issues to fix it for all relevant binary ops and investigate other places where this might happen. Also, we should write extensive tests for all possible ops.

Note: I think unary ops have this problem too.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions