mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-05-01 01:04:43 +00:00
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.
16 lines
245 B
Mathematica
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).
|