diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-12-12 23:29:10 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-12-12 23:29:10 +0000 |
commit | 35f33e3802becf1e1d9c5014c0ac8bafe0bdbc77 (patch) | |
tree | a3ebb151582706d18204c86ddf5b9e4fe73ed6c5 /gcc | |
parent | 8318d4ce56634f309a5d47da92ba4fccb72fec15 (diff) | |
download | gcc-35f33e3802becf1e1d9c5014c0ac8bafe0bdbc77.zip gcc-35f33e3802becf1e1d9c5014c0ac8bafe0bdbc77.tar.gz gcc-35f33e3802becf1e1d9c5014c0ac8bafe0bdbc77.tar.bz2 |
runtime: Delete from a nil map is now a no-op.
From-SVN: r194462
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/go.test/test/nil.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/testsuite/go.test/test/nil.go b/gcc/testsuite/go.test/test/nil.go index 9f7bcbb..aa558fa 100644 --- a/gcc/testsuite/go.test/test/nil.go +++ b/gcc/testsuite/go.test/test/nil.go @@ -151,9 +151,8 @@ func maptest() { shouldPanic(func() { m[2] = 3 }) - shouldPanic(func() { - delete(m, 2) - }) + // can delete (non-existent) entries + delete(m, 2) } // nil slice |