- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 1,182 for redeclared (0.17 sec)
-
src/internal/types/testdata/examples/types.go
( /* ERROR "cannot parenthesize" */ int8) ( /* ERROR "cannot parenthesize" */ *int16) *( /* ERROR "cannot parenthesize" */ int32) List[int] int8 /* ERROR "int8 redeclared" */ *int16 /* ERROR "int16 redeclared" */ List /* ERROR "List redeclared" */ [int] } // Issue #45639: We don't allow this anymore. Keep this code // in case we decide to revisit this decision. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 24 23:16:04 UTC 2023 - 8.4K bytes - Viewed (0) -
test/alias2.go
A4 = Value A5 = Value N0 A0 ) // Methods can be declared on the original named type and the alias. func (T0) m1() {} // GCCGO_ERROR "previous" func (*T0) m1() {} // ERROR "method redeclared: T0\.m1|T0\.m1 already declared|redefinition of .m1." func (A0) m1() {} // ERROR "T0\.m1 already declared|redefinition of .m1." func (A0) m1() {} // ERROR "T0\.m1 already declared|redefinition of .m1." func (A0) m2() {}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 15:09:14 UTC 2024 - 2.5K bytes - Viewed (0) -
src/cmd/internal/obj/plist.go
if s == nil { // func _() { } return } if s.Func() != nil { ctxt.Diag("%s: symbol %s redeclared\n\t%s: other declaration of symbol %s", ctxt.PosTable.Pos(start), s.Name, ctxt.PosTable.Pos(s.Func().Text.Pos), s.Name) return } s.NewFuncInfo() if s.OnList() { ctxt.Diag("%s: symbol %s redeclared", ctxt.PosTable.Pos(start), s.Name) return } if strings.HasPrefix(s.Name, `"".`) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:52:41 UTC 2023 - 11.5K bytes - Viewed (0) -
src/go/ast/resolve.go
// accordingly. If a non-nil importer and universe scope are provided, they are // used to resolve identifiers not declared in any of the package files. Any // remaining unresolved identifiers are reported as undeclared. If the files // belong to different packages, one package name is selected and files with // different package names are reported and then ignored.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 5.4K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue39634.go
// or artificial test cases. package p // crash 1 type nt1[_ any]interface{g /* ERROR "undefined" */ } type ph1[e nt1[e],g(d /* ERROR "undefined" */ )]s /* ERROR "undefined" */ func(*ph1[e,e /* ERROR "redeclared" */ ])h(d /* ERROR "undefined" */ ) // crash 2 // Disabled: empty []'s are now syntax errors. This example leads to too many follow-on errors. // type Numeric2 interface{t2 /* ERROR "not a type" */ }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 05 18:13:11 UTC 2024 - 3.4K bytes - Viewed (0) -
src/cmd/gofmt/simplify.go
// a slice expression of the form: s[a:len(s)] // can be simplified to: s[a:] // if s is "simple enough" (for now we only accept identifiers) // // Note: This may not be correct because len may have been redeclared in // the same package. However, this is extremely unlikely and so far // (April 2022, after years of supporting this rewrite feature) // has never come up, so let's keep it working as is (see also #15153).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 19 20:06:14 UTC 2022 - 4.8K bytes - Viewed (0) -
src/cmd/compile/internal/types2/struct.go
} func (check *Checker) declareInSet(oset *objset, pos syntax.Pos, obj Object) bool { if alt := oset.insert(obj); alt != nil { err := check.newError(DuplicateDecl) err.addf(pos, "%s redeclared", obj.Name()) err.addAltDecl(alt) err.report() return false } return true } func (check *Checker) tag(t *syntax.BasicLit) string { // If t.Bad, an error was reported during parsing.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 6.6K bytes - Viewed (0) -
src/go/types/assignments.go
} seen[name] = true } // Use the correct obj if the ident is redeclared. The // variable's scope starts after the declaration; so we // must use Scope.Lookup here and call Scope.Insert // (via check.declare) later. if alt := scope.Lookup(name); alt != nil { check.recordUse(ident, alt) // redeclared object must be a variable if obj, _ := alt.(*Var); obj != nil { lhsVars[i] = obj
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 16.4K bytes - Viewed (0) -
src/internal/types/testdata/check/stmt0.go
for _ := /* ERROR "no new variables" */ range "" {} for a, a /* ERROR "redeclared" */ := range "" { _ = a } var a int _ = a for a, a /* ERROR "redeclared" */ := range []int{1, 2, 3} { _ = a } } // Test that despite errors in the range clause, // the loop body is still type-checked (and thus // errors reported). func issue10148() { for y /* ERROR "declared and not used" */ := range "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 19K bytes - Viewed (0) -
src/go/types/struct.go
} func (check *Checker) declareInSet(oset *objset, pos token.Pos, obj Object) bool { if alt := oset.insert(obj); alt != nil { err := check.newError(DuplicateDecl) err.addf(atPos(pos), "%s redeclared", obj.Name()) err.addAltDecl(alt) err.report() return false } return true } func (check *Checker) tag(t *ast.BasicLit) string { if t != nil { if t.Kind == token.STRING {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 6.1K bytes - Viewed (0)