- Sort Score
- Result 10 results
- Languages All
Results 11 - 18 of 18 for allowsVersion (0.35 sec)
-
src/cmd/compile/internal/types2/instantiate.go
if constraint && comparable(V, true /* spec comparability */, nil, nil) { // V is comparable if we are at Go 1.20 or higher. if check == nil || check.allowVersion(atPos(pos), go1_20) { // atPos needed so that go/types generate passes return true } if cause != nil { *cause = check.sprintf("%s to %s comparable requires go1.20 or later", V, verb) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.7K bytes - Viewed (0) -
src/go/types/instantiate.go
if constraint && comparable(V, true /* spec comparability */, nil, nil) { // V is comparable if we are at Go 1.20 or higher. if check == nil || check.allowVersion(atPos(pos), go1_20) { // atPos needed so that go/types generate passes return true } if cause != nil { *cause = check.sprintf("%s to %s comparable requires go1.20 or later", V, verb) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.8K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typeset.go
// error here as well (even though we could do it eagerly) because it's the same // error message. if check != nil { check.later(func() { if pos.IsKnown() && !check.allowVersion(atPos(pos), go1_14) || !Identical(m.typ, other.Type()) { err := check.newError(DuplicateDecl) err.addf(atPos(pos), "duplicate method %s", m.name)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 13.6K bytes - Viewed (0) -
src/go/types/typeset.go
// error here as well (even though we could do it eagerly) because it's the same // error message. if check != nil { check.later(func() { if pos.IsValid() && !check.allowVersion(atPos(pos), go1_14) || !Identical(m.typ, other.Type()) { err := check.newError(DuplicateDecl) err.addf(atPos(pos), "duplicate method %s", m.name)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 13.7K bytes - Viewed (0) -
src/go/types/infer.go
// and collect the indices of generic parameters with untyped arguments. // Terminology: generic parameter = function parameter with a type-parameterized type u := newUnifier(tparams, targs, check.allowVersion(posn, go1_21)) errorf := func(tpar, targ Type, arg *operand) { // provide a better error message if we can targs := u.inferred(tparams) if targs[0] == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 13:54:20 UTC 2024 - 26.5K bytes - Viewed (0) -
src/cmd/compile/internal/types2/infer.go
// and collect the indices of generic parameters with untyped arguments. // Terminology: generic parameter = function parameter with a type-parameterized type u := newUnifier(tparams, targs, check.allowVersion(pos, go1_21)) errorf := func(tpar, targ Type, arg *operand) { // provide a better error message if we can targs := u.inferred(tparams) if targs[0] == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 13:54:20 UTC 2024 - 26.4K bytes - Viewed (0) -
src/go/types/expr.go
// literal is not compatible with the current language version. func (check *Checker) langCompat(lit *ast.BasicLit) { s := lit.Value if len(s) <= 2 || check.allowVersion(lit, go1_13) { return } // len(s) > 2 if strings.Contains(s, "_") { check.versionErrorf(lit, go1_13, "underscore in numeric literal") return } if s[0] != '0' { return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 49.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/expr.go
// literal is not compatible with the current language version. func (check *Checker) langCompat(lit *syntax.BasicLit) { s := lit.Value if len(s) <= 2 || check.allowVersion(lit, go1_13) { return } // len(s) > 2 if strings.Contains(s, "_") { check.versionErrorf(lit, go1_13, "underscore in numeric literal") return } if s[0] != '0' { return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 51.7K bytes - Viewed (0)