Skip to content

Commit

Permalink
Add error for attempting to use bitwise not
Browse files Browse the repository at this point in the history
- Add error for attempting to use Bitwise Not operator because Udon does not expose it at the moment
  • Loading branch information
MerlinVR committed Apr 6, 2020
1 parent 8c39e36 commit fad4ed8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Assets/UdonSharp/Editor/UdonSharpASTVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,8 @@ public override void VisitPrefixUnaryExpression(PrefixUnaryExpressionSyntax node
operatorMethods.AddRange(GetOperators(operandCapture.GetReturnType(), node.OperatorToken.Kind()));
operatorMethods.AddRange(GetImplicitHigherPrecisionOperator(operandCapture.GetReturnType(), null, SyntaxKindToBuiltinOperator(node.OperatorToken.Kind()), true));
break;
case SyntaxKind.TildeToken:
throw new System.NotSupportedException("Udon does not support BitwiseNot at the moment (https://vrchat.canny.io/vrchat-udon-closed-alpha-feedback/p/bitwisenot-for-integer-built-in-types)");
default:
throw new System.NotImplementedException($"Handling for prefix token {node.OperatorToken.Kind()} is not implemented");
}
Expand Down

0 comments on commit fad4ed8

Please sign in to comment.