Commit 10e8dd82 by Jason Merrill Committed by Jason Merrill

* pt.c (tsubst_aggr_type): Check TYPE_P before tsubsting.

From-SVN: r178650
parent aad0eef6
2011-09-07 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_aggr_type): Check TYPE_P before tsubsting.
2011-09-06 Jason Merrill <jason@redhat.com> 2011-09-06 Jason Merrill <jason@redhat.com>
PR c++/50296 PR c++/50296
......
...@@ -9590,14 +9590,13 @@ tsubst_aggr_type (tree t, ...@@ -9590,14 +9590,13 @@ tsubst_aggr_type (tree t,
/* First, determine the context for the type we are looking /* First, determine the context for the type we are looking
up. */ up. */
context = TYPE_CONTEXT (t); context = TYPE_CONTEXT (t);
if (context) if (context && TYPE_P (context))
{ {
context = tsubst_aggr_type (context, args, complain, context = tsubst_aggr_type (context, args, complain,
in_decl, /*entering_scope=*/1); in_decl, /*entering_scope=*/1);
/* If context is a nested class inside a class template, /* If context is a nested class inside a class template,
it may still need to be instantiated (c++/33959). */ it may still need to be instantiated (c++/33959). */
if (TYPE_P (context)) context = complete_type (context);
context = complete_type (context);
} }
/* Then, figure out what arguments are appropriate for the /* Then, figure out what arguments are appropriate for the
......
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