Commit 6df1f72e by Ian Lance Taylor

Determine types in global variable preinit blocks.

From-SVN: r170025
parent a14dd08a
...@@ -3357,6 +3357,9 @@ Variable::type() const ...@@ -3357,6 +3357,9 @@ Variable::type() const
void void
Variable::determine_type() Variable::determine_type()
{ {
if (this->preinit_ != NULL)
this->preinit_->determine_types();
// A variable in a type switch with a nil case will have the wrong // A variable in a type switch with a nil case will have the wrong
// type here. It will have an initializer which is a type guard. // type here. It will have an initializer which is a type guard.
// We want to initialize it to the value without the type guard, and // We want to initialize it to the value without the type guard, and
......
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