...

Source file src/cmd/compile/internal/ssa/testdata/b53456.go

Documentation: cmd/compile/internal/ssa/testdata

     1  package main
     2  
     3  type T struct {
     4  	m map[int]int
     5  }
     6  
     7  func main() {
     8  	t := T{
     9  		m: make(map[int]int),
    10  	}
    11  	t.Inc(5)
    12  	t.Inc(7)
    13  }
    14  
    15  func (s *T) Inc(key int) {
    16  	v := s.m[key] // break, line 16
    17  	v++
    18  	s.m[key] = v // also here
    19  }
    20  

View as plain text