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

Method canSubstitute

src/ast/ast_handle.cpp:49–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48
49 bool BasicStructureAnnotation::canSubstitute(TypeAnnotation * ann) const {
50 if ( this==ann ) return true;
51 if ( this->module != ann->module ) return false;
52 if ( ann->rtti_isBasicStructureAnnotation() ) {
53 auto* AEA = static_cast<BasicStructureAnnotation*>(ann);
54 for ( auto p : AEA->parents ) {
55 if ( p == this ) return true;
56 }
57 }
58 return false;
59 }
60
61 void BasicStructureAnnotation::seal( Module * m ) {
62 TypeAnnotation::seal(m);

Callers 1

isSameTypeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected