| 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); |