Fixed some known static properties not being processed correctly

このコミットが含まれているのは:
Sergio Pedri committed 2019-08-19 12:02:48 +02:00
1 親 e0fdbb8dfb
コミット 9bcc85de9b
1ファイル変更
+6 -6
+6 -6
ファイルの表示
@@ -74,6 +74,12 @@ namespace ComputeSharp.Shaders.Extensions
return node;
}
// Process the input node if it's a known method invocation
if (HlslKnownMethods.TryGetMappedName(containingMemberSymbolInfo.Symbol, memberSymbol) is string mappedName)
{
return SyntaxFactory.IdentifierName(mappedName).WithLeadingTrivia(node.GetLeadingTrivia()).WithTrailingTrivia(node.GetTrailingTrivia());
}
// Handle static fields as a special case
if (memberSymbol.IsStatic && (
memberSymbol.Kind == SymbolKind.Field ||
@@ -121,12 +127,6 @@ namespace ComputeSharp.Shaders.Extensions
return SyntaxFactory.IdentifierName(name);
}
// Process the input node if it's a known method invocation
if (HlslKnownMethods.TryGetMappedName(containingMemberSymbolInfo.Symbol, memberSymbol) is string mappedName)
{
return SyntaxFactory.IdentifierName(mappedName).WithLeadingTrivia(node.GetLeadingTrivia()).WithTrailingTrivia(node.GetTrailingTrivia());
}
return node;
}
}