Skip to content

Incorrect type in 'mismatched types' error #516

Closed

Description

@brson
fn main() {
  auto x = true;
  auto y = 1;
  auto z = x + y;
}

reports "error: mismatched types: expected bool but found bool (types differ)". Should be "bool but found int". Also, the reported span encompasses the entire binop when it should probably just cover the y variable.

Activity

  1. added 2 commits that reference this issue on Dec 12, 2017
  2. added a commit that references this issue on Apr 23, 2020
  3. added a commit that references this issue on Jun 3, 2025
  4. added a commit that references this issue on Jun 17, 2025
  5. added 2 commits that reference this issue on Aug 21, 2026
    6759437
    bb5cea0
  6. added a commit that references this issue on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-system

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions