1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 20:12:21 +02:00

Made implicit tuple cast check names, fixed explicit tuple cast

This commit is contained in:
Brian Fiete 2020-01-24 10:36:22 -08:00
parent 1f77412536
commit fd64aa64d9
12 changed files with 92 additions and 87 deletions

View file

@ -1018,7 +1018,7 @@ void BfModule::TryInitVar(BfAstNode* checkNode, BfLocalVariable* localVar, BfTyp
BfTypeInstance* srcTypeInstance = initValue.mType->ToTypeInstance();
BfTypeInstance* varTypeInstance = varType->ToTypeInstance();
if (CanImplicitlyCast(initValue, varType))
if (CanCast(initValue, varType))
{
if ((!varType->IsPointer()) && (!varType->IsObjectOrInterface()))
{
@ -1044,7 +1044,7 @@ void BfModule::TryInitVar(BfAstNode* checkNode, BfLocalVariable* localVar, BfTyp
// // Class downcast
// isDynamicCast = true;
// }
// else if ((!CanImplicitlyCast(GetFakeTypedValue(varType), initType)) && (!initType->IsGenericParam()))
// else if ((!CanCast(GetFakeTypedValue(varType), initType)) && (!initType->IsGenericParam()))
// {
// if (!IsInSpecializedSection())
// {