Skip to content

Commit 78216f8

Browse files
committed
Bug: Fix type checking issue found when GOLFing already GOLFed output.
1 parent 1a3ee98 commit 78216f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ShaderShrinker/Shrinker.Parser/Optimizations/ReplaceFunctionCallsWithResultExtension.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public static bool ReplaceFunctionCallsWithResult(this SyntaxNode rootNode)
5050
}
5151

5252
var typeNode = (GenericSyntaxNode)callee.Params.Children[i++].Clone();
53+
if (typeNode?.Token is not TypeToken)
54+
continue; // Unknown type - Skip.
55+
5356
var nameNode = (GenericSyntaxNode)callee.Params.Children[i++].Clone();
5457

5558
var declNode = new VariableDeclarationSyntaxNode(typeNode);

0 commit comments

Comments
 (0)