Skip to content

Commit 67caf3c

Browse files
committed
Remove redundant IEntity implemented interface declaration and explit interface member implemenration
1 parent 61e9527 commit 67caf3c

4 files changed

Lines changed: 6 additions & 12 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void Extract(Context cx2)
6161
cx2.Populate(this);
6262
}
6363

64-
TrapStackBehaviour IEntity.TrapStackBehaviour => TrapStackBehaviour.NoLabel;
64+
public TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
6565

6666
public abstract IEnumerable<Type> TypeParameters { get; }
6767

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Semmle.Extraction.CIL.Entities
88
/// <summary>
99
/// A CIL instruction.
1010
/// </summary>
11-
internal class Instruction : UnlabelledEntity, IEntity
11+
internal class Instruction : UnlabelledEntity
1212
{
1313
/// <summary>
1414
/// The additional data following the opcode, if any.
@@ -289,11 +289,6 @@ public int Width
289289
}
290290
}
291291

292-
Label IEntity.Label
293-
{
294-
get; set;
295-
}
296-
297292
private readonly byte[] data;
298293

299294
private int PayloadSize => payloadSizes[(int)PayloadType];

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public void WriteQuotedId(TextWriter trapFile)
3131

3232
public abstract string IdSuffix { get; }
3333

34-
Location IEntity.ReportingLocation => throw new NotImplementedException();
35-
3634
public void Extract(Context cx2) { cx2.Populate(this); }
3735

3836
public abstract IEnumerable<IExtractionProduct> Contents { get; }
@@ -44,7 +42,8 @@ public override string ToString()
4442
return writer.ToString();
4543
}
4644

47-
TrapStackBehaviour IEntity.TrapStackBehaviour => TrapStackBehaviour.NoLabel;
45+
public TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
46+
public Location ReportingLocation => throw new NotImplementedException();
4847

4948
public abstract IEnumerable<Type> MethodParameters { get; }
5049
public abstract IEnumerable<Type> TypeParameters { get; }

csharp/extractor/Semmle.Extraction.CIL/ExtractionProduct.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected UnlabelledEntity(Context cx)
7171
cx.Cx.AddFreshLabel(this);
7272
}
7373

74-
TrapStackBehaviour IEntity.TrapStackBehaviour => TrapStackBehaviour.NoLabel;
74+
public TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
7575
}
7676

7777
/// <summary>
@@ -115,7 +115,7 @@ public override string ToString()
115115
return writer.ToString();
116116
}
117117

118-
TrapStackBehaviour IEntity.TrapStackBehaviour => TrapStackBehaviour.NoLabel;
118+
public TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
119119
}
120120

121121
/// <summary>

0 commit comments

Comments
 (0)