lean4 icon indicating copy to clipboard operation
lean4 copied to clipboard

rcases doesn't complain about unsynthesized placeholder

Open fpvandoorn opened this issue 1 year ago • 0 comments

Prerequisites

Please put an X between the brackets as you perform the following steps:

  • [x] Check that your issue is not already filed: https://github.com/leanprover/lean4/issues
  • [x] Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to Mathlib or Batteries.
  • [x] Test your test case against the latest nightly release, for example on https://live.lean-lang.org/#project=lean-nightly (You can also use the settings there to switch to “Lean nightly”)

Description

If you write rcases x and x still has metavariables, this is not reported until the tactic is finished (and no new goals are generated for the metavariables)

Steps to Reproduce

example (p q : Prop) (h : Nat → p ∨ q) : True := by
  rcases h _ with h|h
  · trivial
  -- · trivial 
  -- if you uncomment the previous line, the expected error "don't know how to synthesize placeholder" is shown

Expected behavior: already display the error in the rcases tactic (or potentially create a new goal for it - maybe if you write ?_ for the metavariable)

Actual behavior: no warning/error (besides "unsolved goals")

Context

Zulip

This bug also affects cases' (from Mathlib)

Impact

Add :+1: to issues you consider important. If others are impacted by this issue, please ask them to add :+1: to it.

fpvandoorn avatar Oct 15 '24 13:10 fpvandoorn