Zulip Chat Archive

Stream: lean4

Topic: VS Code lightbulb bug


Martin Dvořák (Sep 21 2023 at 16:00):

import Mathlib.Data.Real.Basic

example (P Q : Prop) (hyp : P  Q) : False :=
by
  cases hyp
  sorry

Now I press Quick Fix:
image.png

import Mathlib.Data.Real.Basic

example (P Q : Prop) (hyp : P  Q) : False :=
by
  cases hyp with
  | a => sorry
  | b => sorry
  | inl h => sorry
  | inr h => sorry
  sorry

The generated code isn't desirable.

Patrick Massot (Sep 21 2023 at 16:04):

This is a recent bug. I can reproduce on Mathlib master but not in MIL.

Patrick Massot (Sep 21 2023 at 16:07):

And it has nothing to do with Mathlib:

import Std.CodeAction

example (P Q : Prop) (hyp : P  Q) : False :=
by
  cases hyp
  sorry

Martin Dvořák (Sep 21 2023 at 16:08):

Thanks for the minimization! I didn't know what the necessary import was.

Martin Dvořák (Sep 26 2023 at 17:37):

FYI it seems to be fine on the newest toolchain.

Eric Wieser (Sep 26 2023 at 17:46):

Still broken for me in the web editor

Eric Wieser (Sep 26 2023 at 17:47):

The lightbulb on the sorry works, but not on the cases

Mario Carneiro (Sep 26 2023 at 17:47):

this is fixed on master

Mario Carneiro (Sep 26 2023 at 17:47):

std master, not mathlib master

Scott Morrison (Sep 26 2023 at 22:51):

Dependency bump incoming at #7393, looks promising locally.


Last updated: Dec 20 2023 at 11:08 UTC