Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for tcUnaryArith (0.12 sec)

  1. src/cmd/compile/internal/typecheck/expr.go

    			n.SetType(nil)
    			return n
    		}
    		base.Errorf("%v is not a type", l)
    		return n
    	}
    
    	n.SetType(t.Elem())
    	return n
    }
    
    // tcUnaryArith typechecks a unary arithmetic expression.
    func tcUnaryArith(n *ir.UnaryExpr) ir.Node {
    	n.X = Expr(n.X)
    	l := n.X
    	t := l.Type()
    	if t == nil {
    		n.SetType(nil)
    		return n
    	}
    	if !okfor[n.Op()][defaultType(t).Kind()] {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/typecheck.go

    				add.List.Append(r)
    			}
    			add.SetType(t)
    			return add
    		}
    		n.X, n.Y = l, r
    		n.SetType(t)
    		return n
    
    	case ir.OBITNOT, ir.ONEG, ir.ONOT, ir.OPLUS:
    		n := n.(*ir.UnaryExpr)
    		return tcUnaryArith(n)
    
    	// exprs
    	case ir.OCOMPLIT:
    		return tcCompLit(n.(*ir.CompLitExpr))
    
    	case ir.OXDOT, ir.ODOT:
    		n := n.(*ir.SelectorExpr)
    		return tcDot(n, top)
    
    	case ir.ODOTTYPE:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
Back to top