Binding\Binder_Operators.vb (12)
769UnaryOperatorKind.IsFalse,
770UnaryOperatorKind.IsTrue),
1137Dim preliminaryOperatorKind As UnaryOperatorKind = OverloadResolution.MapUnaryOperatorKind(node.Kind)
1157Dim operatorKind As UnaryOperatorKind = OverloadResolution.ResolveUnaryOperator(preliminaryOperatorKind, operand, Me, intrinsicOperatorType, userDefinedOperator, useSiteInfo)
1164If operatorKind = UnaryOperatorKind.UserDefined Then
1175operatorKind = UnaryOperatorKind.Error
1178If operatorKind = UnaryOperatorKind.Error Then
1181Return New BoundUnaryOperator(node, preliminaryOperatorKind Or UnaryOperatorKind.Error, operand, CheckOverflow, ErrorTypeSymbol.UnknownResultType, HasErrors:=True)
1204Debug.Assert(((operatorKind And UnaryOperatorKind.Lifted) <> 0) = resultType.IsNullableType())
1239opKind As UnaryOperatorKind,
1248opKind = opKind Or UnaryOperatorKind.UserDefined
1265opKind = opKind Or UnaryOperatorKind.Lifted
Generated\BoundNodes.xml.Generated.vb (8)
1377Public Sub New(syntax As SyntaxNode, operatorKind As UnaryOperatorKind, operand As BoundExpression, checked As Boolean, constantValueOpt As ConstantValue, type As TypeSymbol, Optional hasErrors As Boolean = False)
1395Private ReadOnly _OperatorKind As UnaryOperatorKind
1396Public ReadOnly Property OperatorKind As UnaryOperatorKind
1428Public Function Update(operatorKind As UnaryOperatorKind, operand As BoundExpression, checked As Boolean, constantValueOpt As ConstantValue, type As TypeSymbol) As BoundUnaryOperator
1441Public Sub New(syntax As SyntaxNode, operatorKind As UnaryOperatorKind, underlyingExpression As BoundExpression, type As TypeSymbol, Optional hasErrors As Boolean = False)
1457Private ReadOnly _OperatorKind As UnaryOperatorKind
1458Public ReadOnly Property OperatorKind As UnaryOperatorKind
1476Public Function Update(operatorKind As UnaryOperatorKind, underlyingExpression As BoundExpression, type As TypeSymbol) As BoundUserDefinedUnaryOperator
Semantics\Operators.vb (83)
31Public Sub New(op As UnaryOperatorKind)
57Public ReadOnly Property UnaryOperatorKind As UnaryOperatorKind
60Return UnaryOperatorKind.Error
63Return CType(_Id >> 2, UnaryOperatorKind)
91operators.Add(WellKnownMemberNames.OnesComplementOperatorName, New OperatorInfo(UnaryOperatorKind.Not))
92operators.Add(WellKnownMemberNames.TrueOperatorName, New OperatorInfo(UnaryOperatorKind.IsTrue))
93operators.Add(WellKnownMemberNames.FalseOperatorName, New OperatorInfo(UnaryOperatorKind.IsFalse))
94operators.Add(WellKnownMemberNames.UnaryPlusOperatorName, New OperatorInfo(UnaryOperatorKind.Plus))
96operators.Add(WellKnownMemberNames.UnaryNegationOperatorName, New OperatorInfo(UnaryOperatorKind.Minus))
116operators.Add(WellKnownMemberNames.ImplicitConversionName, New OperatorInfo(UnaryOperatorKind.Implicit))
117operators.Add(WellKnownMemberNames.ExplicitConversionName, New OperatorInfo(UnaryOperatorKind.Explicit))
120operators.Add(WellKnownMemberNames.LogicalNotOperatorName, New OperatorInfo(UnaryOperatorKind.Not))
142Friend Shared Function GetOperatorTokenKind(op As UnaryOperatorKind) As SyntaxKind
144Case UnaryOperatorKind.IsFalse
146Case UnaryOperatorKind.IsTrue
148Case UnaryOperatorKind.Minus
150Case UnaryOperatorKind.Not
152Case UnaryOperatorKind.Plus
154Case UnaryOperatorKind.Implicit, UnaryOperatorKind.Explicit
270Friend Shared Function TryGetOperatorName(op As UnaryOperatorKind, isChecked As Boolean) As String
272Select Case (op And UnaryOperatorKind.OpMask)
273Case UnaryOperatorKind.Plus
275Case UnaryOperatorKind.Minus
277Case UnaryOperatorKind.Not
279Case UnaryOperatorKind.Implicit
281Case UnaryOperatorKind.Explicit
283Case UnaryOperatorKind.IsTrue
285Case UnaryOperatorKind.IsFalse
323Case UnaryOperatorKind.Implicit, UnaryOperatorKind.Explicit
334Case UnaryOperatorKind.IsTrue
341Case UnaryOperatorKind.IsFalse
477Public Shared Function MapUnaryOperatorKind(opCode As SyntaxKind) As UnaryOperatorKind
478Dim result As UnaryOperatorKind
482result = UnaryOperatorKind.Plus
484result = UnaryOperatorKind.Minus
486result = UnaryOperatorKind.Not
498opCode As UnaryOperatorKind,
504) As UnaryOperatorKind
505Debug.Assert((opCode And UnaryOperatorKind.IntrinsicOpMask) = opCode AndAlso opCode <> UnaryOperatorKind.Error)
507opCode = (opCode And UnaryOperatorKind.IntrinsicOpMask)
524Return UnaryOperatorKind.Error
539Return UnaryOperatorKind.Error
543Return UnaryOperatorKind.UserDefined
546Return UnaryOperatorKind.Error
549Dim result As UnaryOperatorKind = UnaryOperatorKind.Error
551If operandIsEnum AndAlso opCode = UnaryOperatorKind.Not AndAlso sourceType.IsIntegralType() Then
555result = UnaryOperatorKind.Not
564If result <> UnaryOperatorKind.Error AndAlso operandIsNullable Then
565result = result Or UnaryOperatorKind.Lifted
575opCode As UnaryOperatorKind,
582Case UnaryOperatorKind.Not
613Case UnaryOperatorKind.Plus
645Case UnaryOperatorKind.Minus
703op As UnaryOperatorKind,
734Select Case (op And UnaryOperatorKind.IntrinsicOpMask)
735Case UnaryOperatorKind.Plus
737Case UnaryOperatorKind.Minus
745Case UnaryOperatorKind.Not
757integerOverflow = (op And UnaryOperatorKind.IntrinsicOpMask) = UnaryOperatorKind.Minus AndAlso (integerOverflow OrElse detectedIntegerOverflow)
762Select Case (op And UnaryOperatorKind.IntrinsicOpMask)
763Case UnaryOperatorKind.Plus
765Case UnaryOperatorKind.Minus
787Select Case (op And UnaryOperatorKind.IntrinsicOpMask)
788Case UnaryOperatorKind.Plus
790Case UnaryOperatorKind.Minus
801Debug.Assert((op And UnaryOperatorKind.IntrinsicOpMask) = UnaryOperatorKind.Not)
2837WellKnownMemberNames.ImplicitConversionName, New OperatorInfo(UnaryOperatorKind.Implicit),
2838WellKnownMemberNames.ExplicitConversionName, New OperatorInfo(UnaryOperatorKind.Explicit),
2956WellKnownMemberNames.TrueOperatorName, New OperatorInfo(UnaryOperatorKind.IsTrue),
2970WellKnownMemberNames.FalseOperatorName, New OperatorInfo(UnaryOperatorKind.IsFalse),
2982opKind As UnaryOperatorKind,
2990Case UnaryOperatorKind.Not
2991Dim opInfo As New OperatorInfo(UnaryOperatorKind.Not)
2996Case UnaryOperatorKind.Minus
2998WellKnownMemberNames.UnaryNegationOperatorName, New OperatorInfo(UnaryOperatorKind.Minus),
3001Case UnaryOperatorKind.Plus
3003WellKnownMemberNames.UnaryPlusOperatorName, New OperatorInfo(UnaryOperatorKind.Minus),