| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a261cba commit fe83bac
21 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -204,7 +204,7 @@ protected static void AddSignatureTypeToId(Context cx, TextWriter trapFile, IMet | |||
| 204 | 204 | if (type.ContainsTypeParameters(cx, method)) | |
| 205 | 205 | type.BuildTypeId(cx, trapFile, (cx0, tb0, type0) => AddSignatureTypeToId(cx, tb0, method, type0)); | |
| 206 | 206 | else | |
| 207 | - trapFile.WriteSubId(Type.Create(cx, type).TypeRef); | ||
| 207 | + trapFile.WriteSubId(Type.Create(cx, type)); | ||
| 208 | 208 | } | |
| 209 | 209 | ||
| 210 | 210 | protected static void AddParametersToId(Context cx, TextWriter trapFile, IMethodSymbol method) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -86,8 +86,7 @@ public override void WriteId(TextWriter trapFile) | |||
| 86 | 86 | trapFile.Write(";parameter"); | |
| 87 | 87 | } | |
| 88 | 88 | ||
| 89 | - // If we don't have the type of the parameter, do not populate it. | ||
| 90 | - public override bool NeedsPopulation => symbol.Type.TypeKind != TypeKind.Error; | ||
| 89 | + public override bool NeedsPopulation => true; | ||
| 91 | 90 | ||
| 92 | 91 | string Name | |
| 93 | 92 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,7 @@ public override void Populate(TextWriter trapFile) | |||
| 29 | 29 | return; | |
| 30 | 30 | } | |
| 31 | 31 | ||
| 32 | - trapFile.typeref_type((TypeRef)TypeRef, this); | ||
| 32 | + trapFile.typeref_type((NamedTypeRef)TypeRef, this); | ||
| 33 | 33 | ||
| 34 | 34 | if (symbol.IsGenericType) | |
| 35 | 35 | { | |
@@ -151,39 +151,34 @@ class NamedTypeFactory : ICachedEntityFactory<INamedTypeSymbol, NamedType> | |||
| 151 | 151 | public NamedType Create(Context cx, INamedTypeSymbol init) => new NamedType(cx, init); | |
| 152 | 152 | } | |
| 153 | 153 | ||
| 154 | - public override Type TypeRef => Entities.TypeRef.Create(Context, this, symbol); | ||
| 154 | + public override Type TypeRef => NamedTypeRef.Create(Context, symbol); | ||
| 155 | 155 | } | |
| 156 | 156 | ||
| 157 | - class TypeRef : Type<ITypeSymbol> | ||
| 157 | + class NamedTypeRef : Type<INamedTypeSymbol> | ||
| 158 | 158 | { | |
| 159 | 159 | readonly Type referencedType; | |
| 160 | 160 | ||
| 161 | - public TypeRef(Context cx, Type type, ITypeSymbol symbol) : base(cx, symbol) | ||
| 161 | + public NamedTypeRef(Context cx, INamedTypeSymbol symbol) : base(cx, symbol) | ||
| 162 | 162 | { | |
| 163 | - referencedType = type; | ||
| 163 | + referencedType = Type.Create(cx, symbol); | ||
| 164 | 164 | } | |
| 165 | 165 | ||
| 166 | - public static TypeRef Create(Context cx, Type referencedType, ITypeSymbol type) => | ||
| 167 | - NamedTypeRefFactory.Instance.CreateEntity2(cx, (referencedType, type)); | ||
| 166 | + public static NamedTypeRef Create(Context cx, INamedTypeSymbol type) => | ||
| 167 | + NamedTypeRefFactory.Instance.CreateEntity2(cx, type); | ||
| 168 | 168 | ||
| 169 | - class NamedTypeRefFactory : ICachedEntityFactory<(Type, ITypeSymbol), TypeRef> | ||
| 169 | + class NamedTypeRefFactory : ICachedEntityFactory<INamedTypeSymbol, NamedTypeRef> | ||
| 170 | 170 | { | |
| 171 | 171 | public static readonly NamedTypeRefFactory Instance = new NamedTypeRefFactory(); | |
| 172 | 172 | ||
| 173 | - public TypeRef Create(Context cx, (Type, ITypeSymbol) init) => new TypeRef(cx, init.Item1, init.Item2); | ||
| 173 | + public NamedTypeRef Create(Context cx, INamedTypeSymbol init) => new NamedTypeRef(cx, init); | ||
| 174 | 174 | } | |
| 175 | 175 | ||
| 176 | 176 | public override bool NeedsPopulation => true; | |
| 177 | 177 | ||
| 178 | 178 | public override void WriteId(TextWriter trapFile) | |
| 179 | 179 | { | |
| 180 | - void ExpandType(Context cx0, TextWriter tb0, ITypeSymbol sub) | ||
| 181 | - { | ||
| 182 | - sub.BuildTypeId(cx0, tb0, ExpandType); | ||
| 183 | - } | ||
| 184 | - | ||
| 185 | - symbol.BuildTypeId(Context, trapFile, ExpandType); | ||
| 186 | - trapFile.Write(";typeref"); | ||
| 180 | + trapFile.WriteSubId(referencedType); | ||
| 181 | + trapFile.Write(";typeRef"); | ||
| 187 | 182 | } | |
| 188 | 183 | ||
| 189 | 184 | public override void Populate(TextWriter trapFile) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,7 +42,7 @@ public override void Populate(TextWriter trapFile) | |||
| 42 | 42 | PopulateGenerics(); | |
| 43 | 43 | ||
| 44 | 44 | var underlyingType = NamedType.Create(Context, symbol.TupleUnderlyingType); | |
| 45 | - trapFile.tuple_underlying_type(this, underlyingType.TypeRef); | ||
| 45 | + trapFile.tuple_underlying_type(this, underlyingType); | ||
| 46 | 46 | ||
| 47 | 47 | int index = 0; | |
| 48 | 48 | foreach (var element in TupleElements) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -95,7 +95,6 @@ protected void PopulateType(TextWriter trapFile) | |||
| 95 | 95 | var baseTypes = new List<Type>(); | |
| 96 | 96 | if (symbol.BaseType != null) | |
| 97 | 97 | { | |
| 98 | - // !! Do not extend "object" if the base type is missing :-( | ||
| 99 | 98 | Type baseKey = Create(Context, symbol.BaseType); | |
| 100 | 99 | trapFile.extend(this, baseKey.TypeRef); | |
| 101 | 100 | if (symbol.TypeKind != TypeKind.Struct) | |
@@ -269,7 +268,6 @@ public void ExtractRecursive(TextWriter trapFile, IEntity parent) | |||
| 269 | 268 | public static Type Create(Context cx, ITypeSymbol type) | |
| 270 | 269 | { | |
| 271 | 270 | type = type.DisambiguateType(); | |
| 272 | - | ||
| 273 | 271 | const bool errorTypeIsNull = false; | |
| 274 | 272 | return type == null || (errorTypeIsNull && type.TypeKind == TypeKind.Error) ? | |
| 275 | 273 | NullType.Create(cx).Type : (Type)cx.CreateEntity(type); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -120,8 +120,7 @@ public static ExitCode Run(string[] args) | |||
| 120 | 120 | var syntaxTrees = new List<SyntaxTree>(); | |
| 121 | 121 | var syntaxTreeTasks = ReadSyntaxTrees( | |
| 122 | 122 | compilerArguments.SourceFiles. | |
| 123 | - Select(src => canonicalPathCache.GetCanonicalPath(src.Path)). | ||
| 124 | - Where(f => !f.EndsWith(".dll")), | ||
| 123 | + Select(src => canonicalPathCache.GetCanonicalPath(src.Path)), | ||
| 125 | 124 | analyser, | |
| 126 | 125 | compilerArguments.ParseOptions, | |
| 127 | 126 | compilerArguments.Encoding, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,8 +4,6 @@ | |||
| 4 | 4 | using System.Collections.Generic; | |
| 5 | 5 | using System.IO; | |
| 6 | 6 | using System.Linq; | |
| 7 | - using System.Security.Cryptography; | ||
| 8 | - using System.Text; | ||
| 9 | 7 | ||
| 10 | 8 | namespace Semmle.Extraction.CSharp | |
| 11 | 9 | { | |
@@ -135,34 +133,15 @@ public static bool ContainsTypeParameters(this ITypeSymbol type, Context cx, ISy | |||
| 135 | 133 | /// <param name="subTermAction">The action to apply to syntactic sub terms of this type.</param> | |
| 136 | 134 | public static void BuildTypeId(this ITypeSymbol type, Context cx, TextWriter trapFile, Action<Context, TextWriter, ITypeSymbol> subTermAction) | |
| 137 | 135 | { | |
| 138 | - switch(type.SpecialType) | ||
| 136 | + if (type.SpecialType != SpecialType.None) | ||
| 139 | 137 | { | |
| 140 | - case SpecialType.System_Object: | ||
| 141 | - case SpecialType.System_Void: | ||
| 142 | - case SpecialType.System_Boolean: | ||
| 143 | - case SpecialType.System_Char: | ||
| 144 | - case SpecialType.System_SByte: | ||
| 145 | - case SpecialType.System_Byte: | ||
| 146 | - case SpecialType.System_Int16: | ||
| 147 | - case SpecialType.System_UInt16: | ||
| 148 | - case SpecialType.System_Int32: | ||
| 149 | - case SpecialType.System_UInt32: | ||
| 150 | - case SpecialType.System_Int64: | ||
| 151 | - case SpecialType.System_UInt64: | ||
| 152 | - case SpecialType.System_Decimal: | ||
| 153 | - case SpecialType.System_Single: | ||
| 154 | - case SpecialType.System_Double: | ||
| 155 | - case SpecialType.System_String: | ||
| 156 | - case SpecialType.System_IntPtr: | ||
| 157 | - case SpecialType.System_UIntPtr: | ||
| 158 | - | ||
| 159 | - /* | ||
| 160 | - * Use the keyword ("int" etc) for the built-in types. | ||
| 161 | - * This makes the IDs shorter and means that all built-in types map to | ||
| 162 | - * the same entities (even when using multiple versions of mscorlib). | ||
| 163 | - */ | ||
| 164 | - trapFile.Write(type.ToDisplayString()); | ||
| 165 | - return; | ||
| 138 | + /* | ||
| 139 | + * Use the keyword ("int" etc) for the built-in types. | ||
| 140 | + * This makes the IDs shorter and means that all built-in types map to | ||
| 141 | + * the same entities (even when using multiple versions of mscorlib). | ||
| 142 | + */ | ||
| 143 | + trapFile.Write(type.ToDisplayString()); | ||
| 144 | + return; | ||
| 166 | 145 | } | |
| 167 | 146 | ||
| 168 | 147 | using (cx.StackGuard) | |
@@ -186,7 +165,7 @@ public static void BuildTypeId(this ITypeSymbol type, Context cx, TextWriter tra | |||
| 186 | 165 | case TypeKind.Pointer: | |
| 187 | 166 | var ptr = (IPointerTypeSymbol)type; | |
| 188 | 167 | subTermAction(cx, trapFile, ptr.PointedAtType); | |
| 189 | - trapFile.Write("*"); | ||
| 168 | + trapFile.Write('*'); | ||
| 190 | 169 | return; | |
| 191 | 170 | case TypeKind.TypeParameter: | |
| 192 | 171 | var tp = (ITypeParameterSymbol)type; | |
@@ -214,28 +193,8 @@ public static void BuildArraySuffix(this IArrayTypeSymbol array, TextWriter trap | |||
| 214 | 193 | trapFile.Write(']'); | |
| 215 | 194 | } | |
| 216 | 195 | ||
| 217 | - private static void BuildAssembly(IAssemblySymbol asm, TextWriter trapFile, bool extraPrecise = false) | ||
| 196 | + static void BuildNamedTypeId(this INamedTypeSymbol named, Context cx, TextWriter trapFile, Action<Context, TextWriter, ITypeSymbol> subTermAction) | ||
| 218 | 197 | { | |
| 219 | - var assembly = asm.Identity; | ||
| 220 | - trapFile.Write(assembly.Name); | ||
| 221 | - trapFile.Write('_'); | ||
| 222 | - trapFile.Write(assembly.Version.Major); | ||
| 223 | - trapFile.Write('.'); | ||
| 224 | - trapFile.Write(assembly.Version.Minor); | ||
| 225 | - trapFile.Write('.'); | ||
| 226 | - trapFile.Write(assembly.Version.Build); | ||
| 227 | - if (extraPrecise) | ||
| 228 | - { | ||
| 229 | - trapFile.Write('.'); | ||
| 230 | - trapFile.Write(assembly.Version.Revision); | ||
| 231 | - } | ||
| 232 | - trapFile.Write("::"); | ||
| 233 | - } | ||
| 234 | - | ||
| 235 | - public static void BuildNamedTypeId(this INamedTypeSymbol named, Context cx, TextWriter trapFile, Action<Context, TextWriter, ITypeSymbol> subTermAction) | ||
| 236 | - { | ||
| 237 | - bool prefixAssembly = !(named.ContainingAssembly is null); | ||
| 238 | - | ||
| 239 | 198 | if (named.IsTupleType) | |
| 240 | 199 | { | |
| 241 | 200 | trapFile.Write('('); | |
@@ -258,8 +217,6 @@ public static void BuildNamedTypeId(this INamedTypeSymbol named, Context cx, Tex | |||
| 258 | 217 | } | |
| 259 | 218 | else if (named.ContainingNamespace != null) | |
| 260 | 219 | { | |
| 261 | - if (prefixAssembly) | ||
| 262 | - BuildAssembly(named.ContainingAssembly, trapFile); | ||
| 263 | 220 | named.ContainingNamespace.BuildNamespace(cx, trapFile); | |
| 264 | 221 | } | |
| 265 | 222 | ||
@@ -290,6 +247,26 @@ public static void BuildNamedTypeId(this INamedTypeSymbol named, Context cx, Tex | |||
| 290 | 247 | ||
| 291 | 248 | static void BuildNamespace(this INamespaceSymbol ns, Context cx, TextWriter trapFile) | |
| 292 | 249 | { | |
| 250 | + // Only include the assembly information in each type ID | ||
| 251 | + // for normal extractions. This is because standalone extractions | ||
| 252 | + // lack assembly information or may be ambiguous. | ||
| 253 | + bool prependAssemblyToTypeId = !cx.Extractor.Standalone && ns.ContainingAssembly != null; | ||
| 254 | + | ||
| 255 | + if (prependAssemblyToTypeId) | ||
| 256 | + { | ||
| 257 | + // Note that we exclude the revision number as this has | ||
| 258 | + // been observed to be unstable. | ||
| 259 | + var assembly = ns.ContainingAssembly.Identity; | ||
| 260 | + trapFile.Write(assembly.Name); | ||
| 261 | + trapFile.Write('_'); | ||
| 262 | + trapFile.Write(assembly.Version.Major); | ||
| 263 | + trapFile.Write('.'); | ||
| 264 | + trapFile.Write(assembly.Version.Minor); | ||
| 265 | + trapFile.Write('.'); | ||
| 266 | + trapFile.Write(assembly.Version.Build); | ||
| 267 | + trapFile.Write("::"); | ||
| 268 | + } | ||
| 269 | + | ||
| 293 | 270 | trapFile.WriteSubId(Namespace.Create(cx, ns)); | |
| 294 | 271 | trapFile.Write('.'); | |
| 295 | 272 | } | |
@@ -379,7 +356,7 @@ public static void BuildNamedTypeDisplayName(this INamedTypeSymbol namedType, Co | |||
| 379 | 356 | } | |
| 380 | 357 | ||
| 381 | 358 | trapFile.Write(namedType.Name); | |
| 382 | - if (namedType.IsGenericType && namedType.TypeArguments.Any()) | ||
| 359 | + if (namedType.IsGenericType && namedType.TypeKind != TypeKind.Error && namedType.TypeArguments.Any()) | ||
| 383 | 360 | { | |
| 384 | 361 | trapFile.Write('<'); | |
| 385 | 362 | trapFile.BuildList(",", namedType.TypeArguments, (p, tb0) => | |
@@ -478,30 +455,6 @@ public static TypeInfo GetTypeInfo(this Context cx, Microsoft.CodeAnalysis.CShar | |||
| 478 | 455 | public static SymbolInfo GetSymbolInfo(this Context cx, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode node) => | |
| 479 | 456 | cx.GetModel(node).GetSymbolInfo(node); | |
| 480 | 457 | ||
| 481 | - /// <summary> | ||
| 482 | - /// Gets the symbol for a particular syntax node. | ||
| 483 | - /// Throws an exception if the symbol is not found. | ||
| 484 | - /// </summary> | ||
| 485 | - /// | ||
| 486 | - /// <remarks> | ||
| 487 | - /// This gives a nicer message than a "null pointer exception", | ||
| 488 | - /// and should be used where we require a symbol to be resolved. | ||
| 489 | - /// </remarks> | ||
| 490 | - /// | ||
| 491 | - /// <param name="cx">The extraction context.</param> | ||
| 492 | - /// <param name="node">The syntax node.</param> | ||
| 493 | - /// <returns>The resolved symbol.</returns> | ||
| 494 | - public static ISymbol GetSymbol(this Context cx, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode node) | ||
| 495 | - { | ||
| 496 | - var info = GetSymbolInfo(cx, node); | ||
| 497 | - if (info.Symbol == null) | ||
| 498 | - { | ||
| 499 | - throw new InternalError(node, "Could not resolve symbol"); | ||
| 500 | - } | ||
| 501 | - | ||
| 502 | - return info.Symbol; | ||
| 503 | - } | ||
| 504 | - | ||
| 505 | 458 | /// <summary> | |
| 506 | 459 | /// Determines the type of a node, or default | |
| 507 | 460 | /// if the type could not be determined. | |
@@ -515,84 +468,11 @@ public static AnnotatedTypeSymbol GetType(this Context cx, Microsoft.CodeAnalysi | |||
| 515 | 468 | return new AnnotatedTypeSymbol(info.Type.DisambiguateType(), info.Nullability.Annotation); | |
| 516 | 469 | } | |
| 517 | 470 | ||
| 518 | - /// <summary> | ||
| 519 | - /// Gets the annotated type of an IPropertySymbol. | ||
| 520 | - /// This has not yet been exposed on the public API. | ||
| 521 | - /// </summary> | ||
| 522 | - public static AnnotatedTypeSymbol GetAnnotatedType(this IPropertySymbol symbol) => new AnnotatedTypeSymbol(symbol.Type, symbol.NullableAnnotation); | ||
| 523 | - | ||
| 524 | - /// <summary> | ||
| 525 | - /// Gets the annotated type of an IFieldSymbol. | ||
| 526 | - /// This has not yet been exposed on the public API. | ||
| 527 | - /// </summary> | ||
| 528 | - public static AnnotatedTypeSymbol GetAnnotatedType(this IFieldSymbol symbol) => new AnnotatedTypeSymbol(symbol.Type, symbol.NullableAnnotation); | ||
| 529 | - private static bool IsSpecialized(this IMethodSymbol method) => | ||
| 530 | - method.IsGenericMethod && | ||
| 531 | - !ReferenceEquals(method, method.OriginalDefinition) && | ||
| 532 | - method.TypeParameters.Zip(method.TypeArguments, (a, b) => !ReferenceEquals(a, b)).Any(b => b); | ||
| 533 | - | ||
| 534 | - /// <summary> | ||
| 535 | - /// Gets the annotated return type of an IMethodSymbol. | ||
| 536 | - /// This has not yet been exposed on the public API. | ||
| 537 | - /// </summary> | ||
| 538 | - public static AnnotatedTypeSymbol GetAnnotatedReturnType(this IMethodSymbol symbol) => new AnnotatedTypeSymbol(symbol.ReturnType, symbol.ReturnNullableAnnotation); | ||
| 539 | - | ||
| 540 | - /// <summary> | ||
| 541 | - /// Gets the type annotation for a NullableAnnotation. | ||
| 542 | - /// </summary> | ||
| 543 | - public static Kinds.TypeAnnotation GetTypeAnnotation(this NullableAnnotation na) | ||
| 544 | - { | ||
| 545 | - switch(na) | ||
| 546 | - { | ||
| 547 | - case NullableAnnotation.Annotated: | ||
| 548 | - return Kinds.TypeAnnotation.Annotated; | ||
| 549 | - case NullableAnnotation.NotAnnotated: | ||
| 550 | - return Kinds.TypeAnnotation.NotAnnotated; | ||
| 551 | - default: | ||
| 552 | - return Kinds.TypeAnnotation.None; | ||
| 553 | - } | ||
| 554 | - } | ||
| 555 | - | ||
| 556 | - /// <summary> | ||
| 557 | - /// Gets the annotated element type of an IArrayTypeSymbol. | ||
| 558 | - /// This has not yet been exposed on the public API. | ||
| 559 | - /// </summary> | ||
| 560 | - public static AnnotatedTypeSymbol GetAnnotatedElementType(this IArrayTypeSymbol symbol) => | ||
| 561 | - new AnnotatedTypeSymbol(symbol.ElementType, symbol.ElementNullableAnnotation); | ||
| 562 | - | ||
| 563 | 471 | /// <summary> | |
| 564 | 472 | /// Gets the annotated type arguments of an INamedTypeSymbol. | |
| 565 | 473 | /// This has not yet been exposed on the public API. | |
| 566 | 474 | /// </summary> | |
| 567 | 475 | public static IEnumerable<AnnotatedTypeSymbol> GetAnnotatedTypeArguments(this INamedTypeSymbol symbol) => | |
| 568 | 476 | symbol.TypeArguments.Zip(symbol.TypeArgumentsNullableAnnotations, (t, a) => new AnnotatedTypeSymbol(t, a)); | |
| 569 | - | ||
| 570 | - /// <summary> | ||
| 571 | - /// Gets the annotated type arguments of an IMethodSymbol. | ||
| 572 | - /// This has not yet been exposed on the public API. | ||
| 573 | - /// </summary> | ||
| 574 | - public static IEnumerable<AnnotatedTypeSymbol> GetAnnotatedTypeArguments(this IMethodSymbol symbol) => | ||
| 575 | - symbol.TypeArguments.Zip(symbol.TypeArgumentsNullableAnnotations, (t, a) => new AnnotatedTypeSymbol(t, a)); | ||
| 576 | - | ||
| 577 | - /// <summary> | ||
| 578 | - /// Gets the annotated type constraints of an ITypeParameterSymbol. | ||
| 579 | - /// This has not yet been exposed on the public API. | ||
| 580 | - /// </summary> | ||
| 581 | - public static IEnumerable<AnnotatedTypeSymbol> GetAnnotatedTypeConstraints(this ITypeParameterSymbol symbol) => | ||
| 582 | - symbol.ConstraintTypes.Zip(symbol.ConstraintNullableAnnotations, (t, a) => new AnnotatedTypeSymbol(t, a)); | ||
| 583 | - | ||
| 584 | - /// <summary> | ||
| 585 | - /// Creates an AnnotatedTypeSymbol from an ITypeSymbol. | ||
| 586 | - /// Note: not currently used but might be useful. | ||
| 587 | - /// </summary> | ||
| 588 | - public static AnnotatedTypeSymbol WithAnnotation(this ITypeSymbol symbol, NullableAnnotation annotation) => | ||
| 589 | - new AnnotatedTypeSymbol(symbol, annotation); | ||
| 590 | - | ||
| 591 | - /// <summary> | ||
| 592 | - /// Holds if this type looks like an "anonymous" type. Names of anonymous types | ||
| 593 | - /// sometimes collide so they need to be handled separately. | ||
| 594 | - /// </summary> | ||
| 595 | - public static bool IsAnonymous(this INamedTypeSymbol type) => | ||
| 596 | - type.IsAnonymousType || type.Name.StartsWith("<>"); | ||
| 597 | 477 | } | |
| 598 | 478 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -388,7 +388,7 @@ internal static void nullability(this TextWriter trapFile, NullabilityEntity nul | |||
| 388 | 388 | ||
| 389 | 389 | internal static void nullability_member(this TextWriter trapFile, NullabilityEntity nullability, int index, NullabilityEntity child) | |
| 390 | 390 | { | |
| 391 | - trapFile.WriteTuple(nameof(nullability_member), nullability, index, child); | ||
| 391 | + trapFile.WriteTuple("nullability_member", nullability, index, child); | ||
| 392 | 392 | } | |
| 393 | 393 | ||
| 394 | 394 | internal static void numlines(this TextWriter trapFile, IEntity label, LineCounts lineCounts) | |
@@ -481,7 +481,7 @@ internal static void tuple_element(this TextWriter trapFile, TupleType type, int | |||
| 481 | 481 | trapFile.WriteTuple("tuple_element", type, index, field); | |
| 482 | 482 | } | |
| 483 | 483 | ||
| 484 | - internal static void tuple_underlying_type(this TextWriter trapFile, TupleType type, Type underlying) | ||
| 484 | + internal static void tuple_underlying_type(this TextWriter trapFile, TupleType type, NamedType underlying) | ||
| 485 | 485 | { | |
| 486 | 486 | trapFile.WriteTuple("tuple_underlying_type", type, underlying); | |
| 487 | 487 | } | |
@@ -526,12 +526,12 @@ internal static void type_parameters(this TextWriter trapFile, TypeParameter par | |||
| 526 | 526 | trapFile.WriteTuple("type_parameters", param, child, typeOrMethod, (int)param.Variance); | |
| 527 | 527 | } | |
| 528 | 528 | ||
| 529 | - internal static void typeref_type(this TextWriter trapFile, TypeRef typeref, Type type) | ||
| 529 | + internal static void typeref_type(this TextWriter trapFile, NamedTypeRef typeref, Type type) | ||
| 530 | 530 | { | |
| 531 | 531 | trapFile.WriteTuple("typeref_type", typeref, type); | |
| 532 | 532 | } | |
| 533 | 533 | ||
| 534 | - internal static void typerefs(this TextWriter trapFile, TypeRef type, string name) | ||
| 534 | + internal static void typerefs(this TextWriter trapFile, NamedTypeRef type, string name) | ||
| 535 | 535 | { | |
| 536 | 536 | trapFile.WriteTuple("typerefs", type, name); | |
| 537 | 537 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments