21 references to IsString
Microsoft.CodeAnalysis (6)
CodeGen\SwitchIntegralJumpTableEmitter.cs (2)
153
&& !firstConstant.
IsString
);
157
&& !secondConstant.
IsString
);
CodeGen\SwitchIntegralJumpTableEmitter.SwitchBucket.cs (1)
266
&& !constant.
IsString
;
CodeGen\SwitchStringJumpTableEmitter.cs (2)
183
(stringConstant.
IsString
|| stringConstant.IsNull));
201
Debug.Assert(stringConstant.IsNull || stringConstant.
IsString
);
SwitchConstantValueHelper.cs (1)
89
Debug.Assert(second.
IsString
);
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder_InterpolatedString.cs (3)
144
!(value.ConstantValueOpt is {
IsString
: true, IsBad: false }))
887
Debug.Assert(part is BoundLiteral { Type: { SpecialType: SpecialType.System_String }, ConstantValueOpt.
IsString
: true });
952
Debug.Assert(boundLiteral.ConstantValueOpt != null && boundLiteral.ConstantValueOpt.
IsString
);
Binder\DecisionDagBuilder.cs (1)
492
else if (constant.ConstantValue.
IsString
&& input.Type.IsSpanOrReadOnlySpanChar())
BoundTree\LengthBasedStringSwitchData.cs (1)
139
Debug.Assert(inputCases.All(c => c.value.
IsString
&& c.label is not null));
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
393
if (value.
IsString
&& input.Type.IsSpanOrReadOnlySpanChar())
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (7)
93
case [{ ConstantValueOpt.
IsString
: true } arg]:
307
else if (argument is BoundNullCoalescingOperator { LeftOperand: { Type.SpecialType: SpecialType.System_String } left, RightOperand: BoundLiteral { ConstantValueOpt: {
IsString
: true, RopeValue.IsEmpty: true } } })
314
case { IsNull: true } or {
IsString
: true, RopeValue.IsEmpty: true }:
318
case {
IsString
: true } or { IsChar: true }:
320
if (finalArguments.Count > 0 && finalArguments[^1].ConstantValueOpt is {
IsString
: true } or { IsChar: true })
337
Debug.Assert(constantValue.
IsString
|| constantValue.IsChar);
338
if (constantValue.
IsString
)
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
191
if (length == 1 && result is not ({ Kind: BoundKind.InterpolatedString } or { ConstantValueOpt.
IsString
: true }))
Lowering\SyntheticBoundNodeFactory.cs (1)
1156
Debug.Assert(stringConst.
IsString
|| stringConst.IsNull);