- Sort Score
- Result 10 results
- Languages All
Results 11 - 14 of 14 for mustTypecheck (0.71 sec)
-
src/go/types/object_test.go
// the same Func Object as the original method. See also go.dev/issue/34421. func TestEmbeddedMethod(t *testing.T) { const src = `package p; type I interface { error }` pkg := mustTypecheck(src, nil, nil) // get original error.Error method eface := Universe.Lookup("error") orig, _, _ := LookupFieldOrMethod(eface.Type(), false, nil, "Error") if orig == 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
// the same Func Object as the original method. See also go.dev/issue/34421. func TestEmbeddedMethod(t *testing.T) { const src = `package p; type I interface { error }` pkg := mustTypecheck(src, nil, nil) // get original error.Error method eface := Universe.Lookup("error") orig, _, _ := LookupFieldOrMethod(eface.Type(), false, nil, "Error") if orig == 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/example_test.go
info := types2.Info{ Types: make(map[syntax.Expr]types2.TypeAndValue), Defs: make(map[*syntax.Name]types2.Object), Uses: make(map[*syntax.Name]types2.Object), } pkg := mustTypecheck(input, nil, &info) // Print package-level variables in initialization order. fmt.Printf("InitOrder: %v\n\n", info.InitOrder) // For each named object, print the line and
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 28 17:58:07 UTC 2023 - 7.1K bytes - Viewed (0) -
src/go/types/methodset_test.go
// go.dev/issue/45639: We also don't allow this anymore. // "type C interface{ f() }; func g[T C]() { type Y T; var a Y; _ = a }": {}, } check := func(src string, methods []method, generic bool) { pkg := mustTypecheck("package p;"+src, nil, nil) scope := pkg.Scope() if generic { fn := pkg.Scope().Lookup("g").(*Func) scope = fn.Scope() } obj := scope.Lookup("a") if obj == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 08 15:27:57 UTC 2023 - 6.7K bytes - Viewed (0)