aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/lsp/analysis/nonewvars/testdata/src/a/a.go
blob: 97d8fcde1274522901e87065b0177d4838ae655b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package nonewvars

import "log"

func x() {
	z := 1
	z := 2 // want "no new variables on left side of :="

	_, z := 3, 100 // want "no new variables on left side of :="

	log.Println(z)
}