Commit 2f8a2dc1 authored by David Symonds's avatar David Symonds

Extend fixedbugs/bug143.go with function return values,

as a regression test for the fix made in s2/27706.

R=r
APPROVED=r
DELTA=14  (13 added, 0 deleted, 1 changed)
OCL=27707
CL=27709
parent d7240924
...@@ -8,12 +8,17 @@ package main ...@@ -8,12 +8,17 @@ package main
type myMap map[string] int; type myMap map[string] int;
func f() *myMap {
m := make(map[string] int);
return &m
}
func main() { func main() {
m := make(myMap); m := make(myMap);
mp := &m; mp := &m;
{ {
x, ok := m["key"]; x, ok := m["key"]
} }
{ {
x, ok := (*mp)["key"] x, ok := (*mp)["key"]
...@@ -21,6 +26,14 @@ func main() { ...@@ -21,6 +26,14 @@ func main() {
{ {
x, ok := mp["key"] x, ok := mp["key"]
} }
{
x, ok := f()["key"]
}
{
var x int;
var ok bool;
x, ok = f()["key"]
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment