62 references to AreEquivalent
System.Core (62)
Microsoft\Scripting\Actions\BindingRestrictions.cs (1)
258return other != null && TypeUtils.AreEquivalent(other._type, _type) && other._expression == _expression;
Microsoft\Scripting\Actions\DynamicObject.cs (1)
741if (TypeUtils.AreEquivalent(Expression.Type, typeof(DynamicObject))) {
Microsoft\Scripting\Actions\ExpandoObject.cs (1)
887if (TypeUtils.AreEquivalent(Expression.Type, LimitType)) {
Microsoft\Scripting\Ast\BinaryExpression.cs (13)
319!TypeUtils.AreEquivalent(method.GetParametersCached()[0].ParameterType.GetNonRefType(), _left.Type); 342Debug.Assert(method == null && TypeUtils.AreEquivalent(type, left.Type)); 346Debug.Assert(method == null && TypeUtils.AreEquivalent(type, right.Type) && nodeType == ExpressionType.Coalesce); 367TypeUtils.AreEquivalent(right, left) && 370TypeUtils.AreEquivalent(method.ReturnType, TypeUtils.GetNonNullableType(left)); 691if (method == null && !TypeUtils.AreEquivalent(leftType, rightType)) { 814return TypeUtils.AreEquivalent(left, right) && 816TypeUtils.AreEquivalent(pms[1].ParameterType, TypeUtils.GetNonNullableType(right)); 1245returnType = (TypeUtils.IsNullableType(left.Type) && TypeUtils.AreEquivalent(method.ReturnType, TypeUtils.GetNonNullableType(left.Type))) ? left.Type : method.ReturnType; 1251returnType = (TypeUtils.IsNullableType(left.Type) && TypeUtils.AreEquivalent(method.ReturnType, TypeUtils.GetNonNullableType(left.Type))) ? left.Type : method.ReturnType; 1353if (!TypeUtils.AreEquivalent(method.ReturnType, right.Type)) { 1483if (!TypeUtils.AreEquivalent(mi.ReturnType, left.Type)) { 1488if (!TypeUtils.AreEquivalent(pms[0].ParameterType, method.ReturnType)) {
Microsoft\Scripting\Ast\BlockExpression.cs (1)
785if (!TypeUtils.AreEquivalent(type, last.Type)) {
Microsoft\Scripting\Ast\CatchBlock.cs (1)
165ContractUtils.Requires(variable == null || TypeUtils.AreEquivalent(variable.Type, type), "variable");
Microsoft\Scripting\Ast\ConditionalExpression.cs (1)
164if (!TypeUtils.AreEquivalent(ifTrue.Type, ifFalse.Type)) {
Microsoft\Scripting\Ast\ExpressionVisitor.cs (1)
670if (TypeUtils.AreEquivalent(before, after)) {
Microsoft\Scripting\Ast\NewExpression.cs (1)
244if (!TypeUtils.AreEquivalent(member.DeclaringType, constructor.DeclaringType)) {
Microsoft\Scripting\Ast\SwitchExpression.cs (3)
109!TypeUtils.AreEquivalent(_switchValue.Type, _comparison.GetParametersCached()[0].ParameterType.GetNonRefType()); 256if (!TypeUtils.AreEquivalent(firstTestValue.Type, c.TestValues[i].Type)) { 298if (!TypeUtils.AreEquivalent(resultType, @case.Type)) {
Microsoft\Scripting\Ast\TryExpression.cs (1)
226if (cb.Body == null || !TypeUtils.AreEquivalent(cb.Body.Type, type)) {
Microsoft\Scripting\Ast\TypeUtils.cs (13)
161if (AreEquivalent(dest, src)) { 203if (AreEquivalent(source, dest)) { 208if (IsNullableType(source) && AreEquivalent(dest, GetNonNullableType(source))) { 211if (IsNullableType(dest) && AreEquivalent(source, GetNonNullableType(dest))) { 326if (AreEquivalent(sourceArgument, destArgument)) 416if (!AreEquivalent(left, right)) { 432return AreEquivalent(source, destination) || // identity conversion 456if (!TypeUtils.AreEquivalent(nnExprType, convertFrom) || 457!TypeUtils.AreEquivalent(nnConvType, convertToType)) { 474if (!TypeUtils.AreEquivalent(mi.ReturnType, typeTo)) { 478if (!TypeUtils.AreEquivalent(pis[0].ParameterType, typeFrom)) { 605return AreEquivalent(type, subType) || subType.IsSubclassOf(type); 620if (type.IsGenericType && AreEquivalent(type.GetGenericTypeDefinition(), definition)) {
Microsoft\Scripting\Ast\UnaryExpression.cs (4)
95return (operandIsNullable && !TypeUtils.AreEquivalent(_method.GetParametersCached()[0].ParameterType, _operand.Type)) || 96(resultIsNullable && !TypeUtils.AreEquivalent(_method.ReturnType, this.Type)); 437if (ParameterIsAssignable(pms[0], operand.Type) && TypeUtils.AreEquivalent(method.ReturnType, convertToType)) { 443TypeUtils.AreEquivalent(method.ReturnType, TypeUtils.GetNonNullableType(convertToType))) {
Microsoft\Scripting\Compiler\ILGen.cs (1)
597if (TypeUtils.AreEquivalent(typeFrom, typeTo)) {
Microsoft\Scripting\Compiler\LambdaCompiler.Address.cs (5)
81if (TypeUtils.AreEquivalent(type, node.Type)) { 103if (TypeUtils.AreEquivalent(type, node.Type)) { 116if (TypeUtils.AreEquivalent(type, node.Type)) { 182if (!TypeUtils.AreEquivalent(type, node.Type) || node.Indexer != null) { 224if (TypeUtils.AreEquivalent(type, node.Type)) {
Microsoft\Scripting\Compiler\LambdaCompiler.Binary.cs (1)
476if (!TypeUtils.AreEquivalent(resultType, TypeUtils.GetNonNullableType(resultType))) {
Microsoft\Scripting\Compiler\LambdaCompiler.Expressions.cs (6)
136if (!TypeUtils.AreEquivalent(node.Type, type)) { 938Debug.Assert(TypeUtils.AreEquivalent(TypeUtils.GetNonNullableType(resultType), TypeUtils.GetNonNullableType(mc.Type))); 977if (TypeUtils.IsNullableType(resultType) && !TypeUtils.AreEquivalent(resultType, mc.Type)) { 983if (TypeUtils.AreEquivalent(resultType, TypeUtils.GetNullableType(mc.Type))) { 1010if (TypeUtils.AreEquivalent(resultType, TypeUtils.GetNullableType(mc.Type))) { 1068if (TypeUtils.IsNullableType(resultType) && !TypeUtils.AreEquivalent(resultType, mc.Type)) {
Microsoft\Scripting\Compiler\LambdaCompiler.Logical.cs (4)
142} else if (!TypeUtils.AreEquivalent(b.Type, nnLeftType)) { 155if (!TypeUtils.AreEquivalent(b.Right.Type, b.Type)) { 203if (!TypeUtils.AreEquivalent(b.Right.Type, b.Type)) { 211if (!TypeUtils.AreEquivalent(b.Left.Type, b.Type)) {
Microsoft\Scripting\Compiler\LambdaCompiler.Statements.cs (1)
329!TypeUtils.AreEquivalent(type, node.Cases[0].TestValues[0].Type)) {
Microsoft\Scripting\Compiler\LambdaCompiler.Unary.cs (2)
146Debug.Assert(TypeUtils.AreEquivalent(operandType, resultType)); 324if (TypeUtils.AreEquivalent(node.Operand.Type, node.Type)) {