Skip to content

No add method found on a number without annotations where expected add result is not u64 #6961

Open
@ironcev

Description

@ironcev

This program:

library;
const C: u8 = 11 + 22;

results in the following error:

1 | library;
2 | const C: u8 = 11 + 22;
  |                  ^ No method "add(u64, numeric) -> u8" found for type "u64".  
Matching method:
    add(u64, u64) -> u64 in u64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompilerGeneral compiler. Should eventually become more specific as the issue is triagedcompiler: frontendEverything to do with type checking, control flow analysis, and everything between parsing and IRgenteam:compilerCompiler Team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions