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

Function isCompatibleFunction

src/ast/ast_derive_alias.cpp:24–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 }
23
24 bool isCompatibleFunction ( const FunctionPtr & func, const TypeDeclPtr & inv ) {
25 if ( func->arguments.size()!=inv->argTypes.size() ) return false;
26 if ( !inv->firstType->isSameType(*func->result, RefMatters::yes, ConstMatters::yes, TemporaryMatters::yes) ) {
27 return false;
28 }
29 for ( size_t i=0, is=func->arguments.size(); i!=is; ++i ) {
30 if ( !inv->argTypes[i]->isSameType(*func->arguments[i]->type, RefMatters::yes, ConstMatters::yes, TemporaryMatters::yes, AllowSubstitute::yes, false, false) ) {
31 return false;
32 }
33 }
34 return true;
35 }
36
37 void collectInvokeIndVariables ( const ProgramPtr & program, const TypeDeclPtr & inv, IndirectSources & sources ) {
38 das_hash_set<Function *> accessed;

Callers 1

Calls 2

isSameTypeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected