Ignore:
Timestamp:
Mar 21, 2008, 7:34:57 PM (16 years ago)
Author:
dai_9181
Message:

・デリゲートの共変戻り値、反変引数に対応した。
・core.libで定義されたデリゲートがアプリケーションプロジェクトで利用できないバグを修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Type.cpp

    r447 r448  
    161161
    162162    return this->GetClass().IsSubClass( &type.GetClass() );
     163}
     164bool Type::IsContravariant( const Type &type ) const
     165{
     166    if( !this->IsObject() || !type.IsObject() )
     167    {
     168        // 反変性の判別はクラス型のみ
     169        return false;
     170    }
     171
     172    return type.GetClass().IsSubClass( &this->GetClass() );
    163173}
    164174
Note: See TracChangeset for help on using the changeset viewer.