Commit 39fa0adb by Jason Merrill Committed by Jason Merrill

re PR c++/53783 (lambda in lambda in template function rejected)

	PR c++/53783
	* pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
	for LAMBDA_EXPR_EXTRA_SCOPE.

From-SVN: r189190
parent e961d86e
2012-07-02 Jason Merrill <jason@redhat.com>
PR c++/53783
* pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
for LAMBDA_EXPR_EXTRA_SCOPE.
PR c++/53788
* pt.c (build_non_dependent_expr): Don't wrap a dummy object.
......
......@@ -14401,7 +14401,7 @@ tsubst_copy_and_build (tree t,
LAMBDA_EXPR_DISCRIMINATOR (r)
= (LAMBDA_EXPR_DISCRIMINATOR (t));
LAMBDA_EXPR_EXTRA_SCOPE (r)
= RECUR (LAMBDA_EXPR_EXTRA_SCOPE (t));
= tsubst (LAMBDA_EXPR_EXTRA_SCOPE (t), args, complain, in_decl);
LAMBDA_EXPR_RETURN_TYPE (r)
= tsubst (LAMBDA_EXPR_RETURN_TYPE (t), args, complain, in_decl);
......
2012-07-02 Jason Merrill <jason@redhat.com>
PR c++/53783
* g++.dg/cpp0x/lambda/lambda-template7.C: New.
PR c++/53788
* g++.dg/cpp0x/decltype39.C: New.
* g++.dg/diagnostic/method1.C: Adjust.
......
// PR c++/53783
// { dg-do compile { target c++11 } }
template <class T> void foo() { [] { [] {}; }; }
int main() { foo<void>(); }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment