blob: 34578565afa04c55b40dd36c591249eb1f9f8a41 [file] [log] [blame]
Rémy Oudompheng2ece2f52012-02-18 22:15:42 +01001// run
Luuk van Dijk11075ed2011-11-03 17:51:15 +01002
3// Copyright 2011 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7// Issue 2355
8package main
9
10type T struct {}
11func (T) m() string { return "T" }
12
13type TT struct {
14 T
15 m func() string
16}
17
18
19func ff() string { return "ff" }
20
21func main() {
22 var tt TT
23 tt.m = ff
24
25 if tt.m() != "ff" {
26 println(tt.m(), "!= \"ff\"")
27 }
28}