OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [go/] [exp/] [gotype/] [testdata/] [test1.go] - Blame information for rev 747

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
// Copyright 2011 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4
 
5
package p
6
 
7
func _() {
8
        // the scope of a local type declaration starts immediately after the type name
9
        type T struct{ _ *T }
10
}
11
 
12
func _(x interface{}) {
13
        // the variable defined by a TypeSwitchGuard is declared in each TypeCaseClause
14
        switch t := x.(type) {
15
        case int:
16
                _ = t
17
        case float32:
18
                _ = t
19
        default:
20
                _ = t
21
        }
22
 
23
        // the variable defined by a TypeSwitchGuard must not conflict with other
24
        // variables declared in the initial simple statement
25
        switch t := 0; t := x.(type) {
26
        }
27
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.