Using an undeclared function with declared parameters in an invariant results in an error about the parameters being undeclared:
Doing the same anywhere else in the code behaves as one would expect:
coproc test() -> ()
{
var declared: Bool = true
var x: Bool = undeclared(declared)
@invariant(undeclared(declared))
while true {
x = true
}
}