- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for ParenExpr (0.13 sec)
-
src/cmd/compile/internal/types2/check.go
// children. for { check.recordTypeAndValue(f, builtin, sig, nil) switch p := f.(type) { case *syntax.Name, *syntax.SelectorExpr: return // we're done case *syntax.ParenExpr: f = p.X default: panic("unreachable") } } } // recordCommaOkTypes updates recorded types to reflect that x is used in a commaOk context // (and therefore has tuple type).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 23.3K bytes - Viewed (0) -
src/go/types/check.go
// children. for { check.recordTypeAndValue(f, builtin, sig, nil) switch p := f.(type) { case *ast.Ident, *ast.SelectorExpr: return // we're done case *ast.ParenExpr: f = p.X default: panic("unreachable") } } } // recordCommaOkTypes updates recorded types to reflect that x is used in a commaOk context // (and therefore has tuple type).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 23.1K bytes - Viewed (0) -
src/go/ast/filter.go
b = true } } return b } func filterType(typ Expr, f Filter, export bool) bool { switch t := typ.(type) { case *Ident: return f(t.Name) case *ParenExpr: return filterType(t.X, f, export) case *ArrayType: return filterType(t.Elt, f, export) case *StructType: if filterFieldList(t.Fields, f, export) { t.Incomplete = true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 13.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typexpr.go
} case *syntax.IndexExpr: check.verifyVersionf(e, go1_18, "type instantiation") return check.instantiatedType(e.X, syntax.UnpackListExpr(e.Index), def) case *syntax.ParenExpr: // Generic types must be instantiated before they can be used in any form. // Consequently, generic types cannot be parenthesized. return check.definedType(e.X, def) case *syntax.ArrayType:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.6K bytes - Viewed (0) -
src/go/types/typexpr.go
case *ast.IndexExpr, *ast.IndexListExpr: ix := typeparams.UnpackIndexExpr(e) check.verifyVersionf(inNode(e, ix.Lbrack), go1_18, "type instantiation") return check.instantiatedType(ix, def) case *ast.ParenExpr: // Generic types must be instantiated before they can be used in any form. // Consequently, generic types cannot be parenthesized. return check.definedType(e.X, def) case *ast.ArrayType:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.3K bytes - Viewed (0) -
src/cmd/compile/internal/walk/assign.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:09:06 UTC 2024 - 20.3K bytes - Viewed (0) -
src/go/printer/printer_test.go
const want = `package p func f() ` if got != want { t.Fatalf("got:\n%s\nwant:\n%s\n", got, want) } } // TestChanType tests that the tree for <-(<-chan int), without // ParenExpr, is correctly formatted with parens. // Test case for issue #63362. func TestChanType(t *testing.T) { expr := &ast.UnaryExpr{ Op: token.ARROW, X: &ast.CallExpr{ Fun: &ast.ChanType{ Dir: ast.RECV,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 20.4K bytes - Viewed (0) -
src/go/doc/reader.go
return baseTypeName(t.X) case *ast.SelectorExpr: if _, ok := t.X.(*ast.Ident); ok { // only possible for qualified type names; // assume type is imported return t.Sel.Name, true } case *ast.ParenExpr: return baseTypeName(t.X) case *ast.StarExpr: return baseTypeName(t.X) } return "", false } // An embeddedSet describes a set of embedded types. type embeddedSet map[*namedType]bool
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 27.5K bytes - Viewed (0) -
src/go/types/resolver.go
// work for other invalid receivers, but we don't care. The // validity of receiver expressions is checked elsewhere. for { switch t := rtyp.(type) { case *ast.ParenExpr: rtyp = t.X case *ast.StarExpr: ptr = true rtyp = t.X default: break L } } // unpack type parameters, if any switch rtyp.(type) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 16:22:59 UTC 2024 - 26.1K bytes - Viewed (0)