- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 1,182 for redeclared (0.26 sec)
-
src/internal/types/testdata/fixedbugs/issue47818.go
// for init (and main, but we're not in package main) we should only get one error func init[P /* ERROR "func init must have no type parameters" */ any /* ERROR "predeclared any requires go1.18 or later" */]() { } func main[P /* ERROR "type parameter requires go1.18 or later" */ any /* ERROR "predeclared any requires go1.18 or later" */]() { }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 2.4K bytes - Viewed (0) -
src/go/parser/error_test.go
// rx is reported at that source position. // // For instance, the following test file indicates that a "not declared" // error should be reported for the undeclared variable x: // // package p // func f() { // _ = x /* ERROR "not declared" */ + 1 // } package parser import ( "flag" "go/scanner" "go/token" "os" "path/filepath" "regexp" "strings"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 27 19:47:49 UTC 2022 - 5.9K bytes - Viewed (0) -
src/go/types/typexpr.go
} return case universeComparable: if !check.verifyVersionf(e, go1_18, "predeclared %s", e.Name) { return // avoid follow-on errors } } // Because the representation of any depends on gotypesalias, we don't check // pointer identity here. if obj.Name() == "any" && obj.Parent() == Universe { if !check.verifyVersionf(e, go1_18, "predeclared %s", e.Name) { return // avoid follow-on errors } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typexpr.go
} return case universeComparable: if !check.verifyVersionf(e, go1_18, "predeclared %s", e.Value) { return // avoid follow-on errors } } // Because the representation of any depends on gotypesalias, we don't check // pointer identity here. if obj.Name() == "any" && obj.Parent() == Universe { if !check.verifyVersionf(e, go1_18, "predeclared %s", e.Value) { return // avoid follow-on errors } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.6K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/rulegen.go
w.List = append(w.List, node) } // predeclared contains globally known tokens that should not be redefined. var predeclared = map[string]bool{ "nil": true, "false": true, "true": true, } // declared reports if the body contains a Declare with the given name. func (w *BodyBase) declared(name string) bool { if predeclared[name] { // Treat predeclared names as having already been declared.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Sep 02 22:09:21 UTC 2023 - 48.7K bytes - Viewed (0) -
src/go/types/object_test.go
) func TestIsAlias(t *testing.T) { check := func(obj *TypeName, want bool) { if got := obj.IsAlias(); got != want { t.Errorf("%v: got IsAlias = %v; want %v", obj, got, want) } } // predeclared types check(Unsafe.Scope().Lookup("Pointer").(*TypeName), false) for _, name := range Universe.Names() { if obj, _ := Universe.Lookup(name).(*TypeName); obj != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 5.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/object_test.go
) func TestIsAlias(t *testing.T) { check := func(obj *TypeName, want bool) { if got := obj.IsAlias(); got != want { t.Errorf("%v: got IsAlias = %v; want %v", obj, got, want) } } // predeclared types check(Unsafe.Scope().Lookup("Pointer").(*TypeName), false) for _, name := range Universe.Names() { if obj, _ := Universe.Lookup(name).(*TypeName); obj != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 5.2K bytes - Viewed (0) -
src/go/doc/testdata/b.go
// Associated with comparable type if AllDecls is set. func ComparableFactory() comparable {} // Should only appear if AllDecls is set. type uint struct{} // overrides a predeclared type uint // Should only appear if AllDecls is set. type comparable struct{} // overrides a predeclared type comparable // ----------------------------------------------------------------------------
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 11 16:05:02 UTC 2022 - 1.5K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue46090.go
// Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // The predeclared type comparable is not visible before Go 1.18. package p
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:25 UTC 2023 - 307 bytes - Viewed (0) -
test/fixedbugs/issue28268.go
package p type T struct { a, b, c int E } type E struct{} func (T) b() {} // ERROR "field and method named b|redeclares struct field name|field and method with the same name b" func (*T) E() {} // ERROR "field and method named E|redeclares struct field name|field and method with the same name E" func _() { var x T _ = x.a _ = x.b // no follow-on error here
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 764 bytes - Viewed (0)