Commit 57af5429 authored by Robert Griesemer's avatar Robert Griesemer

go/doc: test case for corner case (override of predecl. type)

R=rsc
CC=golang-dev
https://golang.org/cl/5575055
parent 6d68be46
......@@ -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()
......@@ -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
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment