- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 32 for NewTypeName (0.12 sec)
-
src/cmd/compile/internal/types2/object.go
// argument for NewNamed, which will set the TypeName's type as a side- // effect. func NewTypeName(pos syntax.Pos, pkg *Package, name string, typ Type) *TypeName { return &TypeName{object{nil, pos, pkg, name, typ, 0, colorFor(typ), nopos}} } // NewTypeNameLazy returns a new defined type like NewTypeName, but it // lazily calls resolve to finish constructing the Named object.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 20.1K bytes - Viewed (0) -
src/go/types/issues_test.go
// type T1 struct { // _ T2 // } // // type T2 struct { // _ struct { // _ T2 // } // } n1 := NewTypeName(nopos, nil, "T1", nil) T1 := NewNamed(n1, nil, nil) n2 := NewTypeName(nopos, nil, "T2", nil) T2 := NewNamed(n2, nil, nil) s1 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil) T1.SetUnderlying(s1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 28.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/issues_test.go
// type T1 struct { // _ T2 // } // // type T2 struct { // _ struct { // _ T2 // } // } n1 := NewTypeName(nopos, nil, "T1", nil) T1 := NewNamed(n1, nil, nil) n2 := NewTypeName(nopos, nil, "T2", nil) T2 := NewNamed(n2, nil, nil) s1 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil) T1.SetUnderlying(s1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 28.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/alias.go
// reporting). func (check *Checker) newAliasInstance(pos syntax.Pos, orig *Alias, targs []Type, ctxt *Context) *Alias { assert(len(targs) > 0) obj := NewTypeName(pos, orig.obj.pkg, orig.obj.name, nil) rhs := check.subst(pos, orig.fromRHS, makeSubstMap(orig.TypeParams().list(), targs), nil, ctxt) res := check.newAlias(obj, rhs) res.orig = orig res.tparams = orig.tparams
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 5K bytes - Viewed (0) -
src/go/types/typeterm_test.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package types import ( "strings" "testing" ) var myInt = func() Type { tname := NewTypeName(nopos, nil, "myInt", nil) return NewNamed(tname, Typ[Int], nil) }() var testTerms = map[string]*term{ "∅": nil, "𝓤": {}, "int": {false, Typ[Int]}, "~int": {true, Typ[Int]},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 5.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typeterm_test.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package types2 import ( "strings" "testing" ) var myInt = func() Type { tname := NewTypeName(nopos, nil, "myInt", nil) return NewNamed(tname, Typ[Int], nil) }() var testTerms = map[string]*term{ "∅": nil, "𝓤": {}, "int": {false, Typ[Int]}, "~int": {true, Typ[Int]},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 20 23:30:58 UTC 2021 - 5.1K bytes - Viewed (0) -
src/go/types/alias.go
// reporting). func (check *Checker) newAliasInstance(pos token.Pos, orig *Alias, targs []Type, ctxt *Context) *Alias { assert(len(targs) > 0) obj := NewTypeName(pos, orig.obj.pkg, orig.obj.name, nil) rhs := check.subst(pos, orig.fromRHS, makeSubstMap(orig.TypeParams().list(), targs), nil, ctxt) res := check.newAlias(obj, rhs) res.orig = orig res.tparams = orig.tparams
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 5.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/decl.go
// yet. // TODO(gri) Need to systematically review all uses of type parameter // constraints to make sure we don't rely on them if they // are not properly set yet. tname := NewTypeName(name.Pos(), check.pkg, name.Value, nil) tpar := check.newTypeParam(tname, Typ[Invalid]) // assigns type to tname as a side-effect check.declare(check.scope, name, tname, scopePos) return tpar }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 29.6K bytes - Viewed (0) -
src/go/types/decl.go
// TODO(gri) Need to systematically review all uses of type parameter // constraints to make sure we don't rely on them if they // are not properly set yet. for _, name := range names { tname := NewTypeName(name.Pos(), check.pkg, name.Name, nil) tpar := check.newTypeParam(tname, Typ[Invalid]) // assigns type to tpar as a side-effect check.declare(check.scope, name, tname, scopePos) tparams = append(tparams, tpar) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31K bytes - Viewed (0) -
src/go/internal/gccgoimporter/parser.go
return t } t := p.parseType(pkg, nlist...) obj = types.NewTypeName(token.NoPos, pkg, name, t) scope.Insert(obj) return t } // defined type if obj == nil { // A named type may be referred to before the underlying type // is known - set it up. tname := types.NewTypeName(token.NoPos, pkg, name, nil) types.NewNamed(tname, nil, nil) scope.Insert(tname)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 02 23:14:07 UTC 2024 - 31.2K bytes - Viewed (0)