Regression when giving instances with visible arguments
ncfavier opened this issue · comments
module Bug where
postulate
T : Set
I : T → Set
record Foo : Set where
field
t : T
instance
I-t : I t
auto : ∀ {ℓ} {A : Set ℓ} → ⦃ A ⦄ → A
auto ⦃ a ⦄ = a
module _ (f : Foo) where -- f needs to be visible
open Foo f
bug : I t
bug = {! auto !}
Trying to give auto
fails with
No instance of type I t was found in scope.
when checking that the expression auto has type I t
yet auto
is accepted if the hole is removed. This regression appeared somewhere between a445e3b and aa5d8bb.