commit | 49e2087848c6c8a0f32bee62d2242d85ab044b33 | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Wed Feb 11 17:55:16 2009 -0800 |
committer | Russ Cox <rsc@golang.org> | Wed Feb 11 17:55:16 2009 -0800 |
tree | 3a27c60cd93482129d8beda588d769a2d7868d4d | |
parent | 7cd24361bd66f11ec2beb1905052a3b73cdf3dac [diff] [blame] |
insert type assertions when narrowing. R=r OCL=24349 CL=24913
diff --git a/test/fixedbugs/bug054.go b/test/fixedbugs/bug054.go index 0ed5d07..c8a2272 100644 --- a/test/fixedbugs/bug054.go +++ b/test/fixedbugs/bug054.go
@@ -23,10 +23,7 @@ } func (s *TStruct) field(i int) *TStruct { - // works if we say - // t := s.fields.At(i); - // return t; - return s.fields.At(i); + return s.fields.At(i).(*TStruct); } func main() {