Skip to content

dyno: odd issue when calling init without this #25053

Open
@DanilaFe

Description

@DanilaFe

The following program:

record R {
  var x: int;

  proc init(x: int) {

  }

  proc init(x: int, y: int) {
    init(__primitive("+", x, y));
  }
}

Emits an error about being unable to pass a const int to a value of type ref R. This makes little sense to me.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions