Skip to content

Type of pattern variable not initialized upon match #2884

Description

@rodinaarssen

Describe the bug

Image

Considering the match in the fragment above, the variable n should get the type of D and the field access should type check fine. However, the hover suggests that n has type &A (i.e., the declared type parameter in the Maybe ADT) and the field access is not accepted by the type checker.

Interestingly, an assignment of n to a variable of type D is not flagged by the type checker.

Desktop (please complete the following information):

  • VS Code 0.13.6-head4430 (with Rascal 0.43.0-RC14)

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