aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/return.yue
blob: fda8d62cdd1832506c5c17b8219b139ffbb6e908 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
-- testing `return` propagation

_ = -> _ = x for x in *things
_ = -> [x for x in *things]


-- doesn't make sense on purpose
do
	for x in *things do return x

do
	return [x for x in *things]

do
	return {x,y for x,y in *things}

_ = ->
	if a
		if a
			a
		else
			b
	elseif b
		if a
			a
		else
			b
	else
		if a
			a
		else
			b


do
	return if a
		if a
			a
		else
			b
	elseif b
		if a
			a
		else
			b
	else
		if a
			a
		else
			b

do
	return
		:value
		itemA: 123
		itemB: "abc"

do
	return
		* 1
		* 2
		* ...three
		* 4

_ = -> a\b
do a\b