brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 109 forks source link

error message only highlights on mouseover #1291

Closed shriram closed 6 years ago

shriram commented 6 years ago
r = reactor:
  init: init-state,
  update: update
end

(assume update is defined). The error is the reactor handler named update, which should be called on-tick. The error reads

image

but there is no associated highlighting. However, when you hover over the "definitions…" line at the bottom of the error, the corresponding code does highlight…for some reason it doesn't unless you do.

blerner commented 6 years ago

I actually literally fixed this last night, since it was annoying me. If you try this on pyret-horizon right now, you'll get screenshot

It's debatable whether highlighting "Well-formedness" is the best place to put the highlighting, but it's better than the message above. @jswrenn if you decide to revise these messages further: I've updated the signature for wf-err so that instead of taking a mere String as argument, it takes a List<ErrorDisplay> so that you can have richer output here.