Skip to content

Commit 332a64a

Browse files
committed
Fix erroneous refactorings
1 parent 151379e commit 332a64a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

csharp/extractor/Semmle.Extraction.CIL/Entities/Type.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using System.IO;
44
using System.Diagnostics.CodeAnalysis;
5-
using System;
5+
using System.Linq;
66

77
namespace Semmle.Extraction.CIL.Entities
88
{
@@ -195,7 +195,7 @@ private bool TryGetPrimitiveTypeCode(out PrimitiveTypeCode code)
195195

196196
protected bool IsPrimitiveType => TryGetPrimitiveTypeCode(out _);
197197

198-
public sealed override IEnumerable<Type> MethodParameters => throw new NotImplementedException();
198+
public sealed override IEnumerable<Type> MethodParameters => Enumerable.Empty<Type>();
199199

200200
public static Type DecodeType(GenericContext gc, TypeSpecificationHandle handle) =>
201201
gc.Cx.MdReader.GetTypeSpecification(handle).DecodeSignature(gc.Cx.TypeSignatureDecoder, gc);

csharp/extractor/Semmle.Extraction.CIL/Entities/TypeDefinitionType.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Collections.Generic;
77
using System.Reflection;
88
using System.IO;
9+
using System.Reflection.Metadata.Ecma335;
910

1011
namespace Semmle.Extraction.CIL.Entities
1112
{
@@ -152,7 +153,7 @@ public override IEnumerable<IExtractionProduct> Contents
152153
{
153154
get
154155
{
155-
yield return Tuples.metadata_handle(this, Cx.Assembly, handle.GetHashCode());
156+
yield return Tuples.metadata_handle(this, Cx.Assembly, MetadataTokens.GetToken(handle));
156157

157158
foreach (var c in base.Contents) yield return c;
158159

0 commit comments

Comments
 (0)