Skip to content

Should operators on literals delay range check? #6

Description

@Shachar

def var : S8 = 0 - 128;

Should it not compile, because 128 is not a valid number for the expected type S8? In which case, the code needs to be written as:
def var : S8 = expect!S16(0 - 128);

Or should the check for range be delayed? How about:

def var : S8 = 128 - 256;?

Activity

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

    language designNeed to make a desion about the design of the language

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions