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

Allow generic conversion operators

This commit is contained in:
Brian Fiete 2022-01-17 17:10:37 -05:00
parent c2461c8554
commit bf5c19269b
4 changed files with 45 additions and 21 deletions

View file

@ -12609,8 +12609,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
{
if (operatorDef->mOperatorDeclaration->mIsConvOperator)
{
if ((!explicitCast) && (operatorDef->mOperatorDeclaration->mExplicitToken != NULL) &&
(operatorDef->mOperatorDeclaration->mExplicitToken->GetToken() == BfToken_Explicit))
if ((!explicitCast) && (operatorDef->IsExplicit()))
continue;
if (!methodMatcher.IsMemberAccessible(checkType, operatorDef->mDeclaringType))