fix reference type inference

This commit is contained in:
Nathan Braswell
2015-07-15 13:56:57 -04:00
parent 06f36f2a87
commit 51adf491fa
8 changed files with 65 additions and 30 deletions

View File

@@ -709,7 +709,8 @@ NodeTree<ASTData>* ASTTransformation::transform(NodeTree<Symbol>* from, NodeTree
// for type inferencing
if (!identifierType) {
if (toAssign) {
identifierType = toAssign->getDataRef()->valueType;
// no reference variables
identifierType = toAssign->getDataRef()->valueType->withoutReference();
newIdentifier->getDataRef()->valueType = identifierType;
} else
throw "have to inference but no expression";