Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for OXXX (0.14 sec)

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

    			return ir.OCONVIFACE, ""
    		}
    		return ir.OXXX, ":\n\t" + why
    	}
    
    	if isptrto(dst, types.TINTER) {
    		why := fmt.Sprintf(":\n\t%v is pointer to interface, not interface", dst)
    		return ir.OXXX, why
    	}
    
    	if src.IsInterface() && dst.Kind() != types.TBLANK {
    		var why string
    		if Implements(dst, src) {
    			why = ": need type assertion"
    		}
    		return ir.OXXX, why
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 19:45:58 UTC 2023
    - 20.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/expr.go

    	l, r = defaultlit2(l, r, false)
    	if l.Type() == nil || r.Type() == nil {
    		return l, r, nil
    	}
    	t := l.Type()
    	if t.Kind() == types.TIDEAL {
    		t = r.Type()
    	}
    	aop := ir.OXXX
    	if n.Op().IsCmp() && t.Kind() != types.TIDEAL && !types.Identical(l.Type(), r.Type()) {
    		// comparison is okay as long as one side is
    		// assignable to the other.  convert so they have
    		// the same type.
    		//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/stmt.go

    				base.ErrorfAt(ncase.Pos(), errors.UndefinedOp, "invalid case %L in switch (incomparable type)", n1)
    			} else {
    				op1, _ := assignOp(n1.Type(), t)
    				op2, _ := assignOp(t, n1.Type())
    				if op1 == ir.OXXX && op2 == ir.OXXX {
    					if n.Tag != nil {
    						base.ErrorfAt(ncase.Pos(), errors.MismatchedTypes, "invalid case %v in switch on %v (mismatched types %v and %v)", n1, n.Tag, n1.Type(), t)
    					} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/typecheck.go

    	// TODO(mdempsky): Handle all untyped types correctly.
    	if src == types.UntypedBool && dst.Type().IsBoolean() {
    		return
    	}
    
    	if op, why := assignOp(src, dst.Type()); op == ir.OXXX {
    		base.Errorf("cannot assign %v to %L in multiple assignment%s", src, dst, why)
    		return
    	}
    }
    
    // The result of stringtoruneslit MUST be assigned back to n, e.g.
    //
    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