Files
mercury/tests/invalid/missing_concrete_instance.m
Julien Fischer 9ccc76015d Emit an error if abstract instances in the implementation of a module do
Estimated hours taken: 1
Branches: main

Emit an error if abstract instances in the implementation of a module do
not have a corresponding concrete instance.

compiler/check_typeclass.m:
	Check that abstract instance declarations in the implementation
	section of a module have a corresponding concrete instance
	declaration somewhere.  Emit an error if they don't.

tests/invalid/missing_concrete_instance.{m,err_exp}:
	Extend this test case to cover the above situation.
2006-10-25 14:08:59 +00:00

16 lines
245 B
Mathematica

%
% rotd-2005-05-12 and before did not emit
% an error about the missing concrete instance.
%
:- module missing_concrete_instance.
:- interface.
:- typeclass foo(T) where [].
:- instance foo(int).
:- implementation.
:- instance foo(float).