fix: make sure borrow annotations do not affect auto-completion

This commit is contained in:
Leonardo de Moura 2021-04-09 13:47:28 -07:00
parent bc8daee635
commit 3318c75bed

View file

@ -180,7 +180,8 @@ private def isDotCompletionMethod (info : ConstantInfo) : MetaM Bool :=
forallTelescopeReducing info.type fun xs _ => do
for x in xs do
let localDecl ← getLocalDecl x.fvarId!
if localDecl.type.getAppFn.isConstOf info.name.getPrefix then
let type := localDecl.type.consumeMData
if type.getAppFn.isConstOf info.name.getPrefix then
return true
return false