122 references to IsDynamic
Microsoft.CodeAnalysis.CSharp (95)
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
260
Debug.Assert(!type.
IsDynamic
());
Binder\Binder_Await.cs (1)
89
type.
IsDynamic
() ||
Binder\Binder_Conversions.cs (1)
1810
Debug.Assert(!targetType.
IsDynamic
());
Binder\Binder_Deconstruct.cs (1)
624
if (receiver.Type?.
IsDynamic
() ?? false)
Binder\Binder_Expressions.cs (9)
1419
if (type.
IsDynamic
())
1442
if (type.
IsDynamic
()
5988
if (initializerType.
IsDynamic
())
6442
if (initializerType.
IsDynamic
())
6597
!implicitReceiver.Type.
IsDynamic
())
6621
if (implicitReceiver.Type.
IsDynamic
())
7743
Debug.Assert(!leftType.
IsDynamic
());
7883
if ((object)leftType != null && leftType.
IsDynamic
())
8748
Debug.Assert(!left.Type.
IsDynamic
());
Binder\Binder_Invocation.cs (3)
350
if ((object)boundExpression.Type != null && boundExpression.Type.
IsDynamic
())
1431
Debug.Assert(parameterType.
IsDynamic
() || parameterType.SpecialType == SpecialType.System_Object);
1719
if (parameterType.
IsDynamic
() || parameterType.SpecialType == SpecialType.System_Object)
Binder\Binder_Lookup.cs (1)
1795
return (object)type != null && (type.IsDelegateType() || type.
IsDynamic
() || type.IsFunctionPointer());
Binder\Binder_Operators.cs (9)
808
Debug.Assert((object)left.Type != null && left.Type.
IsDynamic
() || (object)right.Type != null && right.Type.
IsDynamic
());
955
if ((object)leftType != null && leftType.
IsDynamic
() || (object)rightType != null && rightType.
IsDynamic
())
1598
if (type.
IsDynamic
())
3277
if (operandType.
IsDynamic
())
3430
Debug.Assert(!operandType.
IsDynamic
());
5699
if ((object)optRightType != null && optRightType.
IsDynamic
())
5854
if (underlyingRightConversion.Exists && rightOperand.Type?.
IsDynamic
() != true)
Binder\Binder_Patterns.cs (5)
523
if (inputType.
IsDynamic
())
528
if (inputType.IsErrorType() || inputType.
IsDynamic
())
578
Debug.Assert(!inputType.
IsDynamic
());
1063
if (patternType.
IsDynamic
())
1180
if (expressionType.
IsDynamic
())
Binder\Binder_QueryErrors.cs (1)
45
if (instanceArgument.Type.
IsDynamic
())
Binder\Binder_TupleOperators.cs (4)
88
if ((object)leftType != null && leftType.
IsDynamic
() || (object)rightType != null && rightType.
IsDynamic
())
187
Debug.Assert((object)left.Type != null && left.Type.
IsDynamic
() || (object)right.Type != null && right.Type.
IsDynamic
());
Binder\DecisionDagBuilder.cs (1)
837
if (input.Type.
IsDynamic
() ? type.SpecialType == SpecialType.System_Object : conversion.IsImplicit)
Binder\ForEachLoopBinder.cs (1)
1298
if (collectionExprType.
IsDynamic
())
Binder\Semantics\Conversions\Conversions.cs (1)
445
if (parameter.Type.
IsDynamic
())
Binder\Semantics\OverloadResolution\AnalyzedArguments.cs (1)
101
if ((object?)argument.Type != null && argument.Type.
IsDynamic
() && (!hasRefKinds || RefKinds[i] == Microsoft.CodeAnalysis.RefKind.None))
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (7)
3046
if (source.
IsDynamic
() && !destination.
IsDynamic
())
3197
Debug.Assert(!extension.ExtensionParameter.Type.
IsDynamic
());
3274
Debug.Assert(!method.GetParameterType(0).
IsDynamic
());
3489
if (newCandidate.Type.
IsDynamic
())
3527
if (x.Type.
IsDynamic
() ^ y.Type.
IsDynamic
()) { return false; }
Binder\Semantics\OverloadResolution\OverloadResolution.cs (7)
2830
if (t1.
IsDynamic
() || t2.
IsDynamic
())
2832
Debug.Assert(t1.
IsDynamic
() && t2.
IsDynamic
() ||
2833
t1.
IsDynamic
() && t2.SpecialType == SpecialType.System_Object ||
2834
t2.
IsDynamic
() && t1.SpecialType == SpecialType.System_Object);
4746
((!dynamicConvertsToAnything || !argument.Type.
IsDynamic
()) ?
Binder\UsingStatementBinder.cs (1)
134
if (declarationTypeOpt.
IsDynamic
())
BoundTree\BoundExpressionExtensions.cs (1)
132
return type is { } && type.
IsDynamic
();
CodeGen\EmitExpression.cs (1)
730
Debug.Assert(refKind is RefKind.In || argument.Type.
IsDynamic
() || argument is BoundFieldAccess { FieldSymbol.RefKind: not RefKind.None }, "passing args byref should not clone them into temps");
Compilation\CSharpCompilation.cs (1)
2292
RoslynDebug.Assert(!namedType.
IsDynamic
());
Compilation\CSharpSemanticModel.cs (3)
3925
Debug.Assert(returnType.
IsDynamic
());
3929
Debug.Assert(rightType.
IsDynamic
());
3934
Debug.Assert(leftType.
IsDynamic
());
FlowAnalysis\NullableWalker.cs (6)
3792
return type.IsErrorType() || type.
IsDynamic
() || type.HasUseSiteError || (type.IsAnonymousType && canIgnoreAnonymousType((NamedTypeSymbol)type));
3839
&& (type.SpecialType == SpecialType.System_Boolean || type.
IsDynamic
() || type.IsErrorType());
9052
if (value.Type is null || value.Type.
IsDynamic
() || value.ConstantValueOpt != null)
13209
Debug.Assert(node.Type.
IsDynamic
());
13228
Debug.Assert(node.Type.
IsDynamic
());
13335
Debug.Assert(node.Type.
IsDynamic
());
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
257
if (resultType.
IsDynamic
())
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (2)
451
if (awaiterTemp.Type.
IsDynamic
())
506
blockBuilder.Add(awaiterTemp.Type.
IsDynamic
()
Lowering\Extensions.cs (1)
40
if (expr.Type.
IsDynamic
())
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
216
if (inputType.
IsDynamic
())
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.cs (1)
55
var lowerToConditional = node.AccessExpression.Type.
IsDynamic
();
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (1)
464
effects, temps, isDynamicAssignment: variable.Type.
IsDynamic
());
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
358
if (memberInit.MemberSymbol == null && memberInit.Type.
IsDynamic
())
400
Debug.Assert(assignment.Type.
IsDynamic
() || TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
107
if (actualCall.Type!.
IsDynamic
())
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
86
|| type.
IsDynamic
());
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (2)
157
if (expressionType.
IsDynamic
())
236
if (localType.
IsDynamic
())
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
866
if (argType is { } && !argType.
IsDynamic
())
Operations\CSharpOperationFactory.cs (1)
873
Debug.Assert(boundObjectInitializerMember.Type.
IsDynamic
());
Symbols\Compilation_WellKnownMembers.cs (1)
810
if (type.
IsDynamic
() && refKindOpt == RefKind.None && customModifiersCount == 0)
Symbols\Metadata\PE\DynamicTypeDecoder.cs (1)
145
PeekFlag() && (type.SpecialType != SpecialType.System_Object && !type.
IsDynamic
()))
Symbols\NamedTypeSymbol.cs (1)
1169
return other.
IsDynamic
() ? other : this;
Symbols\ReducedExtensionMethodSymbol.cs (1)
128
if (thisType.
IsDynamic
())
Symbols\Source\ParameterHelpers.cs (1)
1001
conversion.IsIdentity && parameterType.SpecialType == SpecialType.System_Object && defaultExpression.Type.
IsDynamic
())
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (2)
738
if (source.
IsDynamic
() || target.
IsDynamic
())
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
529
Debug.Assert(!initializer.ReturnType.
IsDynamic
());
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (5)
42
Debug.Assert((leftType.
IsDynamic
() || rightType.
IsDynamic
()) == returnType.
IsDynamic
());
43
Debug.Assert(_containingType.
IsDynamic
() == returnType.
IsDynamic
());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (19)
Semantics\OperatorTests.cs (19)
7541
Assert.Equal(type.
IsDynamic
() ? CandidateReason.LateBound : CandidateReason.None, info1.CandidateReason);
7576
if (type.
IsDynamic
())
7631
expectChecked = (type.
IsDynamic
() || symbol1.ContainingType.EnumUnderlyingTypeOrSelf().SpecialType.IsIntegralType());
7638
expectChecked = (type.
IsDynamic
() || type.IsPointerType() ||
8090
if (leftType.
IsDynamic
() || rightType.
IsDynamic
())
8110
Assert.Equal(leftType.
IsDynamic
() || rightType.
IsDynamic
() ? CandidateReason.LateBound : CandidateReason.None, info1.CandidateReason);
8142
bool isDynamic = (leftType.
IsDynamic
() || rightType.
IsDynamic
());
8161
if (leftType.
IsDynamic
() && !rightType.IsPointerType() && !rightType.IsRestrictedType())
8165
else if (rightType.
IsDynamic
() && !leftType.IsPointerType() && !leftType.IsRestrictedType())
8330
if (!rightType.
IsDynamic
())
8335
if (!leftType.
IsDynamic
())
8393
Assert.Equal(isDynamic, signature.ReturnType.
IsDynamic
());
8485
if (rightType.
IsDynamic
())
8503
if (leftType.
IsDynamic
())
8517
if (rightType.
IsDynamic
())
8526
if (leftType.
IsDynamic
())
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Symbols\Source\PropertyTests.cs (8)
2620
Assert.False(iap.Type.
IsDynamic
());
2622
Assert.False(iam.ReturnType.
IsDynamic
());
2638
Assert.False(iap.Type.
IsDynamic
());
2640
Assert.False(iam.ReturnType.
IsDynamic
());
2656
Assert.True(iap.Type.
IsDynamic
());
2658
Assert.True(iam.ReturnType.
IsDynamic
());
2674
Assert.True(iap.Type.
IsDynamic
());
2676
Assert.True(iam.ReturnType.
IsDynamic
());