[gccgo] A type assertion with nil does not succeed
Ian Lance Taylor
iant@google.com
Wed Jun 30 23:29:00 GMT 2010
When doing a type assertion such as
if v, ok := x.(t); ok { }
where x is nil, the type assertion is not considered to succeed. This
is true even though v := x.(t) does not cause a panic. This patch
implements that for gccgo. Committed to gccgo branch.
Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 340 bytes
Desc: assertion
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100630/47b04624/attachment.bin>
More information about the Gcc-patches
mailing list