- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for parseUnion (0.15 sec)
-
src/go/types/union.go
// Implementation // Avoid excessive type-checking times due to quadratic termlist operations. const maxTermCount = 100 // parseUnion parses uexpr as a union of expressions. // The result is a Union type, or Typ[Invalid] for some errors. func parseUnion(check *Checker, uexpr ast.Expr) Type { blist, tlist := flattenUnion(nil, uexpr) assert(len(blist) == len(tlist)-1) var terms []*Term var u Type
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 6.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/union.go
// Implementation // Avoid excessive type-checking times due to quadratic termlist operations. const maxTermCount = 100 // parseUnion parses uexpr as a union of expressions. // The result is a Union type, or Typ[Invalid] for some errors. func parseUnion(check *Checker, uexpr syntax.Expr) Type { blist, tlist := flattenUnion(nil, uexpr) assert(len(blist) == len(tlist)-1) var terms []*Term var u Type
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 15 16:16:58 UTC 2023 - 6.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/interface.go
ityp.embedPos = new([]syntax.Pos) } *ityp.embedPos = append(*ityp.embedPos, pos) } for _, f := range iface.MethodList { if f.Name == nil { addEmbedded(atPos(f.Type), parseUnion(check, f.Type)) continue } // f.Name != nil // We have a method with name f.Name. name := f.Name.Value if name == "_" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 09 17:24:42 UTC 2023 - 6.2K bytes - Viewed (0) -
src/go/types/interface.go
ityp.embedPos = new([]token.Pos) } *ityp.embedPos = append(*ityp.embedPos, pos) } for _, f := range iface.Methods.List { if len(f.Names) == 0 { addEmbedded(f.Type.Pos(), parseUnion(check, f.Type)) continue } // f.Name != nil // We have a method with name f.Names[0]. name := f.Names[0] if name.Name == "_" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 09 17:24:42 UTC 2023 - 8.1K bytes - Viewed (0)