Fixed incorrect constant types and added unit test.
This commit is contained in:
@@ -52,7 +52,7 @@ void parseAndAddConstantDeclarations(Context &context, ast::Domain &domain, ast:
|
||||
constantDeclarations[i]->type = ast::deepCopy(parentType);
|
||||
|
||||
// All types up to now are labeled with their parent types
|
||||
inheritanceIndex = constantDeclarations.size() + 1;
|
||||
inheritanceIndex = constantDeclarations.size();
|
||||
|
||||
tokenizer.skipWhiteSpace();
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ void parseAndAddPrimitiveTypeDeclarations(Context &context, ast::Domain &domain)
|
||||
types[i]->parentTypes.emplace_back(ast::deepCopy(parentType));
|
||||
|
||||
// All types up to now are labeled with their parent types
|
||||
inheritanceIndex = types.size() + 1;
|
||||
inheritanceIndex = types.size();
|
||||
|
||||
tokenizer.skipWhiteSpace();
|
||||
}
|
||||
|
Reference in New Issue
Block a user