expr.prim.lambda.capture p5 says:
If an identifier in a capture appears as the declarator-id of a parameter of
the lambda-declarator's parameter-declaration-clause or as the name of a
template parameter of the lambda-expression's template-parameter-list,
the program is ill-formed.
and also has the following example:
auto h = [y = 0]<typename y>(y) { return 0; };
which now results in
error: declaration of 'y' shadows template parameter auto l1 = [y = 0]<typename y>(y) { return 0; }; ^ note: template parameter is declared here auto l1 = [y = 0]<typename y>(y) { return 0; }; ^