Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
b.0.golden
src/pkg/go/doc/testdata/b.0.golden
+9
-0
b.1.golden
src/pkg/go/doc/testdata/b.1.golden
+15
-0
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
...
@@ -24,6 +24,12 @@ FUNCTIONS
//
//
func F(x int) int
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
TYPES
//
//
...
@@ -32,3 +38,6 @@ TYPES
...
@@ -32,3 +38,6 @@ TYPES
//
//
var V T // v
var V T // v
//
func (x *T) M()
src/pkg/go/doc/testdata/b.1.golden
View file @
57af5429
...
@@ -24,6 +24,9 @@ FUNCTIONS
...
@@ -24,6 +24,9 @@ FUNCTIONS
//
//
func F(x int) int
func F(x int) int
// Always under the package functions list.
func NotAFactory() int
TYPES
TYPES
//
//
...
@@ -32,3 +35,15 @@ TYPES
...
@@ -32,3 +35,15 @@ TYPES
//
//
var V T // v
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
...
@@ -6,8 +6,25 @@ package b
import
"a"
import
"a"
// Basic declarations
const
Pi
=
3.14
// Pi
const
Pi
=
3.14
// Pi
var
MaxInt
int
// MaxInt
var
MaxInt
int
// MaxInt
type
T
struct
{}
// T
type
T
struct
{}
// T
var
V
T
// v
var
V
T
// v
func
F
(
x
int
)
int
{}
// F
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