@@ -274,7 +274,7 @@ private Dictionary<string, string[]> ImplementType() {
274274
275275 ImplementProtectedFieldAccessors ( specialNames ) ;
276276
277- Dictionary < Type , bool > doneTypes = new Dictionary < Type , bool > ( ) ;
277+ var doneTypes = new HashSet < Type > ( ) ;
278278 foreach ( Type interfaceType in _interfaceTypes ) {
279279 DoInterfaceType ( interfaceType , doneTypes , specialNames ) ;
280280 }
@@ -364,15 +364,15 @@ private static bool CanOverrideMethod(MethodInfo mi) {
364364 return true ;
365365 }
366366
367- private void DoInterfaceType ( Type interfaceType , Dictionary < Type , bool > doneTypes , Dictionary < string , string [ ] > specialNames ) {
367+ private void DoInterfaceType ( Type interfaceType , HashSet < Type > doneTypes , Dictionary < string , string [ ] > specialNames ) {
368368 if ( interfaceType == typeof ( IDynamicMetaObjectProvider ) ) {
369369 // very tricky, we'll handle it when we're creating
370370 // our own IDynamicMetaObjectProvider interface
371371 return ;
372372 }
373373
374- if ( doneTypes . ContainsKey ( interfaceType ) ) return ;
375- doneTypes . Add ( interfaceType , true ) ;
374+ if ( doneTypes . Contains ( interfaceType ) ) return ;
375+ doneTypes . Add ( interfaceType ) ;
376376 OverrideMethods ( interfaceType , specialNames ) ;
377377
378378 foreach ( Type t in interfaceType . GetInterfaces ( ) ) {
0 commit comments