1 // PR c++/89522
2 // { dg-do compile { target c++14 } }
3 
4 template <typename F>
foo(F f)5 void foo (F f)
6 {
7   f (1);
8 }
9 template <typename T>
bar(T)10 void bar (T)
11 {
12   auto f = [&](auto i) { if (f); };  // { dg-error "use of .f. before deduction of .auto." }
13   foo (f);
14 }
main()15 int main ()
16 {
17   bar (0);
18 }
19