Skip to content

Commit 72eb400

Browse files
committed
One more test
1 parent ad86d3e commit 72eb400

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

Mathlib/Geometry/Manifold/Notation.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,9 @@ scoped elab:max "MDiff" ppSpace t:term:arg : term => do
401401
let (srcI, tgtI) ← findModels e none
402402
mkAppM ``MDifferentiable #[srcI, tgtI, e]
403403

404+
-- We ensure the type of `n` before checking `f` is a function to provide better error messages
405+
-- in case e.g. just `n` was forgotten.
406+
404407
/-- `CMDiffAt[s] n f x` elaborates to `ContMDiffWithinAt I J n f s x`,
405408
trying to determine `I` and `J` from the local context.
406409
`n` is coerced to `WithTop ℕ∞` if necessary (so passing a `ℕ`, `∞` or `ω` are all supported).

MathlibTest/DifferentialGeometry/Notation.lean

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,11 +581,29 @@ of type
581581
to be a function, or to be coercible to a function
582582
-/
583583
#guard_msgs in
584-
#check CMDiffAt[s] f m
584+
#check CMDiff[s] f m
585585

586-
-- yields a parse error, "unexpected toekn '/--'; expected term"
586+
-- yields a parse error, "unexpected token '/--'; expected term"
587587
-- #check CMDiffAt f
588588

589+
/--
590+
error: Type mismatch
591+
f
592+
has type
593+
M → M'
594+
of sort `Type (max u_10 u_4)` but is expected to have type
595+
WithTop ℕ∞
596+
of sort `Type`
597+
---
598+
error: Expected
599+
n
600+
of type
601+
Option ℕ∞
602+
to be a function, or to be coercible to a function
603+
-/
604+
#guard_msgs in
605+
#check CMDiff f n
606+
589607
end error
590608

591609
/-- info: ContMDiffWithinAt I I' 1 f s : M → Prop -/

0 commit comments

Comments
 (0)