mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Const resolve enum case cast fix
This commit is contained in:
parent
f830e23c52
commit
53f4e8955e
4 changed files with 17 additions and 2 deletions
|
@ -4679,6 +4679,10 @@ BfTypedValue BfModule::GetFieldInitializerValue(BfFieldInstance* fieldInstance,
|
|||
// auto-created underlying type and it will cause an 'error flash'. We defer errors until the full resolve for that purpose
|
||||
resolveFlags = BfConstResolveFlag_NoCast;
|
||||
}
|
||||
|
||||
if ((mCurTypeInstance->IsEnum()) && (fieldDef->IsEnumCaseEntry()))
|
||||
resolveFlags = (BfConstResolveFlags)(resolveFlags | BfConstResolveFlag_NoConversionOperator | BfConstResolveFlag_ExplicitCast);
|
||||
|
||||
UpdateSrcPos(initializer);
|
||||
auto result = constResolver.Resolve(initializer, fieldType, resolveFlags);
|
||||
if ((mCompiler->mCeMachine != NULL) && (fieldInstance != NULL))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue