Skip to content

Commit

Permalink
"fix" test
Browse files Browse the repository at this point in the history
Turns out I had a typo in the argument list. The problem was not with implicit universes, rather it was with implicit parameters.
Also adds new testcases to expose this bug properly
  • Loading branch information
alexkeizer committed Dec 11, 2024
1 parent b9807ee commit 467d63d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/lean/run/derivingToExpr.lean
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ inductive WithAmbientUniverse (α : Type u)
| foo (a : α)
deriving ToExpr

set_option trace.Elab.Deriving.toExpr true in
-- A test with: an ambient universe `u`, a directly specified universe `v`, and
-- an implicit universe `w`
universe u in
structure WithAmbientUniverseTriple.{v} (α : Type u) (β : Type v) (y : Type w) where
structure WithAmbientUniverseTriple.{v} (α : Type u) (β : Type v) (γ : Type w) where
a : α
b : β
c : γ
Expand Down Expand Up @@ -95,3 +96,14 @@ structure ExplicitAmbientPair.{v} (α : Type u) (β : Type v) where
deriving ToExpr

end NoAutoImplicit

-- Test with an implicit parameter to the inductive type
inductive ImplicitParameter
| foo (a : α)
deriving ToExpr

-- Test where the type parameter is a variable, with an implicit universe
variable {α : Type u} in
inductive VariableParameter : Type
| foo (a : α)
deriving ToExpr

0 comments on commit 467d63d

Please sign in to comment.