[m-rev.] for review: more info in diagnostics for subtype errors
Peter Wang
novalazy at gmail.com
Wed Jun 30 20:07:10 AEST 2021
On Wed, 30 Jun 2021 19:18:59 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>
> 2021-06-30 14:55 GMT+10:00 "Peter Wang" <novalazy at gmail.com>:
> >> +subtype_abstract.m:012: Error: the type definition for `citrus'/0,
> >> +subtype_abstract.m:012: the super type of `lemon'/0,
> >> +subtype_abstract.m:012: is not visible here.
> >
> > Perhaps it would be an improvement to add the word "declared", as in:
> >
> > Error: the type definition for `citrus'/0,
> > the declared super type of `lemon'/0,
> > is not visible here.
>
> In the presence of a longer chain of supertypes, are you proposing
> to add "declared" to just the first supertype, or all supertypes in the chain?
Hmm, I can see it could be a bit noisy, but it wouldn't occur often in
practice either. I don't think there's any need to make a special case
for the first supertype.
Peter
More information about the reviews
mailing list