improve code style in utility function
This commit is contained in:
parent
810b77fe06
commit
a6eead7c81
|
@ -264,13 +264,10 @@ private bool willImplicitBeUpcasted(const(DSymbol)* from, const(DSymbol)* to)
|
|||
}
|
||||
|
||||
private bool typeWillBeUpcastedTo(string from, string to) {
|
||||
string* found = from in INTEGER_PROMOTIONS;
|
||||
if (found is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (auto promotionType = from in INTEGER_PROMOTIONS)
|
||||
return *promotionType == to;
|
||||
|
||||
return INTEGER_PROMOTIONS[from] == to;
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool matchAliasThis(const(DSymbol)* beforeDotType, const(DSymbol)* incomingSymbol, int recursionDepth)
|
||||
|
|
Loading…
Reference in New Issue