@@ -158,15 +158,15 @@ bool IdDependsOnImpl(ITypeSymbol? type)
158
158
/// <param name="trapFile">The trap builder used to store the result.</param>
159
159
/// <param name="symbolBeingDefined">The outer symbol being defined (to avoid recursive ids).</param>
160
160
/// <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 )
162
162
{
163
163
using ( cx . StackGuard )
164
164
{
165
165
switch ( type . TypeKind )
166
166
{
167
167
case TypeKind . Array :
168
168
var array = ( IArrayTypeSymbol ) type ;
169
- array . ElementType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined ) ;
169
+ array . ElementType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false ) ;
170
170
array . BuildArraySuffix ( trapFile ) ;
171
171
return ;
172
172
case TypeKind . Class :
@@ -180,12 +180,12 @@ public static void BuildTypeId(this ITypeSymbol type, Context cx, EscapingTextWr
180
180
return ;
181
181
case TypeKind . Pointer :
182
182
var ptr = ( IPointerTypeSymbol ) type ;
183
- ptr . PointedAtType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined ) ;
183
+ ptr . PointedAtType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false ) ;
184
184
trapFile . Write ( '*' ) ;
185
185
return ;
186
186
case TypeKind . TypeParameter :
187
187
var tp = ( ITypeParameterSymbol ) type ;
188
- tp . ContainingSymbol . BuildOrWriteId ( cx , trapFile , symbolBeingDefined ) ;
188
+ tp . ContainingSymbol . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false ) ;
189
189
trapFile . Write ( '_' ) ;
190
190
trapFile . Write ( tp . Name ) ;
191
191
return ;
@@ -202,7 +202,7 @@ public static void BuildTypeId(this ITypeSymbol type, Context cx, EscapingTextWr
202
202
}
203
203
}
204
204
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 )
206
206
{
207
207
if ( symbol is null )
208
208
{
@@ -245,7 +245,7 @@ private static void BuildOrWriteId(this ISymbol? symbol, Context cx, EscapingTex
245
245
/// <paramref name="symbol" />.
246
246
/// </summary>
247
247
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 ) ;
249
249
250
250
/// <summary>
251
251
/// Constructs an array suffix string for this array type symbol.
@@ -292,7 +292,7 @@ private static void BuildNamedTypeId(this INamedTypeSymbol named, Context cx, Es
292
292
{
293
293
trapFile . Write ( ( f . CorrespondingTupleField ?? f ) . Name ) ;
294
294
trapFile . Write ( ":" ) ;
295
- f . Type . BuildOrWriteId ( cx , trapFile , symbolBeingDefined ) ;
295
+ f . Type . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false ) ;
296
296
}
297
297
) ;
298
298
trapFile . Write ( ")" ) ;
@@ -303,7 +303,7 @@ void AddContaining()
303
303
{
304
304
if ( named . ContainingType is not null )
305
305
{
306
- named . ContainingType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined ) ;
306
+ named . ContainingType . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false ) ;
307
307
trapFile . Write ( '.' ) ;
308
308
}
309
309
else if ( named . ContainingNamespace is not null )
@@ -335,7 +335,7 @@ void AddContaining()
335
335
// a constructed type with different nullability of its members and methods,
336
336
// so we need to create a distinct database entity for it.
337
337
trapFile . BuildList ( "," , named . GetAnnotatedTypeArguments ( ) ,
338
- ta => ta . Symbol . BuildOrWriteId ( cx , trapFile , symbolBeingDefined )
338
+ ta => ta . Symbol . BuildOrWriteId ( cx , trapFile , symbolBeingDefined , constructUnderlyingTupleType : false )
339
339
) ;
340
340
trapFile . Write ( '>' ) ;
341
341
}
0 commit comments