Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 45 for pkgName (0.55 sec)

  1. src/go/types/eval_test.go

    func TestIssue65898(t *testing.T) {
    	const src = `
    package p
    func _[A any](A) {}
    `
    
    	fset := token.NewFileSet()
    	f := mustParse(fset, src)
    
    	var conf types.Config
    	pkg, err := conf.Check(pkgName(src), fset, []*ast.File{f}, nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	for _, d := range f.Decls {
    		if fun, _ := d.(*ast.FuncDecl); fun != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 19:56:15 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. src/cmd/cover/cover.go

    	f.fn.counterVar = ""
    }
    
    func annotate(names []string) {
    	var p *Package
    	if *pkgcfg != "" {
    		pp := pkgconfig.PkgPath
    		pn := pkgconfig.PkgName
    		mp := pkgconfig.ModulePath
    		mdb, err := encodemeta.NewCoverageMetaDataBuilder(pp, pn, mp)
    		if err != nil {
    			log.Fatalf("creating coverage meta-data builder: %v\n", err)
    		}
    		p = &Package{
    			mdb: mdb,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  3. src/go/internal/gcimporter/gcimporter_test.go

    			// that was type-checked directly.
    			compile(t, rootDir, entry.Name(), filepath.Join(tmpdir, "testdata"), nil, filename)
    			pkgName := strings.TrimSuffix(entry.Name(), ".go")
    			imported := importPkg(t, "./testdata/"+pkgName, tmpdir)
    			checked := checkFile(t, filename, src)
    
    			seen := make(map[string]bool)
    			for _, name := range imported.Scope().Names() {
    				if !token.IsExported(name) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:22:59 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  4. src/go/types/check.go

    	versions      map[*ast.File]string      // maps files to version strings (each file has an entry); shared with Info.FileVersions if present
    	imports       []*PkgName                // list of imported packages
    	dotImportMap  map[dotImportKey]*PkgName // maps dot-imported objects to the package they were dot-imported through
    	recvTParamMap map[*ast.Ident]*TypeParam // maps blank receiver type parameters to their type
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go

    			// have a path.
    			return "", fmt.Errorf("no path for %v", obj)
    		}
    	case *types.Const, // Only package-level constants have a path.
    		*types.Label,   // Labels are function-local.
    		*types.PkgName: // PkgNames are file-local.
    		return "", fmt.Errorf("no path for %v", obj)
    
    	case *types.Var:
    		// Could be:
    		// - a field (obj.IsField())
    		// - a func parameter or result
    		// - a local var.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stdlib_test.go

    		if err != nil {
    			return nil, errors.Join(errs...)
    		}
    
    		files = append(files, file)
    	}
    
    	if testing.Verbose() {
    		printPackageMu.Lock()
    		fmt.Println("package", files[0].PkgName.Value)
    		for _, filename := range filenames {
    			fmt.Println("\t", filename)
    		}
    		printPackageMu.Unlock()
    	}
    
    	// Typecheck package files.
    	var errs []error
    	conf := Config{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:18:33 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. src/cmd/dist/build.go

    	// Hand the Go files to the compiler en masse.
    	// For packages containing assembly, this writes go_asm.h, which
    	// the assembly files will need.
    	pkgName := pkg
    	if strings.HasPrefix(pkg, "cmd/") && strings.Count(pkg, "/") == 1 {
    		pkgName = "main"
    	}
    	b := pathf("%s/_go_.a", workdir)
    	clean = append(clean, b)
    	if !ispackcmd {
    		link = append(link, b)
    	} else {
    		archive = b
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
  8. src/go/types/api_test.go

    	pkg, err := typecheck(src, conf, info)
    	if err != nil {
    		panic(err) // so we don't need to pass *testing.T
    	}
    	return pkg
    }
    
    // pkgName extracts the package name from src, which must contain a package header.
    func pkgName(src string) string {
    	const kw = "package "
    	if i := strings.Index(src, kw); i >= 0 {
    		after := src[i+len(kw):]
    		n := len(after)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 94.2K bytes
    - Viewed (0)
  9. src/cmd/go/internal/test/test.go

    		// go.codereview/patch tests.
    		// For package names containing those words, use test.test.exe
    		// instead of pkgname.test.exe.
    		// Note that this file name is only used in the Go command's
    		// temporary directory. If the -c or other flags are
    		// given, the code below will still use pkgname.test.exe.
    		// There are two user-visible effects of this change.
    		// First, you can actually run 'go test' in directories that
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 71.9K bytes
    - Viewed (0)
  10. src/go/types/issues_test.go

    func A(func(any), ...any) {}
    func B[T any](T)          {}
    
    func _() {
    	A(B, nil // syntax error: missing ',' before newline in argument list
    }
    `
    	fset := token.NewFileSet()
    	f, err := parser.ParseFile(fset, pkgName(src), src, 0)
    	if err == nil {
    		t.Fatal("expected syntax error")
    	}
    
    	var conf Config
    	conf.Check(f.Name.Name, fset, []*ast.File{f}, nil) // must not panic
    }
    
    func TestIssue61938(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
Back to top