From 3696e469e5f8a5531c69ffcf091deaa692e81104 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Sun, 8 May 2016 14:32:48 -0700 Subject: [PATCH] test: add test for issue 15602 The problem was fixed by the rollback in CL 22930. This CL just adds a test to prevent regressions. Fixes #15602 Change-Id: I37453f6e18ca43081266fe7f154c6d63fbaffd9b Reviewed-on: https://go-review.googlesource.com/22931 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Matthew Dempsky --- test/fixedbugs/issue15602.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/fixedbugs/issue15602.go diff --git a/test/fixedbugs/issue15602.go b/test/fixedbugs/issue15602.go new file mode 100644 index 0000000000..badf8133c5 --- /dev/null +++ b/test/fixedbugs/issue15602.go @@ -0,0 +1,11 @@ +// compile + +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package p + +func f(i interface{}) { + i, _ = i.(error) +} -- 2.48.1