2 writes to Kind
Microsoft.CodeAnalysis.CSharp (2)
Binder\Semantics\Operators\BinaryOperatorSignature.cs (2)
34this.Kind = kind; 45this.Kind = kind;
52 references to Kind
Microsoft.CodeAnalysis.CSharp (47)
Binder\Binder_Operators.cs (14)
243CheckNativeIntegerFeatureAvailability(bestSignature.Kind, node, diagnostics); 245isUnsignedRightShift: bestSignature.Kind.Operator() == BinaryOperatorKind.UnsignedRightShift, bestSignature.ConstrainedToTypeOpt, diagnostics); 250bestSignature.Kind.WithOverflowChecksIfApplicable(checkOverflowAtRuntime), 260bool isPredefinedOperator = !bestSignature.Kind.IsUserDefined(); 299if (!hasError && !bestSignature.Kind.IsUserDefined() && leftType.IsVoidPointer()) 983BinaryOperatorKind resultOperatorKind = signature.Kind; 1153bool isObjectEquality = signature.Kind == BinaryOperatorKind.ObjectEqual || signature.Kind == BinaryOperatorKind.ObjectNotEqual; 1162(signature.Kind.Operator() == BinaryOperatorKind.Equal || signature.Kind.Operator() == BinaryOperatorKind.NotEqual) && 1462if (!bothBool && !signature.Kind.IsUserDefined()) 1470var resultKind = kind | signature.Kind.OperandTypes(); 1471if (signature.Kind.IsLifted()) 1622Debug.Assert(signature.Kind.OperandTypes() == BinaryOperatorKind.UserDefined);
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (10)
840Debug.Assert(op.Signature.Kind.Operator() == existingSignature.Kind.Operator()); 843if (op.Signature.Kind == existingSignature.Kind && // Easy out 1309bool lifted1 = op1.Kind.IsLifted(); 1310bool lifted2 = op2.Kind.IsLifted(); 1372if (op1.Kind.IsLifted()) 1389if (op2.Kind.IsLifted()) 1552if (candidate.Kind.IsLifted()) 1615if (candidate.Kind.IsLifted() && operand.Type.IsNullableType())
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))));
BoundTree\NullabilityRewriter.cs (1)
152op = new BinaryOperatorSignature(op.Kind, op.LeftType, op.RightType, op.ReturnType, GetUpdatedSymbol(node, op.Method), op.ConstrainedToTypeOpt);
Compilation\BuiltInOperators.cs (1)
679switch (op.Kind.OperandTypes())
Compilation\CSharpSemanticModel.cs (4)
3927BinaryOperatorKind operandType = compoundAssignment.Operator.Kind.OperandTypes(); 3928BinaryOperatorKind op = compoundAssignment.Operator.Kind.Operator(); 3929isDynamic = compoundAssignment.Operator.Kind.IsDynamic(); 3946compoundAssignment.Operator.Kind.IsChecked()));
FlowAnalysis\NullableWalker.cs (1)
11218node.Operator.Kind,
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 (5)
79return MakeInstanceCompoundAssignmentOperatorResult(node.Syntax, node.Left, node.Right, node.Operator.Method, node.Operator.Kind.IsChecked()); 88var kind = node.Operator.Kind; 204if (IsBinaryStringConcatenation(node.Operator.Kind)) 208operand = VisitCompoundAssignmentStringConcatenation(opLHS, right, node.Operator.Kind, node.Syntax); 213operand = MakeBinaryOperator(syntax, node.Operator.Kind, opLHS, loweredRight, node.Operator.ReturnType, node.Operator.Method, node.Operator.ConstrainedToTypeOpt, isCompoundAssignment: true);
Operations\CSharpOperationFactory.cs (3)
1359BinaryOperatorKind operatorKind = Helper.DeriveBinaryOperatorKind(boundCompoundAssignmentOperator.Operator.Kind); 1362bool isLifted = boundCompoundAssignmentOperator.Operator.Kind.IsLifted(); 1364bool isChecked = boundCompoundAssignmentOperator.Operator.Kind.IsChecked() || (method is not null && SyntaxFacts.IsCheckedOperator(method.Name));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\OperatorTests.cs (5)
3249"@operator" => ((BinaryOperatorSignature)child.Value).Kind.ToString(), 7389var signature = result.Best.Signature.Kind; 8238signature = new BinaryOperatorSignature(signature.Kind | BinaryOperatorKind.EnumAndUnderlying, leftType, signature.RightType, leftType); 8245signature = new BinaryOperatorSignature(signature.Kind | BinaryOperatorKind.EnumAndUnderlying, signature.LeftType, rightType, rightType); 8831Assert.Equal(op, new BinaryOperatorSignature(op.Kind, op.LeftType, op.RightType, op.ReturnType, op.Method, constrainedToTypeOpt: null));