MakeType() public static method

public static MakeType ( ModuleContainer module, TypeSpec underlyingType ) : TypeSpec
module ModuleContainer
underlyingType TypeSpec
return TypeSpec
Example #1
0
        Expression LiftOperand(ResolveContext rc, Expression expr)
        {
            TypeSpec type;

            if (expr.IsNull)
            {
                type = Left.IsNull ? Right.Type : Left.Type;
            }
            else
            {
                type = expr.Type;
            }

            if (!type.IsNullableType)
            {
                type = NullableInfo.MakeType(rc.Module, type);
            }

            return(Wrap.Create(expr, type));
        }