[m-rev.] for review: Warn about redundant type conversions.

Peter Wang novalazy at gmail.com
Fri Jun 28 17:36:39 AEST 2024


On Fri, 28 Jun 2024 15:54:25 +1000 Julien Fischer <jfischer at opturion.com> wrote:
> On Thu, 27 Jun 2024 at 17:04, Peter Wang <novalazy at gmail.com> wrote:
> >
> > Warn about type conversion expressions, i.e. coerce(),
> > where the type of the argument and the type of the expression
> > are the same.
> >
> > compiler/options.m:
> >     Add a new option --warn-redundant-coerce, enabled by default.
> >
> > compiler/type_assign.m:
> >     Add a coerce_constraint_status value to indicate that a coercion
> >     is known to be type-correct but redundant.
> >
> > compiler/typecheck.m:
> >     Generate warnings for redundant coercions, once typechecking has
> >     narrowed down to a single type assignment.
> >
> > compiler/typecheck_clauses.m:
> >     Check for and record redundant coercions the type assignment.
> 
> That sentence doesn't make sense, do you mean *in* the type assignment?
> 

Yes, thanks.

Peter


More information about the reviews mailing list