Added error for captured fields of invalid types
このコミットが含まれているのは:
1 親
eb5cf26d8f
コミット
4b280bf2b6
9ファイル変更
+76
-17
検索条件に一致するファイルはありません
@@ -120,11 +120,10 @@ namespace ComputeSharp.SourceGenerators
|
||||
{
|
||||
foreach (var fieldSymbol in structDeclarationSymbol.GetMembers().OfType<IFieldSymbol>())
|
||||
{
|
||||
if (fieldSymbol.IsStatic) continue;
|
||||
|
||||
INamedTypeSymbol typeSymbol = (INamedTypeSymbol)fieldSymbol.Type;
|
||||
|
||||
if (typeSymbol.TypeKind != TypeKind.Delegate) continue;
|
||||
if (fieldSymbol.Type is not INamedTypeSymbol { TypeKind: TypeKind.Delegate, IsStatic: false } typeSymbol)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// hash += hash << 5;
|
||||
yield return ExpressionStatement(ParseExpression($"hash += hash << 5"));
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする