// check != nil
if cause != nil {
// TODO(gri) consider restructuring versionErrorf so we can use it here and below
- *cause = "conversion of slices to arrays requires go1.20 or later"
+ *cause = "conversion of slice to array requires go1.20 or later"
}
return false
}
}
// check != nil
if cause != nil {
- *cause = "conversion of slices to array pointers requires go1.17 or later"
+ *cause = "conversion of slice to array pointer requires go1.17 or later"
}
return false
}
}
// len(s) > 2
if strings.Contains(s, "_") {
- check.versionErrorf(lit, go1_13, "underscores in numeric literals")
+ check.versionErrorf(lit, go1_13, "underscore in numeric literal")
return
}
if s[0] != '0' {
}
radix := s[1]
if radix == 'b' || radix == 'B' {
- check.versionErrorf(lit, go1_13, "binary literals")
+ check.versionErrorf(lit, go1_13, "binary literal")
return
}
if radix == 'o' || radix == 'O' {
- check.versionErrorf(lit, go1_13, "0o/0O-style octal literals")
+ check.versionErrorf(lit, go1_13, "0o/0O-style octal literal")
return
}
if lit.Kind != syntax.IntLit && (radix == 'x' || radix == 'X') {
- check.versionErrorf(lit, go1_13, "hexadecimal floating-point literals")
+ check.versionErrorf(lit, go1_13, "hexadecimal floating-point literal")
}
}
// check != nil
if cause != nil {
// TODO(gri) consider restructuring versionErrorf so we can use it here and below
- *cause = "conversion of slices to arrays requires go1.20 or later"
+ *cause = "conversion of slice to array requires go1.20 or later"
}
return false
}
}
// check != nil
if cause != nil {
- *cause = "conversion of slices to array pointers requires go1.17 or later"
+ *cause = "conversion of slice to array pointer requires go1.17 or later"
}
return false
}
}
// len(s) > 2
if strings.Contains(s, "_") {
- check.versionErrorf(lit, go1_13, "underscores in numeric literals")
+ check.versionErrorf(lit, go1_13, "underscore in numeric literal")
return
}
if s[0] != '0' {
}
radix := s[1]
if radix == 'b' || radix == 'B' {
- check.versionErrorf(lit, go1_13, "binary literals")
+ check.versionErrorf(lit, go1_13, "binary literal")
return
}
if radix == 'o' || radix == 'O' {
- check.versionErrorf(lit, go1_13, "0o/0O-style octal literals")
+ check.versionErrorf(lit, go1_13, "0o/0O-style octal literal")
return
}
if lit.Kind != token.INT && (radix == 'x' || radix == 'X') {
- check.versionErrorf(lit, go1_13, "hexadecimal floating-point literals")
+ check.versionErrorf(lit, go1_13, "hexadecimal floating-point literal")
}
}
// numeric literals
const (
- _ = 1_000 // ERROR "underscores in numeric literals requires go1.13 or later"
- _ = 0b111 // ERROR "binary literals requires go1.13 or later"
- _ = 0o567 // ERROR "0o/0O-style octal literals requires go1.13 or later"
+ _ = 1_000 // ERROR "underscore in numeric literal requires go1.13 or later"
+ _ = 0b111 // ERROR "binary literal requires go1.13 or later"
+ _ = 0o567 // ERROR "0o/0O-style octal literal requires go1.13 or later"
_ = 0xabc // ok
- _ = 0x0p1 // ERROR "hexadecimal floating-point literals requires go1.13 or later"
+ _ = 0x0p1 // ERROR "hexadecimal floating-point literal requires go1.13 or later"
- _ = 0B111 // ERROR "binary"
- _ = 0O567 // ERROR "octal"
- _ = 0Xabc // ok
- _ = 0X0P1 // ERROR "hexadecimal floating-point"
+ _ = 0b111 // ERROR "binary"
+ _ = 0o567 // ERROR "octal"
+ _ = 0xabc // ok
+ _ = 0x0p1 // ERROR "hexadecimal floating-point"
- _ = 1_000i // ERROR "underscores"
+ _ = 1_000i // ERROR "underscore"
_ = 0b111i // ERROR "binary"
_ = 0o567i // ERROR "octal"
_ = 0xabci // ERROR "hexadecimal floating-point"
// numeric literals
const (
- _ = 1_000 // ERROR "underscores in numeric literals requires go1.13 or later \(-lang was set to go1.12; check go.mod\)|requires go1.13"
- _ = 0b111 // ERROR "binary literals requires go1.13 or later"
- _ = 0o567 // ERROR "0o/0O-style octal literals requires go1.13 or later"
+ _ = 1_000 // ERROR "underscore in numeric literal requires go1.13 or later \(-lang was set to go1.12; check go.mod\)|requires go1.13"
+ _ = 0b111 // ERROR "binary literal requires go1.13 or later"
+ _ = 0o567 // ERROR "0o/0O-style octal literal requires go1.13 or later"
_ = 0xabc // ok
- _ = 0x0p1 // ERROR "hexadecimal floating-point literals requires go1.13 or later"
+ _ = 0x0p1 // ERROR "hexadecimal floating-point literal requires go1.13 or later"
- _ = 0B111 // ERROR "binary"
- _ = 0O567 // ERROR "octal"
- _ = 0Xabc // ok
- _ = 0X0P1 // ERROR "hexadecimal floating-point"
+ _ = 0b111 // ERROR "binary"
+ _ = 0o567 // ERROR "octal"
+ _ = 0xabc // ok
+ _ = 0x0p1 // ERROR "hexadecimal floating-point"
- _ = 1_000i // ERROR "underscores"
+ _ = 1_000i // ERROR "underscore"
_ = 0b111i // ERROR "binary"
_ = 0o567i // ERROR "octal"
_ = 0xabci // ERROR "hexadecimal floating-point"