- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for rangeloops2 (0.23 sec)
-
src/internal/types/testdata/check/stmt0.go
for range cs {} for range "" {} for i, x := range cs { _, _ = i, x } for i, x := range "" { var ii int ii = i _ = ii var xx rune xx = x _ = xx } } func rangeloops2() { type I int type R rune var a [10]int var i I _ = i for i /* ERRORx `cannot use .* in assignment` */ = range a {} for i /* ERRORx `cannot use .* in assignment` */ = range &a {}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 19K bytes - Viewed (0) -
src/cmd/vet/testdata/rangeloop/rangeloop.go
// Copyright 2012 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. // This file contains tests for the rangeloop checker. package rangeloop func RangeLoopTests() { var s []int for i, v := range s { go func() { println(i) // ERROR "loop variable i captured by func literal" println(v) // ERROR "loop variable v captured by func literal" }()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 20 15:46:42 UTC 2019 - 452 bytes - Viewed (0) -
src/cmd/go/internal/test/flagdefs.go
"httpresponse": true, "ifaceassert": true, "loopclosure": true, "lostcancel": true, "methods": true, "nilfunc": true, "printf": true, "rangeloops": true, "shift": true, "sigchanyzer": true, "slog": true, "stdmethods": true, "stdversion": true, "stringintconv": true, "structtag": true,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 01:02:40 UTC 2024 - 2.2K bytes - Viewed (0) -
src/cmd/vet/vet_test.go
cmd.Env = append(os.Environ(), "GOWORK=off") cmd.Dir = "testdata/rangeloop" cmd.Stderr = new(strings.Builder) // all vet output goes to stderr cmd.Run() stderr := cmd.Stderr.(fmt.Stringer).String() filename := filepath.FromSlash("testdata/rangeloop/rangeloop.go") // Unlike the tests above, which runs vet in cmd/vet/, this one
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 01:02:40 UTC 2024 - 12.5K bytes - Viewed (0) -
src/cmd/vet/testdata/rangeloop/go.mod
module rangeloop
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 26 bytes - Viewed (0) -
src/cmd/internal/test2json/testdata/vet.test
=== CONT TestVetDirs/divergent === CONT TestVetDirs/incomplete === CONT TestVetDirs/cgo --- PASS: TestVet (0.39s) --- PASS: TestVet/5 (0.07s) vet_test.go:114: files: ["testdata/copylock_func.go" "testdata/rangeloop.go"] --- PASS: TestVet/3 (0.07s) vet_test.go:114: files: ["testdata/composite.go" "testdata/nilfunc.go"] --- PASS: TestVet/6 (0.07s)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 01 16:13:47 UTC 2020 - 3.1K bytes - Viewed (0) -
src/cmd/internal/test2json/testdata/smiley.test
=== CONT Test☺☹Dirs/divergent === CONT Test☺☹Dirs/incomplete === CONT Test☺☹Dirs/cgo --- PASS: Test☺☹ (0.39s) --- PASS: Test☺☹/5 (0.07s) vet_test.go:114: φιλεσ: ["testdata/copylock_func.go" "testdata/rangeloop.go"] --- PASS: Test☺☹/3 (0.07s) vet_test.go:114: φιλεσ: ["testdata/composite.go" "testdata/nilfunc.go"] --- PASS: Test☺☹/6 (0.07s)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 01 16:13:47 UTC 2020 - 3.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/internal/analysisflags/flags.go
// new names. The old names will continue to work. var vetLegacyFlags = map[string]string{ // Analyzer name changes "bool": "bools", "buildtags": "buildtag", "methods": "stdmethods", "rangeloops": "loopclosure", // Analyzer flags "compositewhitelist": "composites.whitelist", "printfuncs": "printf.funcs", "shadowstrict": "shadow.strict", "unusedfuncs": "unusedresult.funcs",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 19:00:13 UTC 2024 - 12.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/cfg/cfg.go
KindIfElse: "IfElse", KindIfThen: "IfThen", KindLabel: "Label", KindRangeBody: "RangeBody", KindRangeDone: "RangeDone", KindRangeLoop: "RangeLoop", KindSelectCaseBody: "SelectCaseBody", KindSelectDone: "SelectDone", KindSelectAfterCase: "SelectAfterCase", KindSwitchCaseBody: "SwitchCaseBody", KindSwitchDone: "SwitchDone",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 7.7K bytes - Viewed (0) -
src/cmd/internal/test2json/testdata/vet.json
{"Action":"output","Test":"TestVet/5","Output":" --- PASS: TestVet/5 (0.07s)\n"} {"Action":"output","Test":"TestVet/5","Output":" vet_test.go:114: files: [\"testdata/copylock_func.go\" \"testdata/rangeloop.go\"]\n"} {"Action":"pass","Test":"TestVet/5"} {"Action":"output","Test":"TestVet/3","Output":" --- PASS: TestVet/3 (0.07s)\n"}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 09 17:33:07 UTC 2022 - 11.8K bytes - Viewed (0)