Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 210 for predeclared (0.31 sec)

  1. src/go/doc/testdata/predeclared.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Package predeclared is a go/doc test for handling of
    // exported methods on locally-defined predeclared types.
    // See issue 9860.
    package predeclared
    
    type error struct{}
    
    // Must not be visible.
    func (e error) Error() string {
    	return ""
    }
    
    type bool int
    
    // Must not be visible.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 06 00:35:30 UTC 2016
    - 489 bytes
    - Viewed (0)
  2. src/go/doc/testdata/predeclared.0.golden

    // Package predeclared is a go/doc test for handling of exported ...
    PACKAGE predeclared
    
    IMPORTPATH
    	testdata/predeclared
    
    FILENAMES
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 06 00:35:30 UTC 2016
    - 159 bytes
    - Viewed (0)
  3. src/go/doc/testdata/predeclared.2.golden

    // Package predeclared is a go/doc test for handling of exported ...
    PACKAGE predeclared
    
    IMPORTPATH
    	testdata/predeclared
    
    FILENAMES
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 06 00:35:30 UTC 2016
    - 159 bytes
    - Viewed (0)
  4. src/go/doc/testdata/predeclared.1.golden

    // Package predeclared is a go/doc test for handling of exported ...
    PACKAGE predeclared
    
    IMPORTPATH
    	testdata/predeclared
    
    FILENAMES
    	testdata/predeclared.go
    
    TYPES
    	// 
    	type bool int
    
    	// Must not be visible. 
    	func (b bool) String() string
    
    	// 
    	type error struct{}
    
    	// Must not be visible. 
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 06 00:35:30 UTC 2016
    - 330 bytes
    - Viewed (0)
  5. src/internal/types/testdata/fixedbugs/issue47818.go

    // for init (and main, but we're not in package main) we should only get one error
    func init[P /* ERROR "func init must have no type parameters" */ any /* ERROR "predeclared any requires go1.18 or later" */]() {
    }
    func main[P /* ERROR "type parameter requires go1.18 or later" */ any /* ERROR "predeclared any requires go1.18 or later" */]() {
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  6. src/internal/types/testdata/fixedbugs/issue46090.go

    // Copyright 2020 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.
    
    // The predeclared type comparable is not visible before Go 1.18.
    
    package p
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 307 bytes
    - Viewed (0)
  7. src/go/doc/testdata/b.1.golden

    	func NotAFactory() int
    
    
    TYPES
    	// 
    	type T struct{}	// T
    
    	// 
    	var V T	// v
    
    	// 
    	func (x *T) M()
    
    	// Should only appear if AllDecls is set. 
    	type comparable struct{}	// overrides a predeclared type comparable
    
    	// Associated with comparable type if AllDecls is set. 
    	func ComparableFactory() comparable
    
    	// 
    	type notExported int
    
    	// 
    	const (
    		C1	notExported	= iota
    		C2
    		c3
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 11 16:05:02 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  8. src/go/doc/testdata/b.go

    // Associated with comparable type if AllDecls is set.
    func ComparableFactory() comparable {}
    
    // Should only appear if AllDecls is set.
    type uint struct{} // overrides a predeclared type uint
    
    // Should only appear if AllDecls is set.
    type comparable struct{} // overrides a predeclared type comparable
    
    // ----------------------------------------------------------------------------
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 11 16:05:02 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  9. src/internal/types/testdata/examples/methods.go

    // Note that using what looks like a predeclared identifier, say int,
    // as type parameter in this situation is deceptive and considered bad
    // style. In m3 below, int is the name of the local receiver type parameter
    // and it shadows the predeclared identifier int which then cannot be used
    // anymore as expected.
    // This is no different from locally re-declaring a predeclared identifier
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 5K bytes
    - Viewed (0)
  10. src/go/doc/reader.go

    func (r *reader) cleanupTypes() {
    	for _, t := range r.types {
    		visible := r.isVisible(t.name)
    		predeclared := predeclaredTypes[t.name]
    
    		if t.decl == nil && (predeclared || visible && (t.isEmbedded || r.hasDotImp)) {
    			// t.name is a predeclared type (and was not redeclared in this package),
    			// or it was embedded somewhere but its declaration is missing (because
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
Back to top