Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Mod operator does not work for i16 / i8 inputs #1624

Closed
@faze-geek

Description

@faze-geek
def main():
    i: i16; j: i16; k: i16
    i = i16(10)
    j = i16(3)
    k = i % j
    print(k)

main()

Gives :

$ lpython a.py 
semantic error: Arguments do not match for any generic procedure, _mod
 --> a.py:5:9
  |
5 |     k = i % j
  |         ^^^^^^

Should get fixed by overloading the mod function.

Metadata

Metadata

Assignees

No one assigned

    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