aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-12-12 23:29:10 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-12-12 23:29:10 +0000
commit35f33e3802becf1e1d9c5014c0ac8bafe0bdbc77 (patch)
treea3ebb151582706d18204c86ddf5b9e4fe73ed6c5 /gcc
parent8318d4ce56634f309a5d47da92ba4fccb72fec15 (diff)
downloadgcc-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.go5
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