- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for FakeImportC (0.3 sec)
-
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) -
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) -
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) -
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) -
src/cmd/compile/internal/types2/api.go
// result in an error. GoVersion string // If IgnoreFuncBodies is set, function bodies are not // type-checked. IgnoreFuncBodies bool // If FakeImportC is set, `import "C"` (for packages requiring Cgo) // declares an empty "C" package and errors are omitted for qualified // identifiers referring to package C (which won't find an object).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 13:48:53 UTC 2024 - 17.4K bytes - Viewed (0) -
src/go/types/api.go
// Do not use casually! FakeImportC bool // If go115UsesCgo is set, the type checker expects the // _cgo_gotypes.go file generated by running cmd/cgo to be // provided as a package source file. Qualified identifiers // referring to package C will be resolved to cgo-provided // declarations within _cgo_gotypes.go. // // It is an error to set both FakeImportC and go115UsesCgo. go115UsesCgo bool
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 17.2K bytes - Viewed (0) -
src/go/types/check_test.go
var goexperiment, gotypesalias string flags := flag.NewFlagSet("", flag.PanicOnError) flags.StringVar(&conf.GoVersion, "lang", "", "") flags.StringVar(&goexperiment, "goexperiment", "", "") flags.BoolVar(&conf.FakeImportC, "fakeImportC", false, "") flags.StringVar(&gotypesalias, "gotypesalias", "", "") if err := parseFlags(srcs[0], flags); err != nil { t.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 19:45:33 UTC 2024 - 14.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/check_test.go
var goexperiment, gotypesalias string flags := flag.NewFlagSet("", flag.PanicOnError) flags.StringVar(&conf.GoVersion, "lang", "", "") flags.StringVar(&goexperiment, "goexperiment", "", "") flags.BoolVar(&conf.FakeImportC, "fakeImportC", false, "") flags.StringVar(&gotypesalias, "gotypesalias", "", "") if err := parseFlags(srcs[0], flags); err != nil { t.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 19:45:33 UTC 2024 - 13.8K bytes - Viewed (0) -
src/cmd/compile/internal/types2/resolver.go
imp := check.impMap[key] if imp != nil { return imp } // no package yet => import it if path == "C" && (check.conf.FakeImportC || check.conf.go115UsesCgo) { if check.conf.FakeImportC && check.conf.go115UsesCgo { check.error(pos, BadImportPath, "cannot use FakeImportC and go115UsesCgo together") } imp = NewPackage("C", "C") imp.fake = true // package scope is not populated
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 26.3K bytes - Viewed (0) -
src/go/types/resolver.go
imp := check.impMap[key] if imp != nil { return imp } // no package yet => import it if path == "C" && (check.conf.FakeImportC || check.conf.go115UsesCgo) { if check.conf.FakeImportC && check.conf.go115UsesCgo { check.error(at, BadImportPath, "cannot use FakeImportC and go115UsesCgo together") } imp = NewPackage("C", "C") imp.fake = true // package scope is not populated
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 16:22:59 UTC 2024 - 26.1K bytes - Viewed (0)