commit | 86145611b0ad8c6ef6923f65f8a4fd39f07f69d7 | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Mon Mar 23 18:32:37 2009 -0700 |
committer | Russ Cox <rsc@golang.org> | Mon Mar 23 18:32:37 2009 -0700 |
tree | 0082f9d1b1e6adb4db63f2430cd84f8f82cd4ff6 | |
parent | 8d44052b6dd9e27a5230f66239681cec601d3a8e [diff] [blame] |
allow range on nil maps R=ken OCL=26663 CL=26663
diff --git a/test/map.go b/test/map.go index 085502b..95da48c 100644 --- a/test/map.go +++ b/test/map.go
@@ -487,4 +487,10 @@ fmt.Printf("update mipM[%d][%d] = %i\n", i, i, mipM[i][i]); } } + + // test range on nil map + var mnil map[string] int; + for x, y := range mnil { + panic("range mnil"); + } }