Skip to content

Variable-becomes in combination with a syntactic type is rejected by the checker #2818

Description

@rodinaarssen

Describe the bug
Consider the following module (which is a severely reduced example from actual code).

syntax B = "b";
B a(int _) = (B)`b`;
map[int, B] b = (n : f | n <- [0], f:_ := a(n));

The type checker incorrectly assigns the type value to f.

Observations:

  • The "variable-becomes" f: is essential (i.e., f := a(n) does not exhibit this behavior)
  • The return type of a must be a syntax type (any kind)

Expected behavior
This fragment should type check without issues

Desktop (please complete the following information):

  • Context: VS Code 0.13.5

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions