Skip to content

Handle inference of multiple size for Int literals #118

Open
@Champii

Description

@Champii

We currently only support Int64 when inferring integer literals.
We need a way to have a "generic" int that is either bound by constraints when used in the program or defaulting to Int64 if no particular need is expressed.

This fails with a type error between the 10 number literal that is an Int64 and the bar field that requires an Int16

struct Foo
  bar: Int16

main: ->
  let foo = Foo bar: 10
  foo.bar

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions