Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1810)

Side by Side Diff: test/ken/strvar.go

Issue 174042: code review 174042: make test/ken safe for optional semis (Closed)
Patch Set: code review 174042: make test/ken safe for optional semis Created 15 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/ken/string.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // $G $D/$F.go && $L $F.$A && ./$A.out 1 // $G $D/$F.go && $L $F.$A && ./$A.out
2 2
3 // Copyright 2009 The Go Authors. All rights reserved. 3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style 4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file. 5 // license that can be found in the LICENSE file.
6 6
7 7
8 package main 8 package main
9 9
10 type x2 struct { a,b,c int; d int; }; 10 type x2 struct { a,b,c int; d int; };
11 var g1 x2; 11 var g1 x2;
12 var g2 struct { a,b,c int; d x2; }; 12 var g2 struct { a,b,c int; d x2; };
13 13
14 func 14 func
15 main() 15 main() {
16 {
17 var x int; 16 var x int;
18 var s1 *x2; 17 var s1 *x2;
19 var s2 *struct { a,b,c int; d x2; }; 18 var s2 *struct { a,b,c int; d x2; };
20 var s3 struct { a,b,c int; d x2; }; 19 var s3 struct { a,b,c int; d x2; };
21 20
22 s1 = &g1; 21 s1 = &g1;
23 s2 = &g2; 22 s2 = &g2;
24 23
25 s1.a = 1; 24 s1.a = 1;
26 s1.b = 2; 25 s1.b = 2;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 x = s3.a + 69 x = s3.a +
71 s3.b + 70 s3.b +
72 s3.c + 71 s3.c +
73 s3.d.a + 72 s3.d.a +
74 s3.d.b + 73 s3.d.b +
75 s3.d.c + 74 s3.d.c +
76 s3.d.d; 75 s3.d.d;
77 76
78 if(x != 119) { panic(x); } 77 if(x != 119) { panic(x); }
79 } 78 }
OLDNEW
« no previous file with comments | « test/ken/string.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b