Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
57af5429
Commit
57af5429
authored
Jan 25, 2012
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/doc: test case for corner case (override of predecl. type)
R=rsc CC=golang-dev
https://golang.org/cl/5575055
parent
6d68be46
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
src/pkg/go/doc/testdata/b.0.golden
src/pkg/go/doc/testdata/b.0.golden
+9
-0
src/pkg/go/doc/testdata/b.1.golden
src/pkg/go/doc/testdata/b.1.golden
+15
-0
src/pkg/go/doc/testdata/b.go
src/pkg/go/doc/testdata/b.go
+17
-0
No files found.
src/pkg/go/doc/testdata/b.0.golden
View file @
57af5429
...
...
@@ -24,6 +24,12 @@ FUNCTIONS
//
func F(x int) int
// Always under the package functions list.
func NotAFactory() int
// Associated with uint type if AllDecls is set.
func UintFactory() uint
TYPES
//
...
...
@@ -32,3 +38,6 @@ TYPES
//
var V T // v
//
func (x *T) M()
src/pkg/go/doc/testdata/b.1.golden
View file @
57af5429
...
...
@@ -24,6 +24,9 @@ FUNCTIONS
//
func F(x int) int
// Always under the package functions list.
func NotAFactory() int
TYPES
//
...
...
@@ -32,3 +35,15 @@ TYPES
//
var V T // v
//
func (x *T) M()
// Should only appear if AllDecls is set.
type uint struct{}
// Associated with uint type if AllDecls is set.
func UintFactory() uint
// Associated with uint type if AllDecls is set.
func uintFactory() uint
src/pkg/go/doc/testdata/b.go
View file @
57af5429
...
...
@@ -6,8 +6,25 @@ package b
import
"a"
// Basic declarations
const
Pi
=
3.14
// Pi
var
MaxInt
int
// MaxInt
type
T
struct
{}
// T
var
V
T
// v
func
F
(
x
int
)
int
{}
// F
func
(
x
*
T
)
M
()
{}
// M
// Corner cases: association with (presumed) predeclared types
// Always under the package functions list.
func
NotAFactory
()
int
{}
// Associated with uint type if AllDecls is set.
func
UintFactory
()
uint
{}
// Associated with uint type if AllDecls is set.
func
uintFactory
()
uint
{}
// Should only appear if AllDecls is set.
type
uint
struct
{}
// overrides a predeclared type uint
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment