src/compiler/NameBinding.cpp
changeset 222 0cde1379b29f
parent 220 5df4a112967d
child 224 321a652349a6
     1.1 --- a/src/compiler/NameBinding.cpp	Mon Nov 19 02:12:13 2012 -0800
     1.2 +++ b/src/compiler/NameBinding.cpp	Thu Dec 20 00:59:38 2012 -0800
     1.3 @@ -818,6 +818,15 @@
     1.4                  }
     1.5              }
     1.6  
     1.7 +			if (param->reference()) {
     1.8 +				if (!type->isPod()) {
     1.9 +					cc_.reportError(param->pos(), Message_ArrayCantBeReference);
    1.10 +					return false;
    1.11 +				}
    1.12 +				if ((type = zone_->types()->getReference(type, false)) == NULL)
    1.13 +					return false;
    1.14 +			}
    1.15 +
    1.16              params->set(zone_, i, type);
    1.17              param->sym()->setType(type);
    1.18          }