1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Disallow object-to-void* casting. Lowering fixes. Variant fixes.

This commit is contained in:
Brian Fiete 2020-06-23 07:32:53 -07:00
parent bca0440b16
commit 16be83ceda
12 changed files with 174 additions and 82 deletions

View file

@ -8881,12 +8881,6 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
if (explicitCast)
{
// Object -> void*
if ((typedVal.mType->IsObject()) && (toType->IsVoidPtr()))
{
return mBfIRBuilder->CreateBitCast(typedVal.mValue, mBfIRBuilder->MapType(toType));
}
// Func -> void*
if ((typedVal.mType->IsFunction()) && (toType->IsVoidPtr()))
{