File tree 1 file changed +8
-13
lines changed
1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
5
- package main
5
+ package p
6
6
7
- type Optional(type T) struct {
8
- p T
9
- set bool
10
- }
7
+ type Optional(type T) struct {}
11
8
12
- func (o Optional(T)) Val() (T, bool) {
13
- return o.p, true
14
- }
9
+ func (_ Optional(T)) Val() (T, bool)
15
10
16
11
type Box(type T) interface {
17
12
Val() (T, bool)
18
13
}
19
14
20
- func F1 (type V interface{}, A, B Box(V))() {}
15
+ func f (type V interface{}, A, B Box(V))() {}
21
16
22
- func main () {
23
- F1 (int, Optional(int), Optional(int))()
24
- F1 (int, Optional(int), Optional(string) /* ERROR " does not satisfy Box(V) (missing method Val)" */ )()
25
- }
17
+ func _ () {
18
+ f (int, Optional(int), Optional(int))()
19
+ f (int, Optional(int), Optional /* ERROR does not satisfy Box */ (string) )()
20
+ }
You can’t perform that action at this time.
0 commit comments