42 references to IsTypeParameter
Microsoft.CodeAnalysis.CSharp (42)
Binder\Binder.ValueChecks.cs (3)
699Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter()); 3654Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter()); 4733Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter());
Binder\Binder_Constraints.cs (1)
503if (!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)
244else if (operatorSourceOpt.IsTypeParameter()) 893if ((object)current == null && type0.IsTypeParameter())
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (2)
397if ((object)current == null && type0.IsTypeParameter()) 424else if (type0.IsTypeParameter())
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
2727var t1IsTypeParameter = t1.IsTypeParameter(); 2728var t2IsTypeParameter = t2.IsTypeParameter();
CodeGen\EmitExpression.cs (5)
1322if (type.IsTypeParameter()) 1510if (receiver.Type.IsTypeParameter()) 2601if (!rightType.IsTypeParameter()) 3436if (!type.IsTypeParameter() && type.SpecialType != SpecialType.System_Decimal) 3862if (expr.Type.IsTypeParameter())
CodeGen\EmitStatement.cs (2)
1129Debug.Assert(exceptionSourceOpt.Type.IsTypeParameter()); // only expecting type parameters 1158Debug.Assert(!left.ReceiverOpt.Type.IsTypeParameter());
CodeGen\Optimizer.cs (2)
1235if (receiverType.IsTypeParameter()) 1348if (receiver.Type.IsTypeParameter())
Compilation\BuiltInOperators.cs (2)
878if (((object)leftType != null) && leftType.IsTypeParameter()) 889if (((object)rightType != null) && rightType.IsTypeParameter())
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
1117if (node.ReceiverOpt?.Type.IsTypeParameter() == true &&
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
484if (rewrittenReceiver.Type.IsTypeParameter())
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (2)
663if (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)
567if (different.IsClassType() && !same.IsTypeParameter()) 570Debug.Assert(!different.IsTypeParameter()); 678else if (!(parameterType.IsTypeParameter() ?
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (2)
262private bool IsSingleElement => _field.Type.IsTypeParameter(); 739Debug.Assert(fieldType.IsTypeParameter());
Symbols\TypeSymbol.cs (3)
239return this.IsTypeParameter() ? ((TypeParameterSymbol)this).EffectiveBaseClassNoUseSiteDiagnostics : this; 245return this.IsTypeParameter() ? ((TypeParameterSymbol)this).EffectiveBaseClass(ref useSiteInfo) : this; 254Debug.Assert(!type.IsTypeParameter());
Symbols\TypeUnification.cs (5)
99if (!t1.Type.IsTypeParameter() && t2.Type.IsTypeParameter()) 107Debug.Assert(t1.Type.IsTypeParameter() || !t2.Type.IsTypeParameter()); 220if (t2.Type.IsTypeParameter())
Symbols\TypeWithAnnotations.cs (2)
92Debug.Assert(nullableAnnotation != NullableAnnotation.Ignored || typeSymbol.IsTypeParameter()); 448if (!typeSymbol.IsTypeParameter())