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)
1313 /// Gets the property symbol associated accessor `symbol`, or `null`
1414 /// if there is no associated symbol.
1515 /// </summary>
16- public static IPropertySymbol GetPropertySymbol ( IMethodSymbol symbol )
16+ public static IPropertySymbol ? GetPropertySymbol ( IMethodSymbol symbol )
1717 {
1818 // Usually, the property/indexer can be fetched from the associated symbol
1919 if ( symbol . AssociatedSymbol is IPropertySymbol prop )
@@ -29,7 +29,7 @@ public static IPropertySymbol GetPropertySymbol(IMethodSymbol symbol)
2929 /// <summary>
3030 /// Gets the property symbol associated with this accessor.
3131 /// </summary>
32- private IPropertySymbol PropertySymbol => GetPropertySymbol ( Symbol ) ;
32+ private IPropertySymbol ? PropertySymbol => GetPropertySymbol ( Symbol ) ;
3333
3434 public new Accessor OriginalDefinition => Create ( Context , Symbol . OriginalDefinition ) ;
3535
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ protected void BindComments()
101101
102102 protected virtual T BodyDeclaringSymbol => Symbol ;
103103
104- public BlockSyntax Block
104+ public BlockSyntax ? Block
105105 {
106106 get
107107 {
@@ -112,7 +112,7 @@ public BlockSyntax Block
112112 }
113113 }
114114
115- public ExpressionSyntax ExpressionBody
115+ public ExpressionSyntax ? ExpressionBody
116116 {
117117 get
118118 {
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ protected override void ExtractInitializers(TextWriter trapFile)
8686 }
8787 }
8888
89- private ConstructorDeclarationSyntax Syntax
89+ private ConstructorDeclarationSyntax ? Syntax
9090 {
9191 get
9292 {
@@ -122,7 +122,7 @@ public override void WriteId(TextWriter trapFile)
122122 trapFile . Write ( ";constructor" ) ;
123123 }
124124
125- private ConstructorDeclarationSyntax GetSyntax ( ) =>
125+ private ConstructorDeclarationSyntax ? GetSyntax ( ) =>
126126 Symbol . DeclaringSyntaxReferences . Select ( r => r . GetSyntax ( ) ) . OfType < ConstructorDeclarationSyntax > ( ) . FirstOrDefault ( ) ;
127127
128128 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)
1313 public static new Conversion Create ( Context cx , IMethodSymbol symbol ) =>
1414 ConversionFactory . Instance . CreateEntityFromSymbol ( cx , symbol ) ;
1515
16- public override Microsoft . CodeAnalysis . Location ReportingLocation
16+ public override Microsoft . CodeAnalysis . Location ? ReportingLocation
1717 {
1818 get
1919 {
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ private void PopulateMethodBody(TextWriter trapFile)
8383 if ( block != null )
8484 Statements . Block . Create ( Context , block , this , 0 ) ;
8585 else
86- Expression . Create ( Context , expr , this , 0 ) ;
86+ Expression . Create ( Context , expr ! , this , 0 ) ;
8787
8888 NumberOfLines ( trapFile , BodyDeclaringSymbol , this ) ;
8989 } ) ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public CompilerVersion(Options options)
7575 }
7676
7777 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 ) )
7979 {
8080 SkipExtractionBecause ( "the compiler name is not recognised" ) ;
8181 return ;
You can’t perform that action at this time.
0 commit comments