File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ private void ExtractArguments(TextWriter trapFile)
91
91
// The current argument is not named
92
92
// so the previous ones were also not named
93
93
// so the child index matches the parameter index.
94
- isParamsParameter = Symbol ? . AttributeConstructor ? . Parameters [ childIndex ] . IsParams == true ;
94
+ isParamsParameter = Symbol . AttributeConstructor ? . Parameters [ childIndex ] . IsParams == true ;
95
95
argSyntax = ctorArguments [ childIndex ] ;
96
96
}
97
97
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public override void Populate(TextWriter trapFile)
22
22
Position . Span . Start . Line + 1 , Position . Span . Start . Character + 1 ,
23
23
Position . Span . End . Line + 1 , Position . Span . End . Character ) ;
24
24
25
- var mapped = Symbol ! . GetMappedLineSpan ( ) ;
25
+ var mapped = Symbol . GetMappedLineSpan ( ) ;
26
26
if ( mapped . HasMappedPath && mapped . IsValid )
27
27
{
28
28
var mappedLoc = Create ( Context , Location . Create ( mapped . Path , default , mapped . Span ) ) ;
Original file line number Diff line number Diff line change
1
+ using System . Diagnostics . CodeAnalysis ;
1
2
using System . IO ;
2
3
using Microsoft . CodeAnalysis ;
3
4
@@ -30,6 +31,7 @@ protected CachedEntity(Context context) : base(context)
30
31
/// <typeparam name="TSymbol">The type of the symbol.</typeparam>
31
32
public abstract class CachedEntity < TSymbol > : CachedEntity where TSymbol : notnull
32
33
{
34
+ [ NotNull ]
33
35
public TSymbol Symbol { get ; }
34
36
35
37
protected CachedEntity ( Context context , TSymbol symbol ) : base ( context )
@@ -52,7 +54,7 @@ public string DebugContents
52
54
53
55
public override bool NeedsPopulation { get ; }
54
56
55
- public override int GetHashCode ( ) => Symbol is null ? 0 : Symbol . GetHashCode ( ) ;
57
+ public override int GetHashCode ( ) => Symbol . GetHashCode ( ) ;
56
58
57
59
public override bool Equals ( object ? obj )
58
60
{
You can’t perform that action at this time.
0 commit comments