File: range.go

package info (click to toggle)
golang-github-neelance-astrewrite 0.0~git20160511.0.9934826-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 112 kB
  • sloc: sh: 18; makefile: 5
file content (30 lines) | stat: -rw-r--r-- 317 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package main

func test1() {
	for range makeChan() {
		makeFunc()()
	}
}

func test2() {
	for x := range makeChan() {
		_ = x
		makeFunc()()
	}
}

func test3() {
	var x int
	for x = range makeChan() {
		_ = x
		makeFunc()()
	}
}

func makeChan() <-chan int {
	return nil
}

func makeFunc() func() int {
	return nil
}