mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed global lookup in default param values
This commit is contained in:
parent
1d5bb1fade
commit
6e58454825
1 changed files with 6 additions and 0 deletions
|
@ -22002,6 +22002,12 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
|
|||
}
|
||||
else
|
||||
{
|
||||
BfTypeState typeState;
|
||||
typeState.mTypeInstance = mCurTypeInstance;
|
||||
typeState.mCurTypeDef = methodDef->mDeclaringType;
|
||||
//typeState.mCurMethodDef = methodDef;
|
||||
SetAndRestoreValue<BfTypeState*> prevTypeState(mContext->mCurTypeState, &typeState);
|
||||
|
||||
BfConstResolver constResolver(this);
|
||||
defaultValue = constResolver.Resolve(paramDef->mParamDeclaration->mInitializer, resolvedParamType, (BfConstResolveFlags)(BfConstResolveFlag_NoCast | BfConstResolveFlag_AllowGlobalVariable));
|
||||
if ((defaultValue) && (defaultValue.mType != resolvedParamType))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue