Fixes #69206
Change-Id: I1b5a664c22d5739e2c6748d562591f57345b536e
GitHub-Last-Rev:
1798e2c65b3c2c0c1ef674b000dce2636c834783
GitHub-Pull-Request: golang/go#69208
Reviewed-on: https://go-review.googlesource.com/c/go/+/610115
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
case *ast.BinaryExpr:
return combinesWithName(x.X) && !isTypeElem(x.Y)
case *ast.ParenExpr:
- // name(x) combines but we are making sure at
- // the call site that x is never parenthesized.
- panic("unexpected parenthesized expression")
+ return combinesWithName(x.X)
}
return false
}
type _[P T | T | T | T] struct{}
type _[P *T, _ any] struct{}
type _[P *T,] struct{}
+type _[P *T,] struct{}
+type _[P ~int] struct{}
type _[P *T, _ any] struct{}
type _[P T] struct{}
type _[P T, _ any] struct{}
type _[P T | T | T | T] struct{}
type _[P *T, _ any] struct{}
type _[P (*T),] struct{}
+type _[P ((*T)),] struct{}
+type _[P ((~int)),] struct{}
type _[P (*T), _ any] struct{}
type _[P (T),] struct{}
type _[P (T), _ any] struct{}