Example #1
0
        public Value GetReturnValue(TypeSymbol type)
        {
            Value assignmentTarget = _assignmentScopes.Count > 0 ? _assignmentScopes.Peek().TargetValue : null;

            if (assignmentTarget != null && IsTriviallyAssignableTo(type, assignmentTarget.UserType))
            {
                return(assignmentTarget);
            }

            return(TopTable.CreateInternalValue(type));
        }
Example #2
0
 public Value CreateInternalValue(TypeSymbol type)
 {
     return(TopTable.CreateInternalValue(type));
 }