Skip to content

Commit

Permalink
Added comment about the future improved partial amend
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mie6 committed Jan 22, 2023
1 parent d7b4489 commit f354b7d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ private [internal] final class Unexpected(msg: String, width: Int) extends Instr
}

// partial amend semantics are BAD: they render the error in the wrong position unless amended anyway
// But it would make sense for an error that occured physically deeper to be stronger: a distinction is
// needed between occuredOffset and presentedOffset in the errors to make this work properly...
// If we did it, I'm not sure how we'd change this over: either 5.0.0 or we make new methods and `amend` the old ones
private [internal] class MakeVerifiedError private (msggen: Either[Any => Seq[String], Option[Any => String]]) extends Instr {
override def apply(ctx: Context): Unit = {
ensureRegularInstruction(ctx)
Expand Down

0 comments on commit f354b7d

Please sign in to comment.