--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e295dd1c-2abd-4709-a6c4-1252ef635b5en%40googlegroups.com.
if int64(uint32(dataOff)) != dataOff {
log.Fatalf("data too large")
}
For those watching at home, the error message is
compile: data too large
The spec says that " The length is part of the array's type; it must evaluate to a non-negative constant representable by a value of type int. ", so on a 64-bit environment, I assume that the maximum array length should be math.MaxInt64, am I right ? But the following code doesn't compile:package mainvar x = [1<<34]byte{1<<23: 23, 1<<24: 24, 1<<33:33
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/df18462d-4ec1-4287-ad71-ef4aa0d85a5dn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAHbs%3DNbmgsUet1GW4AbbBeOQ9xeUZd92ybb28L-m1O8-Ze3CtQ%40mail.gmail.com.
You might want to check out the order of messages as seen by google groups: https://groups.google.com/g/golang-nuts/c/mw5f2kyEjpAEither your Message was delivered to groups delayed, or Kurtis message was delivered delayed to you.
> That appears to be the primary limit. That including a composite literal initializer that exceeds that limit, causing a more ambiguous error, > seems like a related, but secondary, issue.Yes, this seems to be a related question, see https://github.com/golang/go/issues/9862. If we do not allow static data larger than 2G, then the description of the array in the spec may need to be slightly modified?
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/624b7b28-b750-40a0-9407-d3fe16d1f956n%40googlegroups.com.