[expression.d] move isDotOpDispatch to expressionsem.d make private (#15685)

This commit is contained in:
Nicholas Wilson 2023-10-15 22:41:56 +08:00 committed by GitHub
parent 147b3707a6
commit c5c0462953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View file

@ -238,17 +238,6 @@ bool isNeedThisScope(Scope* sc, Declaration d)
return true;
}
/******************************
* check e is exp.opDispatch!(tiargs) or not
* It's used to switch to UFCS the semantic analysis path
*/
bool isDotOpDispatch(Expression e)
{
if (auto dtie = e.isDotTemplateInstanceExp())
return dtie.ti.name == Id.opDispatch;
return false;
}
/****************************************
* Expand tuples in-place.
*

View file

@ -482,6 +482,18 @@ private Expression searchUFCS(Scope* sc, UnaExp ue, Identifier ident)
}
}
/******************************
* check e is exp.opDispatch!(tiargs) or not
* It's used to switch to UFCS the semantic analysis path
*/
private bool isDotOpDispatch(Expression e)
{
if (auto dtie = e.isDotTemplateInstanceExp())
return dtie.ti.name == Id.opDispatch;
return false;
}
/******************************
* Pull out callable entity with UFCS.
*/