File tree Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ protected Accessor(Context cx, IMethodSymbol init)
13
13
/// Gets the property symbol associated accessor `symbol`, or `null`
14
14
/// if there is no associated symbol.
15
15
/// </summary>
16
- public static IPropertySymbol GetPropertySymbol ( IMethodSymbol symbol )
16
+ public static IPropertySymbol ? GetPropertySymbol ( IMethodSymbol symbol )
17
17
{
18
18
// Usually, the property/indexer can be fetched from the associated symbol
19
19
if ( symbol . AssociatedSymbol is IPropertySymbol prop )
@@ -29,7 +29,7 @@ public static IPropertySymbol GetPropertySymbol(IMethodSymbol symbol)
29
29
/// <summary>
30
30
/// Gets the property symbol associated with this accessor.
31
31
/// </summary>
32
- private IPropertySymbol PropertySymbol => GetPropertySymbol ( Symbol ) ;
32
+ private IPropertySymbol ? PropertySymbol => GetPropertySymbol ( Symbol ) ;
33
33
34
34
public new Accessor OriginalDefinition => Create ( Context , Symbol . OriginalDefinition ) ;
35
35
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ protected void BindComments()
101
101
102
102
protected virtual T BodyDeclaringSymbol => Symbol ;
103
103
104
- public BlockSyntax Block
104
+ public BlockSyntax ? Block
105
105
{
106
106
get
107
107
{
@@ -112,7 +112,7 @@ public BlockSyntax Block
112
112
}
113
113
}
114
114
115
- public ExpressionSyntax ExpressionBody
115
+ public ExpressionSyntax ? ExpressionBody
116
116
{
117
117
get
118
118
{
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ protected override void ExtractInitializers(TextWriter trapFile)
86
86
}
87
87
}
88
88
89
- private ConstructorDeclarationSyntax Syntax
89
+ private ConstructorDeclarationSyntax ? Syntax
90
90
{
91
91
get
92
92
{
@@ -122,7 +122,7 @@ public override void WriteId(TextWriter trapFile)
122
122
trapFile . Write ( ";constructor" ) ;
123
123
}
124
124
125
- private ConstructorDeclarationSyntax GetSyntax ( ) =>
125
+ private ConstructorDeclarationSyntax ? GetSyntax ( ) =>
126
126
Symbol . DeclaringSyntaxReferences . Select ( r => r . GetSyntax ( ) ) . OfType < ConstructorDeclarationSyntax > ( ) . FirstOrDefault ( ) ;
127
127
128
128
public override Microsoft . CodeAnalysis . Location ? FullLocation => ReportingLocation ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ private Conversion(Context cx, IMethodSymbol init)
13
13
public static new Conversion Create ( Context cx , IMethodSymbol symbol ) =>
14
14
ConversionFactory . Instance . CreateEntityFromSymbol ( cx , symbol ) ;
15
15
16
- public override Microsoft . CodeAnalysis . Location ReportingLocation
16
+ public override Microsoft . CodeAnalysis . Location ? ReportingLocation
17
17
{
18
18
get
19
19
{
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ private void PopulateMethodBody(TextWriter trapFile)
83
83
if ( block != null )
84
84
Statements . Block . Create ( Context , block , this , 0 ) ;
85
85
else
86
- Expression . Create ( Context , expr , this , 0 ) ;
86
+ Expression . Create ( Context , expr ! , this , 0 ) ;
87
87
88
88
NumberOfLines ( trapFile , BodyDeclaringSymbol , this ) ;
89
89
} ) ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public CompilerVersion(Options options)
75
75
}
76
76
77
77
var versionInfo = FileVersionInfo . GetVersionInfo ( SpecifiedCompiler ) ;
78
- if ( ! knownCompilerNames . TryGetValue ( versionInfo . OriginalFilename , out var vendor ) )
78
+ if ( ! knownCompilerNames . TryGetValue ( versionInfo . OriginalFilename ?? string . Empty , out var vendor ) )
79
79
{
80
80
SkipExtractionBecause ( "the compiler name is not recognised" ) ;
81
81
return ;
You can’t perform that action at this time.
0 commit comments