MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / isValidArgumentType

Function isValidArgumentType

src/simulate/debug_info.cpp:348–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346 }
347
348 bool isValidArgumentType ( TypeInfo * argType, TypeInfo * passType ) {
349 // passing non-ref to ref, or passing not the same type
350 if ( (argType->isRef() && !passType->isRef()) || !isSameType(argType,passType,RefMatters::no, ConstMatters::no, TemporaryMatters::no,false) ) {
351 return false;
352 }
353 // ref or pointer can only add const
354 if ( (argType->isRef() || argType->type==Type::tPointer) && !argType->isConst() && passType->isConst() ) {
355 return false;
356 }
357 // all good
358 return true;
359 }
360
361 bool isMatchingArgumentType ( TypeInfo * argType, TypeInfo * passType) {
362 if (!passType) {

Callers 1

verifyCallFunction · 0.85

Calls 3

isSameTypeFunction · 0.85
isRefMethod · 0.80
isConstMethod · 0.80

Tested by

no test coverage detected