2 writes to Kind
Microsoft.CodeAnalysis.CSharp (2)
Binder\Semantics\Operators\BinaryOperatorSignature.cs (2)
34this.Kind = kind; 45this.Kind = kind;
46 references to Kind
Microsoft.CodeAnalysis.CSharp (41)
Binder\Binder_Operators.cs (13)
178CheckNativeIntegerFeatureAvailability(bestSignature.Kind, node, diagnostics); 180isUnsignedRightShift: bestSignature.Kind.Operator() == BinaryOperatorKind.UnsignedRightShift, bestSignature.ConstrainedToTypeOpt, diagnostics); 185bestSignature.Kind.WithOverflowChecksIfApplicable(CheckOverflowAtRuntime), 195bool isPredefinedOperator = !bestSignature.Kind.IsUserDefined(); 584BinaryOperatorKind resultOperatorKind = signature.Kind; 691bool isObjectEquality = signature.Kind == BinaryOperatorKind.ObjectEqual || signature.Kind == BinaryOperatorKind.ObjectNotEqual; 700(signature.Kind.Operator() == BinaryOperatorKind.Equal || signature.Kind.Operator() == BinaryOperatorKind.NotEqual) && 961if (!bothBool && !signature.Kind.IsUserDefined()) 969var resultKind = kind | signature.Kind.OperandTypes(); 970if (signature.Kind.IsLifted()) 1075Debug.Assert(signature.Kind.OperandTypes() == BinaryOperatorKind.UserDefined);
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (8)
804Debug.Assert(op.Signature.Kind.Operator() == existingSignature.Kind.Operator()); 807if (op.Signature.Kind == existingSignature.Kind && // Easy out 1235bool lifted1 = op1.Kind.IsLifted(); 1236bool lifted2 = op2.Kind.IsLifted(); 1298if (op1.Kind.IsLifted()) 1315if (op2.Kind.IsLifted())
Binder\Semantics\Operators\BinaryOperatorSignature.cs (4)
56return $"kind: {this.Kind} leftType: {this.LeftType} leftRefKind: {this.LeftRefKind} rightType: {this.RightType} rightRefKind: {this.RightRefKind} return: {this.ReturnType}"; 62this.Kind == other.Kind && 89Hash.Combine(Method, (int)Kind))));
Compilation\BuiltInOperators.cs (1)
679switch (op.Kind.OperandTypes())
Compilation\CSharpSemanticModel.cs (4)
3903BinaryOperatorKind operandType = compoundAssignment.Operator.Kind.OperandTypes(); 3904BinaryOperatorKind op = compoundAssignment.Operator.Kind.Operator(); 3905isDynamic = compoundAssignment.Operator.Kind.IsDynamic(); 3922compoundAssignment.Operator.Kind.IsChecked()));
FlowAnalysis\NullableWalker.cs (2)
9667if (node.Operator.Kind.IsUserDefined() && (object)node.Operator.Method != null && node.Operator.Method.ParameterCount == 2) 9674resultType = InferResultNullability(node.Operator.Kind, node.Operator.Method, node.Operator.ReturnType, leftOnRightType, rightType);
Lowering\DiagnosticsPass_Warnings.cs (4)
288if (!node.Operator.Kind.IsDynamic() && node.LeftConversion is BoundConversion { Conversion: { IsIdentity: false, Exists: true } conversion }) 291left = new BoundConversion(left.Syntax, left, conversion, node.Operator.Kind.IsChecked(), 295CheckForBitwiseOrSignExtend(node, node.Operator.Kind, left, node.Right); 721if (!node.Operator.Kind.IsLifted())
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
30var kind = node.Operator.Kind; 142BoundExpression operand = MakeBinaryOperator(syntax, node.Operator.Kind, opLHS, loweredRight, node.Operator.ReturnType, node.Operator.Method, node.Operator.ConstrainedToTypeOpt, isCompoundAssignment: true);
Operations\CSharpOperationFactory.cs (3)
1292BinaryOperatorKind operatorKind = Helper.DeriveBinaryOperatorKind(boundCompoundAssignmentOperator.Operator.Kind); 1295bool isLifted = boundCompoundAssignmentOperator.Operator.Kind.IsLifted(); 1297bool isChecked = boundCompoundAssignmentOperator.Operator.Kind.IsChecked() || (method is not null && SyntaxFacts.IsCheckedOperator(method.Name));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\OperatorTests.cs (5)
3248"@operator" => ((BinaryOperatorSignature)child.Value).Kind.ToString(), 7387var signature = result.Best.Signature.Kind; 8236signature = new BinaryOperatorSignature(signature.Kind | BinaryOperatorKind.EnumAndUnderlying, leftType, signature.RightType, leftType); 8243signature = new BinaryOperatorSignature(signature.Kind | BinaryOperatorKind.EnumAndUnderlying, signature.LeftType, rightType, rightType); 8829Assert.Equal(op, new BinaryOperatorSignature(op.Kind, op.LeftType, op.RightType, op.ReturnType, op.Method, constrainedToTypeOpt: null));