LEFT | RIGHT |
(no file at all) | |
1 // $G $D/$F.go && $L $F.$A && ./$A.out | 1 // run |
2 | 2 |
3 // Copyright 2011 The Go Authors. All rights reserved. | 3 // Copyright 2011 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 package main | 7 package main |
8 | 8 |
9 // Test that dynamic interface checks treat byte=uint8 | 9 // Test that dynamic interface checks treat byte=uint8 |
10 // and rune=int or rune=int32. | 10 // and rune=int or rune=int32. |
11 | 11 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } else { | 45 } else { |
46 x = int(5) | 46 x = int(5) |
47 } | 47 } |
48 switch x.(type) { | 48 switch x.(type) { |
49 case rune: | 49 case rune: |
50 // ok | 50 // ok |
51 default: | 51 default: |
52 println("int (or int32) != rune") | 52 println("int (or int32) != rune") |
53 } | 53 } |
54 } | 54 } |
LEFT | RIGHT |