Nassty / x-go-binding

Automatically exported from code.google.com/p/x-go-binding
Other
0 stars 0 forks source link

Build failure on slice =! #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. clone latest go trunk
2. clone latest x-go-binding trunk
3. try to build

What is the expected output? What do you see instead?
/home/user/bin/8g -o _go_.8 auth.go xgb.go xproto.go 
xgb.go:382: first argument to copy should be slice; have *[20]uint8
make: *** [_go_.8] Error 1

What version of the product are you using? On what operating system?
linux (ubuntu) i386
trunk of both (as of 9:15 AM EST Jun 9, 2010)

Please provide any additional information below.
didn't happen yesterday, so something in the last set of revisions borkd it

Original issue reported on code.google.com by alexjray.ncsu@gmail.com on 9 Jun 2010 at 1:25

GoogleCodeExporter commented 8 years ago
I have the same problem after I installed the latest version of go. And I 
suspect type conversion problems.

The release notes (http://golang.org/doc/devel/release.html) of the 2010-06-09 
release say:

The type checking rules around assignments and conversions are simpler but more
restrictive: assignments no longer convert implicitly from *[10]int to []int
(write x[0:] instead of &x), and conversions can no longer change the names of
types inside composite types.

It would be great if someone could have a look and fix that problem.

Original comment by frank.sc...@gmx.de on 10 Jun 2010 at 12:14

GoogleCodeExporter commented 8 years ago
I am having the same problem.  I changedline # 382 from

copy(&v.Data8, b)

to this

copy(v.Data8[0:], b)

per the specification and now it compiles.

Original comment by demer...@gmail.com on 20 Sep 2010 at 12:17