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:
parent
bca0440b16
commit
16be83ceda
12 changed files with 174 additions and 82 deletions
|
@ -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()))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue