Example #1
0
TypePtr TypeDataNamed::doResolve(ModuleBuilder& modBuilder)
{
	if(name == "Int32_")
	{
		return tyInt32;
	}
	else if(name == "Bool_")
	{
		return tyBool;
	}
	else if(name == "Unit_")
	{
		return tyUnit;
	}
	else if(name == "Double_")
	{
		return tyDouble;
	}
	else
	{
		TypePtr newType = modBuilder.resolveType(name);

		TypeDataComposite::doResolve();

		if(!typeAssignment.empty())
			newType = newType->apply(typeAssignment);

		assert(newType->kind != TyNamed);
		return newType;
	}
}