Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for checkLHS (0.08 sec)

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

    	// in that case, do not call typecheck back, or it will cycle.
    	// if the variable has a type (ntype) then typechecking
    	// will not look at defn, so it is okay (and desirable,
    	// so that the conversion below happens).
    
    	checkLHS := func(i int, typ *types.Type) {
    		if n := lhs[i]; typ != nil && ir.DeclaredBy(n, stmt) && n.Type() == nil {
    			base.Assertf(typ.Kind() == types.TNIL, "unexpected untyped nil")
    			n.SetType(defaultType(typ))
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
Back to top