lean4-htt/tests/lean/classBadOutParam.lean
Leonardo de Moura ef43a08b91 feat: add checkOutParam validation
It implements the approach we have discussed at
`src/library/type_context.cpp`.
2019-12-01 18:32:48 -08:00

5 lines
202 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class C1 (x : outParam Nat) (y : { n : Nat // n > x }) (α : Type) := -- should fail
(val : α)
class C2 (x : outParam Nat) (y : outParam { n : Nat // n > x }) (α : Type) := -- should work
(val : α)