42 references to IsTypeParameter
Microsoft.CodeAnalysis.CSharp (42)
Binder\Binder.ValueChecks.cs (3)
676
Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.
IsTypeParameter
());
3631
Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.
IsTypeParameter
());
4715
Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.
IsTypeParameter
());
Binder\Binder_Constraints.cs (1)
503
if (!type.DefaultType.
IsTypeParameter
() && // Doing an explicit check for type parameter on unresolved type to avoid cycles while calculating TypeKind. An unresolved type parameter cannot resolve to a class.
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (2)
244
else if (operatorSourceOpt.
IsTypeParameter
())
893
if ((object)current == null && type0.
IsTypeParameter
())
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (2)
397
if ((object)current == null && type0.
IsTypeParameter
())
424
else if (type0.
IsTypeParameter
())
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
2735
var t1IsTypeParameter = t1.
IsTypeParameter
();
2736
var t2IsTypeParameter = t2.
IsTypeParameter
();
CodeGen\EmitExpression.cs (5)
1322
if (type.
IsTypeParameter
())
1510
if (receiver.Type.
IsTypeParameter
())
2601
if (!rightType.
IsTypeParameter
())
3436
if (!type.
IsTypeParameter
() && type.SpecialType != SpecialType.System_Decimal)
3862
if (expr.Type.
IsTypeParameter
())
CodeGen\EmitStatement.cs (2)
1129
Debug.Assert(exceptionSourceOpt.Type.
IsTypeParameter
()); // only expecting type parameters
1158
Debug.Assert(!left.ReceiverOpt.Type.
IsTypeParameter
());
CodeGen\Optimizer.cs (2)
1235
if (receiverType.
IsTypeParameter
())
1348
if (receiver.Type.
IsTypeParameter
())
Compilation\BuiltInOperators.cs (2)
878
if (((object)leftType != null) && leftType.
IsTypeParameter
())
889
if (((object)rightType != null) && rightType.
IsTypeParameter
())
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
1117
if (node.ReceiverOpt?.Type.
IsTypeParameter
() == true &&
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
484
if (rewrittenReceiver.Type.
IsTypeParameter
())
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (2)
663
if (expr.Type.IsValueType && !expr.Type.
IsTypeParameter
())
704
(structToStringMethod == null && !expr.Type.
IsTypeParameter
()) ||
Lowering\SpillSequenceSpiller.cs (1)
562
&& receiverRefLocal.Type.
IsTypeParameter
()
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
335
(type.
IsTypeParameter
() || !type.IsRestrictedType(ignoreSpanLikeTypes: runtimeSupportsByRefLikeGenerics)) &&
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (3)
567
if (different.IsClassType() && !same.
IsTypeParameter
())
570
Debug.Assert(!different.
IsTypeParameter
());
678
else if (!(parameterType.
IsTypeParameter
() ?
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (2)
262
private bool IsSingleElement => _field.Type.
IsTypeParameter
();
739
Debug.Assert(fieldType.
IsTypeParameter
());
Symbols\TypeSymbol.cs (3)
239
return this.
IsTypeParameter
() ? ((TypeParameterSymbol)this).EffectiveBaseClassNoUseSiteDiagnostics : this;
245
return this.
IsTypeParameter
() ? ((TypeParameterSymbol)this).EffectiveBaseClass(ref useSiteInfo) : this;
254
Debug.Assert(!type.
IsTypeParameter
());
Symbols\TypeUnification.cs (5)
99
if (!t1.Type.
IsTypeParameter
() && t2.Type.
IsTypeParameter
())
107
Debug.Assert(t1.Type.
IsTypeParameter
() || !t2.Type.
IsTypeParameter
());
220
if (t2.Type.
IsTypeParameter
())
Symbols\TypeWithAnnotations.cs (2)
92
Debug.Assert(nullableAnnotation != NullableAnnotation.Ignored || typeSymbol.
IsTypeParameter
());
448
if (!typeSymbol.
IsTypeParameter
())