mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-16 22:35:41 +00:00
Estimated hours taken: 1 Branches: main, release compiler/post_typecheck.m: Fix a bug in record syntax. Existentially quantified type variables which occurred in the field being extracted and in other fields of the constructor were not being substituted correctly in the types of the other fields, resulting in an abort in polymorphism.m. tests/valid/Mmakefile: tests/valid/record_syntax_bug_5.m: Test case.
12 lines
160 B
Mathematica
12 lines
160 B
Mathematica
:- module record_syntax_bug_5.
|
|
:- interface.
|
|
|
|
:- type t ---> some[T] functor(a :: T, b :: T).
|
|
|
|
:- some [T] func foo(t) = T.
|
|
|
|
:- implementation.
|
|
|
|
foo(Z) = Z^b.
|
|
|