mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-22 12:53:47 +00:00
Estimated hours taken: 0.25 Move nasty_func_test.m from tests/hard_coded to tests/valid (since it isn't a complete program) and then enable it.
15 lines
569 B
Mathematica
15 lines
569 B
Mathematica
% This test case shows up an obscure bug in the compiler.
|
|
% The compiler reports spurious mode errors in the compiler-generated
|
|
% unification/compare/index predicates.
|
|
% It's not clear whether or not this code is legal, but at very
|
|
% least the compiler ought to issue a better error message.
|
|
% If you write obfuscated code like this, you really deserve
|
|
% what you get, but I guess we should fix the bug someday anyway...
|
|
% for the moment, I'll file the bug report and forget it.
|
|
|
|
:- module nasty_func_test.
|
|
:- type foo ---> f(int) ; g.
|
|
|
|
:- func f(int) = foo.
|
|
f(_) = g.
|