Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for varType (0.29 sec)

  1. src/cmd/compile/internal/types2/typexpr.go

    func (check *Checker) typ(e syntax.Expr) Type {
    	return check.definedType(e, nil)
    }
    
    // varType type-checks the type expression e and returns its type, or Typ[Invalid].
    // The type must not be an (uninstantiated) generic type and it must not be a
    // constraint interface.
    func (check *Checker) varType(e syntax.Expr) Type {
    	typ := check.definedType(e, nil)
    	check.validVarType(e, typ)
    	return typ
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  2. src/go/types/typexpr.go

    func (check *Checker) typ(e ast.Expr) Type {
    	return check.definedType(e, nil)
    }
    
    // varType type-checks the type expression e and returns its type, or Typ[Invalid].
    // The type must not be an (uninstantiated) generic type and it must not be a
    // constraint interface.
    func (check *Checker) varType(e ast.Expr) Type {
    	typ := check.definedType(e, nil)
    	check.validVarType(e, typ)
    	return typ
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  3. pkg/env/var.go

    import (
    	"encoding/json"
    	"fmt"
    	"os"
    	"sort"
    	"strconv"
    	"sync"
    	"time"
    
    	"istio.io/istio/pkg/log"
    )
    
    // The type of a variable's value
    type VarType byte
    
    const (
    	// Variable holds a free-form string.
    	STRING VarType = iota
    	// Variable holds a boolean value.
    	BOOL
    	// Variable holds a signed integer.
    	INT
    	// Variables holds a floating point value.
    	FLOAT
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  4. src/go/types/struct.go

    	// (go.dev/issue/25627).
    	addInvalid := func(ident *ast.Ident) {
    		typ = Typ[Invalid]
    		tag = ""
    		add(ident, true)
    	}
    
    	for _, f := range list.List {
    		typ = check.varType(f.Type)
    		tag = check.tag(f.Tag)
    		if len(f.Names) > 0 {
    			// named fields
    			for _, name := range f.Names {
    				add(name, false)
    			}
    		} else {
    			// embedded field
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/struct.go

    	for i, f := range e.FieldList {
    		// Fields declared syntactically with the same type (e.g.: a, b, c T)
    		// share the same type expression. Only check type if it's a new type.
    		if i == 0 || f.Type != prev {
    			typ = check.varType(f.Type)
    			prev = f.Type
    		}
    		tag = ""
    		if i < len(e.TagList) {
    			tag = check.tag(e.TagList[i])
    		}
    		if f.Name != nil {
    			// named field
    			add(f.Name, false)
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/signature.go

    					variadic = true
    				} else {
    					check.softErrorf(t, MisplacedDotDotDot, "can only use ... with final parameter in list")
    					// ignore ... and continue
    				}
    			}
    			typ = check.varType(ftype)
    		}
    		// The parser ensures that f.Tag is nil and we don't
    		// care if a constructed AST contains a non-nil tag.
    		if field.Name != nil {
    			// named parameter
    			name := field.Name.Value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:33:05 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  7. src/go/types/index.go

    	switch x.mode {
    	case invalid:
    		check.use(e.Indices...)
    		return false
    
    	case typexpr:
    		// type instantiation
    		x.mode = invalid
    		// TODO(gri) here we re-evaluate e.X - try to avoid this
    		x.typ = check.varType(e.Orig)
    		if isValid(x.typ) {
    			x.mode = typexpr
    		}
    		return false
    
    	case value:
    		if sig, _ := under(x.typ).(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
    			// function instantiation
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  8. src/go/types/builtins.go

    		}
    
    		x.typ = resTyp
    
    	case _Make:
    		// make(T, n)
    		// make(T, n, m)
    		// (no argument evaluated yet)
    		arg0 := argList[0]
    		T := check.varType(arg0)
    		if !isValid(T) {
    			return
    		}
    
    		var min int // minimum number of arguments
    		switch coreType(T).(type) {
    		case *Slice:
    			min = 2
    		case *Map, *Chan:
    			min = 1
    		case nil:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  9. src/go/types/signature.go

    				variadic = true
    			} else {
    				check.softErrorf(t, MisplacedDotDotDot, "can only use ... with final parameter in list")
    				// ignore ... and continue
    			}
    		}
    		typ := check.varType(ftype)
    		// The parser ensures that f.Tag is nil and we don't
    		// care if a constructed AST contains a non-nil tag.
    		if len(field.Names) > 0 {
    			// named parameter
    			for _, name := range field.Names {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 13K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/index.go

    	switch x.mode {
    	case invalid:
    		check.use(e.Index)
    		return false
    
    	case typexpr:
    		// type instantiation
    		x.mode = invalid
    		// TODO(gri) here we re-evaluate e.X - try to avoid this
    		x.typ = check.varType(e)
    		if isValid(x.typ) {
    			x.mode = typexpr
    		}
    		return false
    
    	case value:
    		if sig, _ := under(x.typ).(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
    			// function instantiation
    			return true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 16:16:58 UTC 2023
    - 11.5K bytes
    - Viewed (0)
Back to top