Debian Codegraph @

_test/issue-1640.go

raw symbols SCIP
1 package main
2
3 import (
4 "errors"
5 )
6
7 func ShortVariableDeclarations() (i int, err error) {
8 r, err := 1, errors.New("test")
9 i = r
10 return
11 }
12
13 func main() {
14 _, er := ShortVariableDeclarations()
15 if er != nil {
16 println("ShortVariableDeclarations ok")
17 } else {
18 println("ShortVariableDeclarations not ok")
19 }
20 }
21
22 // Output:
23 // ShortVariableDeclarations ok