@@ -11,19 +11,20 @@ type any interface{}
11
11
// TODO(rFindley) the below partially applied function types should probably
12
12
// not be permitted (spec question).
13
13
14
- func f0[A any, B interface{~C}, C interface{~D}, D interface{~A}](A, B, C, D)
15
- func _() {
16
- f := f0[string]
17
- f("a", "b", "c", "d")
18
- f0("a", "b", "c", "d")
19
- }
20
-
21
- func f1[A any, B interface{~A}](A, B)
22
- func _() {
23
- f := f1[int]
24
- f(int(0), int(0))
25
- f1(int(0), int(0))
26
- }
14
+ // Embedding stand-alone type parameters is not permitted for now. Disabled.
15
+ // func f0[A any, B interface{~C}, C interface{~D}, D interface{~A}](A, B, C, D)
16
+ // func _() {
17
+ // f := f0[string]
18
+ // f("a", "b", "c", "d")
19
+ // f0("a", "b", "c", "d")
20
+ // }
21
+ //
22
+ // func f1[A any, B interface{~A}](A, B)
23
+ // func _() {
24
+ // f := f1[int]
25
+ // f(int(0), int(0))
26
+ // f1(int(0), int(0))
27
+ // }
27
28
28
29
func f2[A any, B interface{~[]A}](A, B)
29
30
func _() {
@@ -32,13 +33,14 @@ func _() {
32
33
f2(byte(0), []byte{})
33
34
}
34
35
35
- func f3[A any, B interface{~C}, C interface{~*A}](A, B, C)
36
- func _() {
37
- f := f3[int]
38
- var x int
39
- f(x, &x, &x)
40
- f3(x, &x, &x)
41
- }
36
+ // Embedding stand-alone type parameters is not permitted for now. Disabled.
37
+ // func f3[A any, B interface{~C}, C interface{~*A}](A, B, C)
38
+ // func _() {
39
+ // f := f3[int]
40
+ // var x int
41
+ // f(x, &x, &x)
42
+ // f3(x, &x, &x)
43
+ // }
42
44
43
45
func f4[A any, B interface{~[]C}, C interface{~*A}](A, B, C)
44
46
func _() {
0 commit comments