@@ -158,15 +158,15 @@ bool IdDependsOnImpl(ITypeSymbol? type)
158158 /// <param name="trapFile">The trap builder used to store the result.</param>
159159 /// <param name="symbolBeingDefined">The outer symbol being defined (to avoid recursive ids).</param>
160160 /// <param name="constructUnderlyingTupleType">Whether to build a type ID for the underlying `System.ValueTuple` struct in the case of tuple types.</param>
161- public static void BuildTypeId ( this ITypeSymbol type , Context cx , EscapingTextWriter trapFile , ISymbol symbolBeingDefined , bool constructUnderlyingTupleType = false )
161+ public static void BuildTypeId ( this ITypeSymbol type , Context cx , EscapingTextWriter trapFile , ISymbol symbolBeingDefined , bool constructUnderlyingTupleType )
162162 {
163163 using ( cx . StackGuard )
164164 {
165165 switch ( type . TypeKind )
166166 {
167167 case TypeKind . Array :
168168 var array = ( IArrayTypeSymbol ) type ;
169- array . ElementType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined ) ;
169+ array . ElementType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false ) ;
170170 array . BuildArraySuffix ( trapFile ) ;
171171 return ;
172172 case TypeKind . Class :
@@ -180,12 +180,12 @@ public static void BuildTypeId(this ITypeSymbol type, Context cx, EscapingTextWr
180180 return ;
181181 case TypeKind . Pointer :
182182 var ptr = ( IPointerTypeSymbol ) type ;
183- ptr . PointedAtType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined ) ;
183+ ptr . PointedAtType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false ) ;
184184 trapFile . Write ( '*' ) ;
185185 return ;
186186 case TypeKind . TypeParameter :
187187 var tp = ( ITypeParameterSymbol ) type ;
188- tp . ContainingSymbol . BuildOrWriteId ( cx , trapFile , symbolBeingDefined ) ;
188+ tp . ContainingSymbol . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false ) ;
189189 trapFile . Write ( '_' ) ;
190190 trapFile . Write ( tp . Name ) ;
191191 return ;
@@ -202,7 +202,7 @@ public static void BuildTypeId(this ITypeSymbol type, Context cx, EscapingTextWr
202202 }
203203 }
204204
205- private static void BuildOrWriteId ( this ISymbol ? symbol , Context cx , EscapingTextWriter trapFile , ISymbol symbolBeingDefined , bool constructUnderlyingTupleType = false )
205+ private static void BuildOrWriteId ( this ISymbol ? symbol , Context cx , EscapingTextWriter trapFile , ISymbol symbolBeingDefined , bool constructUnderlyingTupleType )
206206 {
207207 if ( symbol is null )
208208 {
@@ -245,7 +245,7 @@ private static void BuildOrWriteId(this ISymbol? symbol, Context cx, EscapingTex
245245 /// <paramref name="symbol" />.
246246 /// </summary>
247247 public static void BuildOrWriteId ( this ISymbol ? symbol , Context cx , EscapingTextWriter trapFile , ISymbol symbolBeingDefined ) =>
248- symbol . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , true ) ;
248+ symbol . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false ) ;
249249
250250 /// <summary>
251251 /// Constructs an array suffix string for this array type symbol.
@@ -292,7 +292,7 @@ private static void BuildNamedTypeId(this INamedTypeSymbol named, Context cx, Es
292292 {
293293 trapFile . Write ( ( f . CorrespondingTupleField ?? f ) . Name ) ;
294294 trapFile . Write ( ":" ) ;
295- f . Type . BuildOrWriteId ( cx , trapFile , symbolBeingDefined ) ;
295+ f . Type . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false ) ;
296296 }
297297 ) ;
298298 trapFile . Write ( ")" ) ;
@@ -303,7 +303,7 @@ void AddContaining()
303303 {
304304 if ( named . ContainingType is not null )
305305 {
306- named . ContainingType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined ) ;
306+ named . ContainingType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false ) ;
307307 trapFile . Write ( '.' ) ;
308308 }
309309 else if ( named . ContainingNamespace is not null )
@@ -335,7 +335,7 @@ void AddContaining()
335335 // a constructed type with different nullability of its members and methods,
336336 // so we need to create a distinct database entity for it.
337337 trapFile . BuildList ( "," , named . GetAnnotatedTypeArguments ( ) ,
338- ta => ta . Symbol . BuildOrWriteId ( cx , trapFile , symbolBeingDefined )
338+ ta => ta . Symbol . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false )
339339 ) ;
340340 trapFile . Write ( '>' ) ;
341341 }
0 commit comments