Skip generating for generic shader types, and warn
このコミットが含まれているのは:
1 親
4df52a9e40
コミット
bf7c470cb3
6ファイル変更
+26
-18
検索条件に一致するファイルはありません
@@ -39,8 +39,9 @@ public sealed partial class ComputeShaderDescriptorGenerator : IIncrementalGener
|
||||
return default;
|
||||
}
|
||||
|
||||
// If the type symbol doesn't have at least one interface, it can't possibly be a shader type
|
||||
if (context.TargetSymbol is not INamedTypeSymbol { AllInterfaces.Length: > 0 } typeSymbol)
|
||||
// If the type symbol doesn't have at least one interface, it can't possibly be a shader type.
|
||||
// Additionally, shader types cannot be generic (including nested inside generic types).
|
||||
if (context.TargetSymbol is not INamedTypeSymbol { AllInterfaces.Length: > 0, IsGenericType: false } typeSymbol)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする