lean4-htt/tests/lean/run/1852.lean
2022-12-01 06:11:48 -08:00

26 lines
473 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 foo (F : Type) where
foo : F
class foobar (F : outParam Type) [foo F] where
bar : F
class C (α : Type) where
val : α
class D (α : Type) (β : outParam Type) [C β] where
val1 : α
val2 : β := C.val
instance : C String where
val := "hello"
instance : C Nat where
val := 42
instance : D Nat String where
val1 := 37
def f (α : Type) {β : Type} {_ : C β} [D α β] : α × β :=
(D.val1, D.val2 α)
example : f Nat = (37, "hello") := rfl