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