8000 [release-branch.go1.1] cmd/gc: fix missing slice/array types in expor… · golang/go@3e88a82 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3e88a82

Browse files
committed
[release-branch.go1.1] cmd/gc: fix missing slice/array types in export data.
««« CL 9953044 / 0e1b2f7384d2 cmd/gc: fix missing slice/array types in export data. Fixes #5614. R=golang-dev CC=golang-dev https://golang.org/cl/9953044 »»» R=iant, remyoudompheng, dsymonds CC=golang-dev https://golang.org/cl/10033043
1 parent d72c550 commit 3e88a82

File tree

5 files changed

+40
-0
lines changed

5 files changed

+40
-0
lines changed

src/cmd/gc/export.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ reexportdep(Node *n)
164164
case ODOTTYPE:
165165
case ODOTTYPE2:
166166
case OSTRUCTLIT:
167+
case OARRAYLIT:
167168
case OPTRLIT:
168169
case OMAKEMAP:
169170
case OMAKESLICE:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package rethinkgo
2+
3+
type Session struct {
4+
}
5+
6+
func (s *Session) Run(query Exp) *int { return nil }
7+
8+
type List []interface{}
9+
10+
type Exp struct {
11+
args []interface{}
12+
}
13+
14+
func (e Exp) UseOutdated(useOutdated bool) Exp {
15+
return Exp{args: List{e, useOutdated}}
16+
}

test/fixedbugs/issue5614.dir/x.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package x
2+
3+
import "./rethinkgo"
4+
5+
var S *rethinkgo.Session
6+
7+

test/fixedbugs/issue5614.dir/y.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package y
2+
3+
import "./x"
4+
5+
var T = x.S

test/fixedbugs/issue5614.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// compiledir
2+
3+
// Copyright 2013 The Go Authors. All rights reserved.
4+
// Use of this source code is governed by a BSD-style
5+
// license that can be found in the LICENSE file.
6+
7+
// Issue 5614: exported data for inlining may miss
8+
// named types when used in implicit conversion to
9+
// their underlying type.
10+
11+
package ignored

0 commit comments

Comments
 (0)
0