Fix [SkipLocalsInit] lookup in source generator

このコミットが含まれているのは:
Sergio Pedri committed 2021-12-08 11:17:07 +01:00
1 親 771f8515c7
コミット 44b7620d4a
1ファイル変更
+1 -1
+1 -1
ファイルの表示
@@ -27,7 +27,7 @@ public sealed partial class IShaderGenerator : IIncrementalGenerator
context.CompilationProvider
.Select(static (compilation, token) =>
compilation.Options is CSharpCompilationOptions { AllowUnsafe: true } &&
compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.SkipLocalsInit") is not null);
compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.SkipLocalsInitAttribute") is not null);
// Get all declared struct types and their type symbols
IncrementalValuesProvider<(StructDeclarationSyntax Syntax, INamedTypeSymbol Symbol)> structDeclarations =