@@ -779,8 +779,8 @@ public ArrayType(Context cx, Type element) : base(cx)
779779
780780 public override Id MakeId ( bool inContext ) => elementType . GetId ( inContext ) + openBracket + rank + closeBracket ;
781781
782- static readonly StringId openBracket = new StringId ( "[] " ) ;
783- static readonly StringId closeBracket = new StringId ( "[ ]" ) ;
782+ static readonly StringId openBracket = new StringId ( "[" ) ;
783+ static readonly StringId closeBracket = new StringId ( "]" ) ;
784784
785785 public override Id Name => elementType . Name + openBracket + closeBracket ;
786786
@@ -1107,11 +1107,20 @@ public Id MakeId(GenericContext gc) =>
11071107 ITypeSignature IConstructedTypeProvider < ITypeSignature > . GetGenericInstantiation ( ITypeSignature genericType , ImmutableArray < ITypeSignature > typeArguments ) =>
11081108 new Instantiation { genericType = genericType , typeArguments = typeArguments } ;
11091109
1110+ static readonly Id open = Id . Create ( "{" ) ;
1111+ static readonly Id close = Id . Create ( "}" ) ;
1112+
11101113 class GenericMethodParameter : ITypeSignature
11111114 {
1115+ public object innerGc ;
11121116 public int index ;
11131117 static readonly Id excl = Id . Create ( "M!" ) ;
1114- public Id MakeId ( GenericContext gc ) => excl + index ;
1118+ public Id MakeId ( GenericContext outerGc )
1119+ {
1120+ if ( innerGc != outerGc && innerGc is Method method )
1121+ return open + method . Label . Value + close + excl + index ;
1122+ return excl + index ;
1123+ }
11151124 }
11161125
11171126 class GenericTypeParameter : ITypeSignature
@@ -1122,7 +1131,7 @@ class GenericTypeParameter : ITypeSignature
11221131 }
11231132
11241133 ITypeSignature ISignatureTypeProvider < ITypeSignature , object > . GetGenericMethodParameter ( object genericContext , int index ) =>
1125- new GenericMethodParameter { index = index } ;
1134+ new GenericMethodParameter { innerGc = genericContext , index = index } ;
11261135
11271136 ITypeSignature ISignatureTypeProvider < ITypeSignature , object > . GetGenericTypeParameter ( object genericContext , int index ) =>
11281137 new GenericTypeParameter { index = index } ;
0 commit comments