Changeset 448 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src/Parameter.cpp
- Timestamp:
- Mar 21, 2008, 7:34:57 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/Parameter.cpp
r422 r448 2 2 3 3 4 bool Parameter::Equals( const Parameter ¶m ) const4 bool Parameter::Equals( const Parameter ¶m, bool isContravariant ) const 5 5 { 6 6 if( Type::Equals( param ) ) … … 25 25 } 26 26 27 if( isContravariant ) 28 { 29 // 反変引数を許可する 30 if( this->IsContravariant( param ) ) 31 { 32 // 反変引数だったとき 33 return true; 34 } 35 } 36 27 37 return false; 28 38 } 29 bool Parameter::Equals( const Types &actualTypeParametersForThisProc, const Parameter ¶m ) const30 { 31 if( Equals( param ) )39 bool Parameter::Equals( const Types &actualTypeParametersForThisProc, const Parameter ¶m, bool isContravariant ) const 40 { 41 if( Equals( param, isContravariant ) ) 32 42 { 33 43 return true; … … 47 57 } 48 58 49 bool Parameters::Equals( const Parameters ¶ms ) const59 bool Parameters::Equals( const Parameters ¶ms, bool isContravariant ) const 50 60 { 51 61 if( this->size() != params.size() ){ … … 55 65 int max = (int)this->size(); 56 66 for( int i=0; i<max; i++ ){ 57 if( !(*this)[i]->Equals( *params[i] ) ){67 if( !(*this)[i]->Equals( *params[i], isContravariant ) ){ 58 68 return false; 59 69 } … … 62 72 return true; 63 73 } 64 bool Parameters::Equals( const Types &actualTypeParametersForThisProc, const Parameters ¶ms ) const74 bool Parameters::Equals( const Types &actualTypeParametersForThisProc, const Parameters ¶ms, bool isContravariant ) const 65 75 { 66 76 if( this->size() != params.size() ){ … … 70 80 int max = (int)this->size(); 71 81 for( int i=0; i<max; i++ ){ 72 if( !(*this)[i]->Equals( actualTypeParametersForThisProc, *params[i] ) ){82 if( !(*this)[i]->Equals( actualTypeParametersForThisProc, *params[i], isContravariant ) ){ 73 83 return false; 74 84 }
Note:
See TracChangeset
for help on using the changeset viewer.