Skip to content

Commit

Permalink
fix #448
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghuan committed Jan 1, 2024
1 parent 53068e9 commit 5197333
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CSharp.lua/LuaSyntaxNodeTransform.Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1928,6 +1928,10 @@ private LuaExpressionSyntax BuildDeconstructExpression(LuaExpressionSyntax expre
}

private LuaExpressionSyntax BuildDeconstructExpression(ITypeSymbol typeSymbol, LuaExpressionSyntax expression, SyntaxNode node) {
if (expression is LuaBinaryExpressionSyntax) {
expression = expression.Parenthesized();
}

if (!typeSymbol.IsTupleType && !typeSymbol.IsSystemTuple()) {
if (node.Parent is AssignmentExpressionSyntax assignment) {
var methodSymbol = semanticModel_.GetDeconstructionInfo(assignment).Method;
Expand Down

0 comments on commit 5197333

Please sign in to comment.