blob: dcbde48e8769964716274c674a39214d0975465a [file] [log] [blame]
Dan Willemsen6ff23252015-09-15 13:49:18 -07001// compile
2
Dan Willemsen0c157092016-07-08 13:57:52 -07003// Copyright 2015 The Go Authors. All rights reserved.
Dan Willemsen6ff23252015-09-15 13:49:18 -07004// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7// Issue 10047: gccgo failed to compile a type switch where the switch variable
8// and the base type of a case share the same identifier.
9
10package main
11
12func main() {
13 type t int
14 var p interface{}
15 switch t := p.(type) {
16 case t:
17 _ = t
18 }
19}