Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1177)

Unified Diff: test/interface/fake.go

Issue 5286051: code review 5286051: [release-branch.r60] reflect: disallow Interface method... (Closed)
Patch Set: diff -r 32a5db196298 https://go.googlecode.com/hg/ Created 12 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/reflect/value.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/interface/fake.go
===================================================================
--- a/test/interface/fake.go
+++ b/test/interface/fake.go
@@ -12,20 +12,20 @@
import "reflect"
type T struct {
- f float32
- g float32
+ F float32
+ G float32
- s string
- t string
+ S string
+ T string
- u uint32
- v uint32
+ U uint32
+ V uint32
- w uint32
- x uint32
+ W uint32
+ X uint32
- y uint32
- z uint32
+ Y uint32
+ Z uint32
}
func add(s, t string) string {
@@ -40,16 +40,16 @@
func main() {
var x T
- x.f = 1.0
- x.g = x.f
- x.s = add("abc", "def")
- x.t = add("abc", "def")
- x.u = 1
- x.v = 2
- x.w = 1 << 28
- x.x = 2 << 28
- x.y = 0x12345678
- x.z = x.y
+ x.F = 1.0
+ x.G = x.F
+ x.S = add("abc", "def")
+ x.T = add("abc", "def")
+ x.U = 1
+ x.V = 2
+ x.W = 1 << 28
+ x.X = 2 << 28
+ x.Y = 0x12345678
+ x.Z = x.Y
// check mem and string
v := reflect.ValueOf(x)
« no previous file with comments | « src/pkg/reflect/value.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b