-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cue: get go generates invalid CUE from byte type #1336
Comments
In Go, but not in CUE, a Using The only documentation I see about
However, there is a note here which mentions why there is no
|
Thanks for the report, @james-maloney. Confirmed with e8550b8:
gives:
|
Much like the last change to teach it about uintptr, do the same about byte, an alias for uint8 in Go. Note that the get_go code already had special cases to handle byte slices and arrays, but byte arrays had no test coverage here, so we add a test case for them as well. Fixes #1336. Change-Id: I040b12da56077cee60e699aa31d1ebcd78e6bc28 Signed-off-by: Daniel Martí <[email protected]>
Much like the last change to teach it about uintptr, do the same about byte, an alias for uint8 in Go. Note that the get_go code already had special cases to handle byte slices and arrays, but byte arrays had no test coverage here, so we add a test case for them as well. Fixes cue-lang#1336. Change-Id: I040b12da56077cee60e699aa31d1ebcd78e6bc28 Signed-off-by: Daniel Martí <[email protected]> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/536752 Unity-Result: CUEcueckoo <[email protected]> Reviewed-by: Roger Peppe <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
Generate Cue from Go package
Output:
Vet
What did you expect to see?
A valid cue file generated from the Go package
What did you see instead?
An invalid cue file using an un-known
byte
typeThe text was updated successfully, but these errors were encountered: