1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Suppress 'unreachable code' for 'System.Compiler' comparison branches

This commit is contained in:
Brian Fiete 2022-03-19 09:16:51 -07:00
parent 7cb92e4007
commit 87d403f72e
4 changed files with 52 additions and 2 deletions

View file

@ -113,6 +113,11 @@ BfTypedValue BfConstResolver::Resolve(BfExpression* expr, BfType* wantType, BfCo
VisitChildNoRef(expr);
mResult = GetResult();
auto compilerVal = mModule->GetCompilerFieldValue(mResult);
if (compilerVal)
mResult = compilerVal;
if ((mResult) && (wantType != NULL))
{
auto typeInst = mResult.mType->ToTypeInstance();