1
1
package _αβx9
2
2
3
- import "net/http"
4
-
5
3
// https://github.com/syscrusher/golang.tmbundle/issues/36#issuecomment-250866224
6
4
func OkayReturn (x int ) (string , error ) {
7
5
return "" , nil
@@ -13,9 +11,9 @@ func BrokenNewlineReturn(name string) (string,
13
11
nil
14
12
}
15
13
14
+ // https://github.com/syscrusher/golang.tmbundle/issues/36#issuecomment-250847018
16
15
type x struct {}
17
16
18
- // https://github.com/syscrusher/golang.tmbundle/issues/36#issuecomment-250847018
19
17
func (xx * x ) OkayParam (a int ) {
20
18
return
21
19
}
@@ -24,29 +22,30 @@ func (xx *x) BrokenParenthesesParam(a func()) {
24
22
return
25
23
}
26
24
27
- func ( xx * x ) OkayBraketParam ( a interface {} ) {
25
+ func BrokenParenthesesParam2 ( a func () ) {
28
26
return
29
27
}
30
28
31
- func (xx * x ) BrokenBraketParam (a struct {}) {
29
+ func (xx * x ) OkayBracketParam (a interface {}) {
32
30
return
33
31
}
34
32
35
- type v struct {}
36
- func (vv * v ) Type () int (
37
- return 0
38
- )
33
+ func (xx * x ) BrokenBracketParam (a struct {}) {
34
+ return
35
+ }
36
+
37
+ func BrokenBracketParam2 (a struct {}) {
38
+ return
39
+ }
39
40
40
- type t []int
41
41
// https://github.com/syscrusher/golang.tmbundle/issues/36#issuecomment-260472685
42
- func BrokenType () {
43
- type typeVars map [int ]string
44
- typeVars ["a" ] = "a"
45
- typeVars ["b" ] = append (typeVars ["a" ], "b" )
46
-
47
- types := new (t )
48
- if _ , ok := typeVars [v .Type ]; ! ok {
49
- types = append (types , v .Type )
50
- }
42
+ func typeVarsOkay () {
43
+ var typeVars []int
44
+ typeVars = append (typeVars , 1 )
51
45
}
52
46
47
+ func typeVarsBroken () {
48
+ var typeVars []int
49
+ v := struct { a int }{1 }
50
+ typeVars = append (typeVars , v .a )
51
+ }
0 commit comments