Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for fakeImportC (0.18 sec)

  1. src/internal/types/testdata/check/importC.go

    // -fakeImportC
    
    // Copyright 2015 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.
    
    package importC
    
    import "C"
    import _ /* ERROR `cannot rename import "C"` */ "C"
    import foo /* ERROR `cannot rename import "C"` */ "C"
    import . /* ERROR `cannot rename import "C"` */ "C"
    
    // Test cases extracted from issue #22090.
    
    import "unsafe"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/package.go

    // provide package-level objects referenced by pkg. This may be more or
    // less than the set of packages directly imported by pkg's source code.
    //
    // If pkg uses cgo and the FakeImportC configuration option
    // was enabled, the imports list may contain a fake "C" package.
    func (pkg *Package) Imports() []*Package { return pkg.imports }
    
    // SetImports sets the list of explicitly imported packages to list.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 06 13:09:19 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  3. src/internal/types/errors/codes_test.go

    	if !strings.HasPrefix(example, "package") {
    		example = "package p\n\n" + example
    	}
    	file, err := parser.ParseFile(fset, "example.go", example, 0)
    	if err != nil {
    		t.Fatal(err)
    	}
    	conf := Config{
    		FakeImportC: true,
    		Importer:    importer.Default(),
    	}
    	_, err = conf.Check("example", fset, []*ast.File{file}, nil)
    	return err
    }
    
    func TestErrorCodeStyle(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 18 20:41:45 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  4. src/go/types/package.go

    // provide package-level objects referenced by pkg. This may be more or
    // less than the set of packages directly imported by pkg's source code.
    //
    // If pkg uses cgo and the FakeImportC configuration option
    // was enabled, the imports list may contain a fake "C" package.
    func (pkg *Package) Imports() []*Package { return pkg.imports }
    
    // SetImports sets the list of explicitly imported packages to list.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 3K bytes
    - Viewed (0)
  5. src/go/types/gotype.go

    	return parseFiles("", args)
    }
    
    func checkPkgFiles(files []*ast.File) {
    	type bailout struct{}
    
    	// if checkPkgFiles is called multiple times, set up conf only once
    	conf := types.Config{
    		FakeImportC: true,
    		Error: func(err error) {
    			if !*allErrors && errorCount >= 10 {
    				panic(bailout{})
    			}
    			report(err)
    		},
    		Importer: importer.ForCompiler(fset, *compiler, nil),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 8.3K bytes
    - Viewed (0)
  6. src/go/internal/srcimporter/srcimporter.go

    			}
    		},
    		Importer: p,
    		Sizes:    p.sizes,
    	}
    	if len(bp.CgoFiles) > 0 {
    		if p.ctxt.OpenFile != nil {
    			// cgo, gcc, pkg-config, etc. do not support
    			// build.Context's VFS.
    			conf.FakeImportC = true
    		} else {
    			setUsesCgo(&conf)
    			file, err := p.cgo(bp)
    			if err != nil {
    				return nil, fmt.Errorf("error processing cgo for package %q: %w", bp.ImportPath, err)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 23 18:54:32 UTC 2022
    - 8.2K bytes
    - Viewed (0)
Back to top