diff options
author | Russ Cox <rsc@golang.org> | 2009-01-20 14:40:40 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-01-20 14:40:40 -0800 |
commit | 4ae0ed29a283c16d1c83ef704c4d75170c3801e6 (patch) | |
tree | f8305b165ee5ff41e9ef2b0f76e26f7ab3ece269 /test | |
parent | 3986ef877ccd4db750b5050e318dff78f7e55d19 (diff) | |
download | golang-4ae0ed29a283c16d1c83ef704c4d75170c3801e6.tar.gz |
delete export
TBR=r
OCL=23121
CL=23127
Diffstat (limited to 'test')
77 files changed, 254 insertions, 254 deletions
diff --git a/test/235.go b/test/235.go index b0381f35b..e24106dd0 100644 --- a/test/235.go +++ b/test/235.go @@ -6,9 +6,9 @@ package main -export type T chan uint64; +type T chan uint64; -export func M(f uint64) (in, out T) { +func M(f uint64) (in, out T) { in = make(T, 100); out = make(T, 100); go func(in, out T, f uint64) { diff --git a/test/bigalg.go b/test/bigalg.go index a77a9ec8d..434eecf5d 100644 --- a/test/bigalg.go +++ b/test/bigalg.go @@ -11,7 +11,7 @@ import ( "fmt"; ) -export type T struct { +type T struct { a float64; b int64; c string; @@ -19,7 +19,7 @@ export type T struct { } var a = []int{ 1, 2, 3 } -export var NIL []int; +var NIL []int; func arraycmptest() { a1 := a; @@ -34,7 +34,7 @@ func arraycmptest() { } } -export func SameArray(a, b []int) bool { +func SameArray(a, b []int) bool { if len(a) != len(b) || cap(a) != cap(b) { return false; } @@ -103,7 +103,7 @@ func chantest() { } } -export type E struct { } +type E struct { } var e E func interfacetest() { diff --git a/test/bugs/bug117.go b/test/bugs/bug117.go index 2707350cc..a18e68849 100644 --- a/test/bugs/bug117.go +++ b/test/bugs/bug117.go @@ -5,8 +5,8 @@ // license that can be found in the LICENSE file. package main -export type S struct { a int } -export type PS *S +type S struct { a int } +type PS *S func (p *S) get() int { return p.a } diff --git a/test/bugs/bug121.go b/test/bugs/bug121.go index 815faeffd..cc960e318 100644 --- a/test/bugs/bug121.go +++ b/test/bugs/bug121.go @@ -6,14 +6,14 @@ package main -export type T () +type T () -export type I interface { +type I interface { f, g (); h T; // should only allow FunctionType here } -export type S struct { +type S struct { } func (s *S) f() {} diff --git a/test/bugs/bug123.go b/test/bugs/bug123.go index c3b8ff51c..0576de37d 100644 --- a/test/bugs/bug123.go +++ b/test/bugs/bug123.go @@ -5,7 +5,7 @@ // license that can be found in the LICENSE file. package main -export const ( F = 1 ) +const ( F = 1 ) func fn(i int) int { if i == F() { // ERROR "function" return 0 diff --git a/test/bugs/bug130.go b/test/bugs/bug130.go index 1bcf05a9d..aa3f0dd70 100644 --- a/test/bugs/bug130.go +++ b/test/bugs/bug130.go @@ -6,9 +6,9 @@ package main -export type I interface { send(chan <- int) } +type I interface { send(chan <- int) } -export type S struct { v int } +type S struct { v int } func (p *S) send(c chan <- int) { c <- p.v } func main() { diff --git a/test/chan/fifo.go b/test/chan/fifo.go index 5df491845..ad53ab655 100644 --- a/test/chan/fifo.go +++ b/test/chan/fifo.go @@ -8,9 +8,9 @@ package main -export const N = 10 +const N = 10 -export func AsynchFifo() { +func AsynchFifo() { ch := make(chan int, N); for i := 0; i < N; i++ { ch <- i @@ -23,7 +23,7 @@ export func AsynchFifo() { } } -export func Chain(ch <-chan int, val int, in <-chan int, out chan<- int) { +func Chain(ch <-chan int, val int, in <-chan int, out chan<- int) { <-in; if <-ch != val { panic(val) @@ -32,7 +32,7 @@ export func Chain(ch <-chan int, val int, in <-chan int, out chan<- int) { } // thread together a daisy chain to read the elements in sequence -export func SynchFifo() { +func SynchFifo() { ch := make(chan int); in := make(chan int); start := in; diff --git a/test/chan/powser1.go b/test/chan/powser1.go index 6326fb241..333466091 100644 --- a/test/chan/powser1.go +++ b/test/chan/powser1.go @@ -41,7 +41,7 @@ var chnames string var chnameserial int var seqno int -export func Init(); +func Init(); func mkdch() *dch { c := chnameserial % len(chnames); @@ -176,11 +176,11 @@ func repeat(dat item, out *dch){ } } -export type PS *dch; // power series -export type PS2 *[2] PS; // pair of power series +type PS *dch; // power series +type PS2 *[2] PS; // pair of power series -export var Ones PS -export var Twos PS +var Ones PS +var Twos PS func mkPS() *dch { return mkdch() @@ -266,7 +266,7 @@ func inv(u *rat) *rat{ // invert a rat } // print eval in floating point of PS at x=c to n terms -export func Evaln(c *rat, U PS, n int) +func Evaln(c *rat, U PS, n int) { xn := float64(1); x := float64(c.num)/float64(c.den); @@ -283,7 +283,7 @@ export func Evaln(c *rat, U PS, n int) } // Print n terms of a power series -export func Printn(U PS, n int){ +func Printn(U PS, n int){ done := false; for ; !done && n>0; n-- { u := get(U); @@ -293,7 +293,7 @@ export func Printn(U PS, n int){ print(("\n")); } -export func Print(U PS){ +func Print(U PS){ Printn(U,1000000000); } @@ -311,14 +311,14 @@ func eval(c *rat, U PS, n int) *rat{ // Make a pair of power series identical to a given power series -export func Split(U PS) *dch2{ +func Split(U PS) *dch2{ UU := mkdch2(); go split(U,UU); return UU; } // Add two power series -export func Add(U, V PS) PS{ +func Add(U, V PS) PS{ Z := mkPS(); go func(U, V, Z PS){ var uv [] *rat; @@ -343,7 +343,7 @@ export func Add(U, V PS) PS{ } // Multiply a power series by a constant -export func Cmul(c *rat,U PS) PS{ +func Cmul(c *rat,U PS) PS{ Z := mkPS(); go func(c *rat, U, Z PS){ done := false; @@ -360,13 +360,13 @@ export func Cmul(c *rat,U PS) PS{ // Subtract -export func Sub(U, V PS) PS{ +func Sub(U, V PS) PS{ return Add(U, Cmul(neg(one), V)); } // Multiply a power series by the monomial x^n -export func Monmul(U PS, n int) PS{ +func Monmul(U PS, n int) PS{ Z := mkPS(); go func(n int, U PS, Z PS){ for ; n>0; n-- { put(zero,Z) } @@ -377,11 +377,11 @@ export func Monmul(U PS, n int) PS{ // Multiply by x -export func Xmul(U PS) PS{ +func Xmul(U PS) PS{ return Monmul(U,1); } -export func Rep(c *rat) PS{ +func Rep(c *rat) PS{ Z := mkPS(); go repeat(c,Z); return Z; @@ -389,7 +389,7 @@ export func Rep(c *rat) PS{ // Monomial c*x^n -export func Mon(c *rat, n int) PS{ +func Mon(c *rat, n int) PS{ Z:=mkPS(); go func(c *rat, n int, Z PS){ if(c.num!=0) { @@ -401,7 +401,7 @@ export func Mon(c *rat, n int) PS{ return Z; } -export func Shift(c *rat, U PS) PS{ +func Shift(c *rat, U PS) PS{ Z := mkPS(); go func(c *rat, U, Z PS){ put(c,Z); @@ -416,7 +416,7 @@ export func Shift(c *rat, U PS) PS{ // to a (finite) power series /* BUG: NEED LEN OF ARRAY -export func Poly(a [] *rat) PS{ +func Poly(a [] *rat) PS{ Z:=mkPS(); begin func(a [] *rat, Z PS){ j:=0; @@ -436,7 +436,7 @@ export func Poly(a [] *rat) PS{ // let V = v + x*VV // then UV = u*v + x*(u*VV+v*UU) + x*x*UU*VV -export func Mul(U, V PS) PS{ +func Mul(U, V PS) PS{ Z:=mkPS(); go func(U, V, Z PS){ <-Z.req; @@ -458,7 +458,7 @@ export func Mul(U, V PS) PS{ // Differentiate -export func Diff(U PS) PS{ +func Diff(U PS) PS{ Z:=mkPS(); go func(U, Z PS){ <-Z.req; @@ -480,7 +480,7 @@ export func Diff(U PS) PS{ } // Integrate, with const of integration -export func Integ(c *rat,U PS) PS{ +func Integ(c *rat,U PS) PS{ Z:=mkPS(); go func(c *rat, U, Z PS){ put(c,Z); @@ -498,7 +498,7 @@ export func Integ(c *rat,U PS) PS{ // Binomial theorem (1+x)^c -export func Binom(c *rat) PS{ +func Binom(c *rat) PS{ Z:=mkPS(); go func(c *rat, Z PS){ n := 1; @@ -522,7 +522,7 @@ export func Binom(c *rat) PS{ // u*ZZ + z*UU +x*UU*ZZ = 0 // ZZ = -UU*(z+x*ZZ)/u; -export func Recip(U PS) PS{ +func Recip(U PS) PS{ Z:=mkPS(); go func(U, Z PS){ ZZ:=mkPS2(); @@ -542,7 +542,7 @@ export func Recip(U PS) PS{ // DZ = Z*DU // integrate to get Z -export func Exp(U PS) PS{ +func Exp(U PS) PS{ ZZ := mkPS2(); split(Integ(one,Mul(ZZ[0],Diff(U))),ZZ); return ZZ[1]; @@ -554,7 +554,7 @@ export func Exp(U PS) PS{ // then S(U,V) = u + VV*S(V,UU) // bug: a nonzero constant term is ignored -export func Subst(U, V PS) PS { +func Subst(U, V PS) PS { Z:= mkPS(); go func(U, V, Z PS) { VV := Split(V); @@ -572,7 +572,7 @@ export func Subst(U, V PS) PS { // Monomial Substition: U(c x^n) // Each Ui is multiplied by c^i and followed by n-1 zeros -export func MonSubst(U PS, c0 *rat, n int) PS { +func MonSubst(U PS, c0 *rat, n int) PS { Z:= mkPS(); go func(U, Z PS, c0 *rat, n int) { c := one; @@ -595,7 +595,7 @@ export func MonSubst(U PS, c0 *rat, n int) PS { } -export func Init() { +func Init() { chnameserial = -1; seqno = 0; chnames = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -620,7 +620,7 @@ func check(U PS, c *rat, count int, str string) { } } -export const N=10 +const N=10 func checka(U PS, a []*rat, str string) { for i := 0; i < N; i++ { check(U, a[i], 1, str); diff --git a/test/chan/powser2.go b/test/chan/powser2.go index 086702519..17e2aa281 100644 --- a/test/chan/powser2.go +++ b/test/chan/powser2.go @@ -46,7 +46,7 @@ var chnames string var chnameserial int var seqno int -export func Init(); +func Init(); func mkdch() *dch { c := chnameserial % len(chnames); @@ -181,11 +181,11 @@ func repeat(dat item, out *dch){ } } -export type PS *dch; // power series -export type PS2 *[2] PS; // pair of power series +type PS *dch; // power series +type PS2 *[2] PS; // pair of power series -export var Ones PS -export var Twos PS +var Ones PS +var Twos PS func mkPS() *dch { return mkdch() @@ -271,7 +271,7 @@ func inv(u *rat) *rat{ // invert a rat } // print eval in floating point of PS at x=c to n terms -export func Evaln(c *rat, U PS, n int) +func Evaln(c *rat, U PS, n int) { xn := float64(1); x := float64(c.num)/float64(c.den); @@ -288,7 +288,7 @@ export func Evaln(c *rat, U PS, n int) } // Print n terms of a power series -export func Printn(U PS, n int){ +func Printn(U PS, n int){ done := false; for ; !done && n>0; n-- { u := get(U); @@ -298,7 +298,7 @@ export func Printn(U PS, n int){ print(("\n")); } -export func Print(U PS){ +func Print(U PS){ Printn(U,1000000000); } @@ -316,14 +316,14 @@ func eval(c *rat, U PS, n int) *rat{ // Make a pair of power series identical to a given power series -export func Split(U PS) *dch2{ +func Split(U PS) *dch2{ UU := mkdch2(); go split(U,UU); return UU; } // Add two power series -export func Add(U, V PS) PS{ +func Add(U, V PS) PS{ Z := mkPS(); go func(U, V, Z PS){ var uv [] item; @@ -348,7 +348,7 @@ export func Add(U, V PS) PS{ } // Multiply a power series by a constant -export func Cmul(c *rat,U PS) PS{ +func Cmul(c *rat,U PS) PS{ Z := mkPS(); go func(c *rat, U, Z PS){ done := false; @@ -365,13 +365,13 @@ export func Cmul(c *rat,U PS) PS{ // Subtract -export func Sub(U, V PS) PS{ +func Sub(U, V PS) PS{ return Add(U, Cmul(neg(one), V)); } // Multiply a power series by the monomial x^n -export func Monmul(U PS, n int) PS{ +func Monmul(U PS, n int) PS{ Z := mkPS(); go func(n int, U PS, Z PS){ for ; n>0; n-- { put(zero,Z) } @@ -382,11 +382,11 @@ export func Monmul(U PS, n int) PS{ // Multiply by x -export func Xmul(U PS) PS{ +func Xmul(U PS) PS{ return Monmul(U,1); } -export func Rep(c *rat) PS{ +func Rep(c *rat) PS{ Z := mkPS(); go repeat(c,Z); return Z; @@ -394,7 +394,7 @@ export func Rep(c *rat) PS{ // Monomial c*x^n -export func Mon(c *rat, n int) PS{ +func Mon(c *rat, n int) PS{ Z:=mkPS(); go func(c *rat, n int, Z PS){ if(c.num!=0) { @@ -406,7 +406,7 @@ export func Mon(c *rat, n int) PS{ return Z; } -export func Shift(c *rat, U PS) PS{ +func Shift(c *rat, U PS) PS{ Z := mkPS(); go func(c *rat, U, Z PS){ put(c,Z); @@ -421,7 +421,7 @@ export func Shift(c *rat, U PS) PS{ // to a (finite) power series /* BUG: NEED LEN OF ARRAY -export func Poly(a [] *rat) PS{ +func Poly(a [] *rat) PS{ Z:=mkPS(); begin func(a [] *rat, Z PS){ j:=0; @@ -441,7 +441,7 @@ export func Poly(a [] *rat) PS{ // let V = v + x*VV // then UV = u*v + x*(u*VV+v*UU) + x*x*UU*VV -export func Mul(U, V PS) PS{ +func Mul(U, V PS) PS{ Z:=mkPS(); go func(U, V, Z PS){ <-Z.req; @@ -463,7 +463,7 @@ export func Mul(U, V PS) PS{ // Differentiate -export func Diff(U PS) PS{ +func Diff(U PS) PS{ Z:=mkPS(); go func(U, Z PS){ <-Z.req; @@ -485,7 +485,7 @@ export func Diff(U PS) PS{ } // Integrate, with const of integration -export func Integ(c *rat,U PS) PS{ +func Integ(c *rat,U PS) PS{ Z:=mkPS(); go func(c *rat, U, Z PS){ put(c,Z); @@ -503,7 +503,7 @@ export func Integ(c *rat,U PS) PS{ // Binomial theorem (1+x)^c -export func Binom(c *rat) PS{ +func Binom(c *rat) PS{ Z:=mkPS(); go func(c *rat, Z PS){ n := 1; @@ -527,7 +527,7 @@ export func Binom(c *rat) PS{ // u*ZZ + z*UU +x*UU*ZZ = 0 // ZZ = -UU*(z+x*ZZ)/u; -export func Recip(U PS) PS{ +func Recip(U PS) PS{ Z:=mkPS(); go func(U, Z PS){ ZZ:=mkPS2(); @@ -547,7 +547,7 @@ export func Recip(U PS) PS{ // DZ = Z*DU // integrate to get Z -export func Exp(U PS) PS{ +func Exp(U PS) PS{ ZZ := mkPS2(); split(Integ(one,Mul(ZZ[0],Diff(U))),ZZ); return ZZ[1]; @@ -559,7 +559,7 @@ export func Exp(U PS) PS{ // then S(U,V) = u + VV*S(V,UU) // bug: a nonzero constant term is ignored -export func Subst(U, V PS) PS { +func Subst(U, V PS) PS { Z:= mkPS(); go func(U, V, Z PS) { VV := Split(V); @@ -577,7 +577,7 @@ export func Subst(U, V PS) PS { // Monomial Substition: U(c x^n) // Each Ui is multiplied by c^i and followed by n-1 zeros -export func MonSubst(U PS, c0 *rat, n int) PS { +func MonSubst(U PS, c0 *rat, n int) PS { Z:= mkPS(); go func(U, Z PS, c0 *rat, n int) { c := one; @@ -600,7 +600,7 @@ export func MonSubst(U PS, c0 *rat, n int) PS { } -export func Init() { +func Init() { chnameserial = -1; seqno = 0; chnames = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -625,7 +625,7 @@ func check(U PS, c *rat, count int, str string) { } } -export const N=10 +const N=10 func checka(U PS, a []*rat, str string) { for i := 0; i < N; i++ { check(U, a[i], 1, str); diff --git a/test/chan/select.go b/test/chan/select.go index 009ee35c7..d8a462551 100644 --- a/test/chan/select.go +++ b/test/chan/select.go @@ -9,12 +9,12 @@ package main var counter uint var shift uint -export func GetValue() uint { +func GetValue() uint { counter++; return 1 << shift } -export func Send(a, b chan uint) int { +func Send(a, b chan uint) int { var i int; LOOP: for { diff --git a/test/chan/sieve.go b/test/chan/sieve.go index b5330e7f8..0cebdc641 100644 --- a/test/chan/sieve.go +++ b/test/chan/sieve.go @@ -10,7 +10,7 @@ package main // Send the sequence 2, 3, 4, ... to channel 'ch'. -export func Generate(ch chan<- int) { +func Generate(ch chan<- int) { for i := 2; ; i++ { ch <- i // Send 'i' to channel 'ch'. } @@ -18,7 +18,7 @@ export func Generate(ch chan<- int) { // Copy the values from channel 'in' to channel 'out', // removing those divisible by 'prime'. -export func Filter(in <-chan int, out chan<- int, prime int) { +func Filter(in <-chan int, out chan<- int, prime int) { for { i := <-in; // Receive value of new variable 'i' from 'in'. if i % prime != 0 { @@ -28,7 +28,7 @@ export func Filter(in <-chan int, out chan<- int, prime int) { } // The prime sieve: Daisy-chain Filter processes together. -export func Sieve(primes chan<- int) { +func Sieve(primes chan<- int) { ch := make(chan int); // Create a new channel. go Generate(ch); // Start Generate() as a subprocess. for { diff --git a/test/complit.go b/test/complit.go index 55159be85..d9b948851 100644 --- a/test/complit.go +++ b/test/complit.go @@ -6,9 +6,9 @@ package main -export type T struct { i int; f float; s string; next *T } +type T struct { i int; f float; s string; next *T } -export type R struct { num int } +type R struct { num int } func itor(a int) *R { r := new(R); @@ -22,8 +22,8 @@ func eq(a []*R) { } } -export type P struct { a, b int }; -export func NewP(a, b int) *P { +type P struct { a, b int }; +func NewP(a, b int) *P { return &P{a, b} } diff --git a/test/export.go b/test/export.go index b1f033a16..8fe76d5f1 100644 --- a/test/export.go +++ b/test/export.go @@ -6,11 +6,11 @@ package main -export type A struct // ERROR "incomplete" -export type B interface // ERROR "incomplete" +type A struct // ERROR "incomplete" +type B interface // ERROR "incomplete" -export type C struct -export type D interface +type C struct +type D interface -export type C struct { } -export type D interface { } +type C struct { } +type D interface { } diff --git a/test/fixedbugs/bug007.go b/test/fixedbugs/bug007.go index 992276c67..bd970de5f 100644 --- a/test/fixedbugs/bug007.go +++ b/test/fixedbugs/bug007.go @@ -6,7 +6,7 @@ package main -export type ( +type ( Point struct { x, y float }; Polar Point ) diff --git a/test/fixedbugs/bug011.go b/test/fixedbugs/bug011.go index aaa920a6b..63673c086 100644 --- a/test/fixedbugs/bug011.go +++ b/test/fixedbugs/bug011.go @@ -7,7 +7,7 @@ package main -export type T struct { +type T struct { x, y int; } diff --git a/test/fixedbugs/bug023.go b/test/fixedbugs/bug023.go index 6a189b470..cce8c4543 100644 --- a/test/fixedbugs/bug023.go +++ b/test/fixedbugs/bug023.go @@ -6,11 +6,11 @@ package main -export type Type interface { +type Type interface { TypeName() string; } -export type TInt struct { +type TInt struct { } // TInt diff --git a/test/fixedbugs/bug025.go b/test/fixedbugs/bug025.go index 4d4e954bf..545b171bc 100644 --- a/test/fixedbugs/bug025.go +++ b/test/fixedbugs/bug025.go @@ -6,7 +6,7 @@ package main -export foo +foo func main() {} diff --git a/test/fixedbugs/bug026.go b/test/fixedbugs/bug026.go index d64d0627e..eacea3745 100644 --- a/test/fixedbugs/bug026.go +++ b/test/fixedbugs/bug026.go @@ -6,10 +6,10 @@ package main -export type Element interface { +type Element interface { } -export type Vector struct { +type Vector struct { } func (v *Vector) Insert(i int, e Element) { diff --git a/test/fixedbugs/bug027.go b/test/fixedbugs/bug027.go index 9de26af2f..16300502b 100644 --- a/test/fixedbugs/bug027.go +++ b/test/fixedbugs/bug027.go @@ -6,15 +6,15 @@ package main -export type Element interface { +type Element interface { } -export type Vector struct { +type Vector struct { nelem int; elem []Element; } -export func New() *Vector { +func New() *Vector { v := new(Vector); v.nelem = 0; v.elem = make([]Element, 10); diff --git a/test/fixedbugs/bug028.go b/test/fixedbugs/bug028.go index 4990ac286..0488ad2cb 100644 --- a/test/fixedbugs/bug028.go +++ b/test/fixedbugs/bug028.go @@ -7,7 +7,7 @@ package main -export func Alloc(i int) int { +func Alloc(i int) int { switch i { default: return 5; diff --git a/test/fixedbugs/bug044.go b/test/fixedbugs/bug044.go index 52ee03308..789237abe 100644 --- a/test/fixedbugs/bug044.go +++ b/test/fixedbugs/bug044.go @@ -6,7 +6,7 @@ package main -export type S struct { +type S struct { }; func (p *S) M1a() ; diff --git a/test/fixedbugs/bug045.go b/test/fixedbugs/bug045.go index b4ae6de0a..88c005d32 100644 --- a/test/fixedbugs/bug045.go +++ b/test/fixedbugs/bug045.go @@ -6,7 +6,7 @@ package main -export type T struct { +type T struct { i int } diff --git a/test/fixedbugs/bug046.go b/test/fixedbugs/bug046.go index bd3a1e2f9..8a9b79707 100644 --- a/test/fixedbugs/bug046.go +++ b/test/fixedbugs/bug046.go @@ -6,7 +6,7 @@ package main -export type T *struct {} +type T *struct {} func (x T) M () {} // ERROR "pointer|receiver" diff --git a/test/fixedbugs/bug054.go b/test/fixedbugs/bug054.go index 35cfc9204..0ed5d0708 100644 --- a/test/fixedbugs/bug054.go +++ b/test/fixedbugs/bug054.go @@ -6,10 +6,10 @@ package main -export type Element interface { +type Element interface { } -export type Vector struct { +type Vector struct { elem []Element; } @@ -17,7 +17,7 @@ func (v *Vector) At(i int) Element { return v.elem[i]; } -export type TStruct struct { +type TStruct struct { name string; fields *Vector; } diff --git a/test/fixedbugs/bug057.go b/test/fixedbugs/bug057.go index e0a60dc37..1c959b8c8 100644 --- a/test/fixedbugs/bug057.go +++ b/test/fixedbugs/bug057.go @@ -6,7 +6,7 @@ package main -export type T struct { +type T struct { s string; } @@ -19,6 +19,6 @@ func main() { } /* -uetli:/home/gri/go/test/bugs gri$ 6g bug057.go +uetli:/home/gri/go/test/bugs gri$ 6g bug057.go bug057.go:14: syntax error */ diff --git a/test/fixedbugs/bug058.go b/test/fixedbugs/bug058.go index 3765dfc35..da47ae568 100644 --- a/test/fixedbugs/bug058.go +++ b/test/fixedbugs/bug058.go @@ -6,7 +6,7 @@ package main -export type Box struct {}; +type Box struct {}; var m map[string] *Box; func main() { diff --git a/test/fixedbugs/bug059.go b/test/fixedbugs/bug059.go index d1f3b13b2..21c078361 100644 --- a/test/fixedbugs/bug059.go +++ b/test/fixedbugs/bug059.go @@ -6,7 +6,7 @@ package main -export func P(a []string) string { +func P(a []string) string { s := "{"; for i := 0; i < 2; i++ { if i > 0 { diff --git a/test/fixedbugs/bug066.go b/test/fixedbugs/bug066.go index ce021af3f..4f64152ae 100644 --- a/test/fixedbugs/bug066.go +++ b/test/fixedbugs/bug066.go @@ -6,26 +6,26 @@ package main -export type ( +type ( Type struct; Object struct; ) -export type Scope struct { +type Scope struct { entries map[string] *Object; } -export type Type struct { +type Type struct { scope *Scope; } -export type Object struct { +type Object struct { typ *Type; } -export func Lookup(scope *Scope) *Object { +func Lookup(scope *Scope) *Object { return scope.entries["foo"]; } diff --git a/test/fixedbugs/bug075.go b/test/fixedbugs/bug075.go index 76b518934..fceeef8cb 100644 --- a/test/fixedbugs/bug075.go +++ b/test/fixedbugs/bug075.go @@ -6,7 +6,7 @@ package main -export type T struct { m map[int]int } +type T struct { m map[int]int } func main() { t := new(T); t.m = make(map[int]int); diff --git a/test/fixedbugs/bug083.dir/bug0.go b/test/fixedbugs/bug083.dir/bug0.go index 58c4c4971..67ea271a0 100644 --- a/test/fixedbugs/bug083.dir/bug0.go +++ b/test/fixedbugs/bug083.dir/bug0.go @@ -4,7 +4,7 @@ package bug0 -export type T0 struct { +type T0 struct { } -export var V0 T0 +var V0 T0 diff --git a/test/fixedbugs/bug084.go b/test/fixedbugs/bug084.go index 23e5e00ca..2897593dc 100644 --- a/test/fixedbugs/bug084.go +++ b/test/fixedbugs/bug084.go @@ -6,7 +6,7 @@ package main -export type Service struct { +type Service struct { rpc [2]int; } diff --git a/test/fixedbugs/bug088.dir/bug0.go b/test/fixedbugs/bug088.dir/bug0.go index 3536e81cb..082cce81d 100644 --- a/test/fixedbugs/bug088.dir/bug0.go +++ b/test/fixedbugs/bug088.dir/bug0.go @@ -4,6 +4,6 @@ package bug0 -export var V0 *() int; -export var V1 *() (a int); -export var V2 *() (a, b int); +var V0 *() int; +var V1 *() (a int); +var V2 *() (a, b int); diff --git a/test/fixedbugs/bug089.go b/test/fixedbugs/bug089.go index 55d4dfba7..296e9e6d6 100644 --- a/test/fixedbugs/bug089.go +++ b/test/fixedbugs/bug089.go @@ -6,8 +6,8 @@ package main -export type I1 interface {} -export type I2 interface { pr() } +type I1 interface {} +type I2 interface { pr() } func e() I1; diff --git a/test/fixedbugs/bug093.go b/test/fixedbugs/bug093.go index 3adbc5abb..f80eee01f 100644 --- a/test/fixedbugs/bug093.go +++ b/test/fixedbugs/bug093.go @@ -6,14 +6,14 @@ package main -export type S struct { +type S struct { } func (p *S) M() { print("M\n"); } -export type I interface { +type I interface { M(); } diff --git a/test/fixedbugs/bug096.go b/test/fixedbugs/bug096.go index 418f9f27c..81d6c4aad 100644 --- a/test/fixedbugs/bug096.go +++ b/test/fixedbugs/bug096.go @@ -6,7 +6,7 @@ package main -export type A []int; +type A []int; func main() { a := &A{0}; @@ -16,7 +16,7 @@ func main() { /* uetli:~/Source/go1/test/bugs gri$ 6g bug096.go && 6l bug096.6 && 6.out Trace/BPT trap -uetli:~/Source/go1/test/bugs gri$ +uetli:~/Source/go1/test/bugs gri$ */ /* diff --git a/test/fixedbugs/bug097.go b/test/fixedbugs/bug097.go index cd815d766..70bd6e2b4 100644 --- a/test/fixedbugs/bug097.go +++ b/test/fixedbugs/bug097.go @@ -6,7 +6,7 @@ package main -export type A []int; +type A []int; func main() { var a [3]A; diff --git a/test/fixedbugs/bug098.go b/test/fixedbugs/bug098.go index 7c20d926b..8e790a709 100644 --- a/test/fixedbugs/bug098.go +++ b/test/fixedbugs/bug098.go @@ -6,8 +6,8 @@ package main -export type A []int; -export type M map[int] int; +type A []int; +type M map[int] int; func main() { var a *A = &A{0}; diff --git a/test/fixedbugs/bug099.go b/test/fixedbugs/bug099.go index 9bf3525e6..f76f0e873 100644 --- a/test/fixedbugs/bug099.go +++ b/test/fixedbugs/bug099.go @@ -7,22 +7,22 @@ package main // Interface -export type I interface { F() int } +type I interface { F() int } // Implements interface -export type S struct { } +type S struct { } func (s *S) F() int { return 1 } // Allocates S but returns I // Arg is unused but important: // if you take it out (and the 0s below) // then the bug goes away. -export func NewI(i int) I { +func NewI(i int) I { return new(S) } // Uses interface method. -export func Use(x I) { +func Use(x I) { x.F() } diff --git a/test/fixedbugs/bug106.dir/bug0.go b/test/fixedbugs/bug106.dir/bug0.go index 2dfe157cf..7daf20944 100644 --- a/test/fixedbugs/bug106.dir/bug0.go +++ b/test/fixedbugs/bug106.dir/bug0.go @@ -3,4 +3,4 @@ // license that can be found in the LICENSE file. package bug0 -export const A = -1 +const A = -1 diff --git a/test/fixedbugs/bug111.go b/test/fixedbugs/bug111.go index 39da9b4dd..e72b343ae 100644 --- a/test/fixedbugs/bug111.go +++ b/test/fixedbugs/bug111.go @@ -8,11 +8,11 @@ package main var ncall int; -export type Iffy interface { +type Iffy interface { Me() Iffy } -export type Stucky struct { +type Stucky struct { n int } diff --git a/test/fixedbugs/bug112.go b/test/fixedbugs/bug112.go index b8d3357f0..3c932843c 100644 --- a/test/fixedbugs/bug112.go +++ b/test/fixedbugs/bug112.go @@ -6,7 +6,7 @@ package main -export type T struct { s string } +type T struct { s string } var t = T{"hi"} func main() {} diff --git a/test/fixedbugs/bug113.go b/test/fixedbugs/bug113.go index f2f8ee7b3..ea75260cf 100644 --- a/test/fixedbugs/bug113.go +++ b/test/fixedbugs/bug113.go @@ -5,7 +5,7 @@ // license that can be found in the LICENSE file. package main -export type I interface { }; +type I interface { }; func foo1(i int) int { return i } func foo2(i int32) int32 { return i } func main() { diff --git a/test/fixedbugs/bug114.go b/test/fixedbugs/bug114.go index 431d7bb2d..33330fff8 100644 --- a/test/fixedbugs/bug114.go +++ b/test/fixedbugs/bug114.go @@ -6,9 +6,9 @@ package main -export const B32 = 1<<32 - 1 -export const C32 = (-1) & ((1<<32) - 1) -export const D32 = ^0 +const B32 = 1<<32 - 1 +const C32 = (-1) & ((1<<32) - 1) +const D32 = ^0 func main() { if B32 != 0xFFFFFFFF { diff --git a/test/fixedbugs/bug118.go b/test/fixedbugs/bug118.go index d508d8353..94f5ffd35 100644 --- a/test/fixedbugs/bug118.go +++ b/test/fixedbugs/bug118.go @@ -6,7 +6,7 @@ package main -export func Send(c chan int) int { +func Send(c chan int) int { select { default: return 1; diff --git a/test/fixedbugs/bug120.go b/test/fixedbugs/bug120.go index dae78e91c..10e28034d 100644 --- a/test/fixedbugs/bug120.go +++ b/test/fixedbugs/bug120.go @@ -8,7 +8,7 @@ package main import "strconv"; -export type Test struct { +type Test struct { f float64; in string; out string; diff --git a/test/func.go b/test/func.go index 3a357f895..ee9414ddc 100644 --- a/test/func.go +++ b/test/func.go @@ -45,7 +45,7 @@ func f8(a int) (x int, y float) { return 8, 8.0; } -export type T struct { +type T struct { x, y int; } diff --git a/test/hashmap.go b/test/hashmap.go index 4fe36f339..6f70f2b50 100755 --- a/test/hashmap.go +++ b/test/hashmap.go @@ -9,7 +9,7 @@ package main // ---------------------------------------------------------------------------- // Helper functions -export func ASSERT(p bool) { +func ASSERT(p bool) { if !p { // panic 0; } @@ -19,18 +19,18 @@ export func ASSERT(p bool) { // ---------------------------------------------------------------------------- // Implementation of the HashMap -export type KeyType interface { +type KeyType interface { Hash() uint32; Match(other *KeyType) bool } -export type ValueType interface { +type ValueType interface { // empty interface } -export type Entry struct { +type Entry struct { key *KeyType; value *ValueType; } @@ -39,7 +39,7 @@ export type Entry struct { // Using the Array type below doesn't seem to work //type Array array [1024] Entry; -export type HashMap struct { +type HashMap struct { map_ *[1024] Entry; log2_capacity_ uint32; occupancy_ uint32; @@ -139,7 +139,7 @@ func (m *HashMap) Resize() { // ---------------------------------------------------------------------------- // Test code -export type Number struct { +type Number struct { x uint32; } @@ -156,7 +156,7 @@ func (n *Number) Match(other *KeyType) bool { } -export func MakeNumber (x uint32) *Number { +func MakeNumber (x uint32) *Number { var n *Number = new(Number); n.x = x; return n; diff --git a/test/hilbert.go b/test/hilbert.go index 311ed9b2c..163313e85 100644 --- a/test/hilbert.go +++ b/test/hilbert.go @@ -21,13 +21,13 @@ func assert(p bool) { } -export var ( +var ( Zero = Big.Rat(0, 1); One = Big.Rat(1, 1); ) -export type Matrix struct { +type Matrix struct { n, m int; a []*Big.Rational; } @@ -45,7 +45,7 @@ func (a *Matrix) set(i, j int, x *Big.Rational) { } -export func NewMatrix(n, m int) *Matrix { +func NewMatrix(n, m int) *Matrix { assert(0 <= n && 0 <= m); a := new(Matrix); a.n = n; @@ -55,7 +55,7 @@ export func NewMatrix(n, m int) *Matrix { } -export func NewUnit(n int) *Matrix { +func NewUnit(n int) *Matrix { a := NewMatrix(n, n); for i := 0; i < n; i++ { for j := 0; j < n; j++ { @@ -70,7 +70,7 @@ export func NewUnit(n int) *Matrix { } -export func NewHilbert(n int) *Matrix { +func NewHilbert(n int) *Matrix { a := NewMatrix(n, n); for i := 0; i < n; i++ { for j := 0; j < n; j++ { @@ -82,12 +82,12 @@ export func NewHilbert(n int) *Matrix { } -export func MakeRat(x Big.Natural) *Big.Rational { +func MakeRat(x Big.Natural) *Big.Rational { return Big.MakeRat(Big.MakeInt(false, x), Big.Nat(1)); } -export func NewInverseHilbert(n int) *Matrix { +func NewInverseHilbert(n int) *Matrix { a := NewMatrix(n, n); for i := 0; i < n; i++ { for j := 0; j < n; j++ { diff --git a/test/interface.go b/test/interface.go index 530d2883f..ee03f67f0 100644 --- a/test/interface.go +++ b/test/interface.go @@ -6,17 +6,17 @@ package main -export type I2 interface +type I2 interface -export type I1 interface { +type I1 interface { foo() I2 } -export type I2 interface { +type I2 interface { bar() I1 } -export type T int +type T int func (t T) bar() I1; func (t T) foo() I2 { return t } func (t T) bar() I1 { return t } diff --git a/test/interface1.go b/test/interface1.go index 819829c72..649a955f6 100644 --- a/test/interface1.go +++ b/test/interface1.go @@ -6,23 +6,23 @@ package main -export type Inst interface { +type Inst interface { Next() *Inst; } -export type Regexp struct { +type Regexp struct { code []Inst; start Inst; } -export type Start struct { +type Start struct { foo *Inst; } func (start *Start) Next() *Inst { return nil } -export func AddInst(Inst) *Inst { +func AddInst(Inst) *Inst { print("ok in addinst\n"); return nil } diff --git a/test/interface2.go b/test/interface2.go index 601c285ba..1db033887 100644 --- a/test/interface2.go +++ b/test/interface2.go @@ -6,9 +6,9 @@ package main -export type S struct +type S struct -export type I interface { +type I interface { Foo() } @@ -21,5 +21,5 @@ func main() { } // hide S down here to avoid static warning -export type S struct { +type S struct { } diff --git a/test/interface3.go b/test/interface3.go index 85cd02e13..04af91a02 100644 --- a/test/interface3.go +++ b/test/interface3.go @@ -6,14 +6,14 @@ package main -export type S struct { a int } -export type T struct { b string } +type S struct { a int } +type T struct { b string } func (s *S) Name() int8 { return 1 } func (t *T) Name() int64 { return 64 } -export type I1 interface { Name() int8 } -export type I2 interface { Name() int64 } +type I1 interface { Name() int8 } +type I2 interface { Name() int64 } func main() { var i1 I1; diff --git a/test/interface4.go b/test/interface4.go index 9df502b21..a55936df8 100644 --- a/test/interface4.go +++ b/test/interface4.go @@ -9,15 +9,15 @@ package main -export type I interface { M() int64 } +type I interface { M() int64 } -export type BigPtr struct { a, b, c, d int64 } +type BigPtr struct { a, b, c, d int64 } func (z *BigPtr) M() int64 { return z.a+z.b+z.c+z.d } -export type SmallPtr struct { a int32 } +type SmallPtr struct { a int32 } func (z *SmallPtr) M() int64 { return int64(z.a) } -export type IntPtr int32 +type IntPtr int32 func (z *IntPtr) M() int64 { return int64(*z) } var bad bool @@ -43,13 +43,13 @@ func ptrs() { test("&intptr", &intptr); } -export type Big struct { a, b, c, d int64 } +type Big struct { a, b, c, d int64 } func (z Big) M() int64 { return z.a+z.b+z.c+z.d } -export type Small struct { a int32 } +type Small struct { a int32 } func (z Small) M() int64 { return int64(z.a) } -export type Int int32 +type Int int32 func (z Int) M() int64 { return int64(z) } func nonptrs() { diff --git a/test/interface5.go b/test/interface5.go index 3e816abfc..2e273dddd 100644 --- a/test/interface5.go +++ b/test/interface5.go @@ -6,10 +6,10 @@ package main -export type T struct { a int } +type T struct { a int } var t *T -export type I interface { M() } +type I interface { M() } var i I func main() { diff --git a/test/interface6.go b/test/interface6.go index 27b5740ad..6053e51d6 100644 --- a/test/interface6.go +++ b/test/interface6.go @@ -15,9 +15,9 @@ func check(b bool, msg string) { } } -export type I1 interface { Get() int; Put(int); } +type I1 interface { Get() int; Put(int); } -export type S1 struct { i int } +type S1 struct { i int } func (p S1) Get() int { return p.i } func (p S1) Put(i int) { p.i = i } @@ -45,7 +45,7 @@ func f3() { check(s.i == 1, "f3 s"); } -export type S2 struct { i int } +type S2 struct { i int } func (p *S2) Get() int { return p.i } func (p *S2) Put(i int) { p.i = i } @@ -73,9 +73,9 @@ func f6() { check(s.i == 2, "f6 s"); } -export type I2 interface { Get() int64; Put(int64); } +type I2 interface { Get() int64; Put(int64); } -export type S3 struct { i, j, k, l int64 } +type S3 struct { i, j, k, l int64 } func (p S3) Get() int64 { return p.l } func (p S3) Put(i int64) { p.l = i } @@ -103,7 +103,7 @@ func f9() { check(s.l == 4, "f9 s"); } -export type S4 struct { i, j, k, l int64 } +type S4 struct { i, j, k, l int64 } func (p *S4) Get() int64 { return p.l } func (p *S4) Put(i int64) { p.l = i } diff --git a/test/iota.go b/test/iota.go index d6c0026a9..393edac80 100644 --- a/test/iota.go +++ b/test/iota.go @@ -21,13 +21,13 @@ const ( g float = 4.5 * float(iota); ) -export const ( +const ( X = 0; Y; Z; ) -export const ( +const ( A = 1 << iota; B; C; diff --git a/test/ken/chan.go b/test/ken/chan.go index 3bc309497..e06d9ab40 100644 --- a/test/ken/chan.go +++ b/test/ken/chan.go @@ -19,7 +19,7 @@ nrand(n int) int return randx%n; } -export type Chan +type Chan struct { sc,rc chan int; // send and recv chan diff --git a/test/ken/embed.go b/test/ken/embed.go index bc8240819..f0c9f4ec2 100644 --- a/test/ken/embed.go +++ b/test/ken/embed.go @@ -7,7 +7,7 @@ package main -export type +type I interface { test1, @@ -23,7 +23,7 @@ I interface ****** ******/ -export type +type SubpSubp struct { a7 int; @@ -45,7 +45,7 @@ testx() ****** ******/ -export type +type SubpSub struct { a6 int; @@ -68,7 +68,7 @@ testx() ****** ******/ -export type +type SubSubp struct { a5 int; @@ -85,7 +85,7 @@ test5() int ****** ******/ -export type +type SubSub struct { a4 int; @@ -102,7 +102,7 @@ test4() int ****** ******/ -export type +type Subp struct { a3 int; @@ -121,7 +121,7 @@ test3() int ****** ******/ -export type +type Sub struct { a2 int; @@ -140,7 +140,7 @@ test2() int ****** ******/ -export type +type S struct { a1 int; diff --git a/test/ken/interbasic.go b/test/ken/interbasic.go index 54ce6ffbc..05eea395b 100644 --- a/test/ken/interbasic.go +++ b/test/ken/interbasic.go @@ -8,7 +8,7 @@ package main type myint int; type mystring string; -export type I0 interface {}; +type I0 interface {}; func f() diff --git a/test/ken/interfun.go b/test/ken/interfun.go index 55d2d442a..97db89316 100644 --- a/test/ken/interfun.go +++ b/test/ken/interfun.go @@ -6,17 +6,17 @@ package main -export type S struct +type S struct { a,b int; } -export type I1 interface +type I1 interface { f ()int; } -export type I2 interface +type I2 interface { g,f ()int; } diff --git a/test/ken/intervar.go b/test/ken/intervar.go index 31e7d9869..1c3d65000 100644 --- a/test/ken/intervar.go +++ b/test/ken/intervar.go @@ -6,14 +6,14 @@ package main -export type Iputs interface +type Iputs interface { puts (s string); } // --------- -export type Print struct +type Print struct { whoami int; put Iputs; @@ -28,7 +28,7 @@ dop() // --------- -export type Bio struct +type Bio struct { whoami int; put Iputs; @@ -43,7 +43,7 @@ puts(s string) // --------- -export type File struct +type File struct { whoami int; put Iputs; diff --git a/test/ken/ptrfun.go b/test/ken/ptrfun.go index e2307cf50..e7db3a94d 100644 --- a/test/ken/ptrfun.go +++ b/test/ken/ptrfun.go @@ -7,7 +7,7 @@ package main -export type C struct +type C struct { a int; x *(p *C)int; diff --git a/test/ken/rob1.go b/test/ken/rob1.go index b6d72c8bd..a75878b1f 100644 --- a/test/ken/rob1.go +++ b/test/ken/rob1.go @@ -6,18 +6,18 @@ package main -export type Item interface +type Item interface { Print(); } -export type ListItem struct +type ListItem struct { item Item; next *ListItem; } -export type List struct +type List struct { head *ListItem; } @@ -48,7 +48,7 @@ Print() } // Something to put in a list -export type Integer struct +type Integer struct { val int; } diff --git a/test/ken/rob2.go b/test/ken/rob2.go index 313ae586f..1b4d86e6f 100644 --- a/test/ken/rob2.go +++ b/test/ken/rob2.go @@ -9,24 +9,24 @@ package main const nilchar = 0; -export type ( +type ( Atom struct; List struct; Slist struct; ) -export type Atom struct { +type Atom struct { str string; integer int; next *Slist; /* in hash bucket */ } -export type List struct { +type List struct { car *Slist; cdr*Slist; } -export type Slist struct { +type Slist struct { isatom bool; isstring bool; //union { @@ -67,8 +67,8 @@ func (slist *Slist) Free() { // free(slist); } -export func OpenFile(); -export func Parse() *Slist; +func OpenFile(); +func Parse() *Slist; //Slist* atom(byte *s, int i); @@ -81,7 +81,7 @@ var inputindex int = 0; var tokenbuf [100]byte; var tokenlen int = 0; -export const EOF int = -1; +const EOF int = -1; func main() { @@ -131,7 +131,7 @@ func (slist *Slist) Print() print("\n"); } -export func Get() int +func Get() int { var c int; @@ -152,12 +152,12 @@ export func Get() int return c; } -export func WhiteSpace(c int) bool +func WhiteSpace(c int) bool { return c == ' ' || c == '\t' || c == '\r' || c == '\n'; } -export func NextToken() +func NextToken() { var i, c int; var backslash bool; @@ -199,7 +199,7 @@ export func NextToken() } } -export func Expect(c int) +func Expect(c int) { if token != c { print("parse error: expected ", c, "\n"); @@ -209,7 +209,7 @@ export func Expect(c int) } // Parse a non-parenthesized list up to a closing paren or EOF -export func ParseList() *Slist +func ParseList() *Slist { var slist, retval *Slist; @@ -257,7 +257,7 @@ func atoi() int // BUG: uses tokenbuf; should take argument return v; } -export func Parse() *Slist +func Parse() *Slist { var slist *Slist; @@ -288,7 +288,7 @@ export func Parse() *Slist return nil; } -export func OpenFile() +func OpenFile() { input = "(defn foo (add 12 34))\n\x00"; inputindex = 0; diff --git a/test/ken/robfunc.go b/test/ken/robfunc.go index 5d4cfd2af..12b4b6d7b 100644 --- a/test/ken/robfunc.go +++ b/test/ken/robfunc.go @@ -44,7 +44,7 @@ func f8(a int) (x int, y float) { return 8, 8.0; } -export type T struct { +type T struct { x, y int; } diff --git a/test/mallocrand.go b/test/mallocrand.go index e4f06cad2..5fdeced4d 100644 --- a/test/mallocrand.go +++ b/test/mallocrand.go @@ -48,7 +48,7 @@ func prime() { func memset(b *byte, c byte, n uint64) { np := uintptr(n); for i := uintptr(0); i < np; i++ { - *(b.(unsafe.pointer).(uintptr)+i).(unsafe.pointer).(*byte) = c; + *(b.(unsafe.Pointer).(uintptr)+i).(unsafe.Pointer).(*byte) = c; } } diff --git a/test/mallocrep1.go b/test/mallocrep1.go index ebb174199..5d17dc2c6 100644 --- a/test/mallocrep1.go +++ b/test/mallocrep1.go @@ -22,7 +22,7 @@ var longtest = flag.Bool("l", false, "long test"); var b []*byte; var stats = malloc.GetStats(); -export func OkAmount(size, n uintptr) bool { +func OkAmount(size, n uintptr) bool { if n < size { return false } @@ -38,7 +38,7 @@ export func OkAmount(size, n uintptr) bool { return true } -export func AllocAndFree(size, count int) { +func AllocAndFree(size, count int) { if *chatty { fmt.Printf("size=%d count=%d ...\n", size, count); } diff --git a/test/map.go b/test/map.go index 18a401cf7..51c6fe5f5 100644 --- a/test/map.go +++ b/test/map.go @@ -13,7 +13,7 @@ import ( const arraylen = 2; // BUG: shouldn't need this -export func P(a []string) string { +func P(a []string) string { s := "{"; for i := 0; i < len(a); i++ { if i > 0 { diff --git a/test/method.go b/test/method.go index f57c26907..6dba3d178 100644 --- a/test/method.go +++ b/test/method.go @@ -6,12 +6,12 @@ package main -export type S string -export type S1 string -export type I int -export type I1 int -export type T struct { x int } -export type T1 T +type S string +type S1 string +type I int +type I1 int +type T struct { x int } +type T1 T func (s S) val() int { return 1 } func (s *S1) val() int { return 2 } @@ -20,7 +20,7 @@ func (i *I1) val() int { return 4 } //func (t T) val() int { return 7 } func (t *T1) val() int { return 8 } -export type Val interface { +type Val interface { val() int } diff --git a/test/method1.go b/test/method1.go index d279c50dd..c88607d42 100644 --- a/test/method1.go +++ b/test/method1.go @@ -6,7 +6,7 @@ package main -export type T struct { } +type T struct { } func (t *T) M(int, string); // GCCGO_ERROR "previous" func (t *T) M(int, float) { } // ERROR "redeclared|redefinition" diff --git a/test/method2.go b/test/method2.go index 9a32dd6b6..3ee0ae136 100644 --- a/test/method2.go +++ b/test/method2.go @@ -6,9 +6,9 @@ package main -export type T struct {a int} -export type P *T -export type P1 *T +type T struct {a int} +type P *T +type P1 *T func (p P) val() int { return 1 } // ERROR "receiver" func (p *P1) val() int { return 1 } // ERROR "receiver" diff --git a/test/method3.go b/test/method3.go index 0b93af0e1..491bcdad3 100644 --- a/test/method3.go +++ b/test/method3.go @@ -8,10 +8,10 @@ package main -export type T [] int +type T [] int func (t T) Len() int { return len(t) } -export type I interface { +type I interface { Len() int } diff --git a/test/nil.go b/test/nil.go index e59d47317..1aef54ba9 100644 --- a/test/nil.go +++ b/test/nil.go @@ -6,11 +6,11 @@ package main -export type T struct { +type T struct { i int } -export type IN interface { +type IN interface { } func main() { diff --git a/test/peano.go b/test/peano.go index 319576198..07e5f0ed3 100644 --- a/test/peano.go +++ b/test/peano.go @@ -6,7 +6,7 @@ package main -export type Number struct { +type Number struct { next *Number } diff --git a/test/sieve.go b/test/sieve.go index f6a07277f..e16345617 100644 --- a/test/sieve.go +++ b/test/sieve.go @@ -7,7 +7,7 @@ package main // Send the sequence 2, 3, 4, ... to channel 'ch'. -export func Generate(ch chan<- int) { +func Generate(ch chan<- int) { for i := 2; ; i++ { ch <- i // Send 'i' to channel 'ch'. } @@ -15,7 +15,7 @@ export func Generate(ch chan<- int) { // Copy the values from channel 'in' to channel 'out', // removing those divisible by 'prime'. -export func Filter(in <-chan int, out chan<- int, prime int) { +func Filter(in <-chan int, out chan<- int, prime int) { for { i := <-in; // Receive value of new variable 'i' from 'in'. if i % prime != 0 { @@ -25,7 +25,7 @@ export func Filter(in <-chan int, out chan<- int, prime int) { } // The prime sieve: Daisy-chain Filter processes together. -export func Sieve() { +func Sieve() { ch := make(chan int); // Create a new channel. go Generate(ch); // Start Generate() as a subprocess. for { diff --git a/test/test0.go b/test/test0.go index bb9f10f9c..95d225444 100644 --- a/test/test0.go +++ b/test/test0.go @@ -18,7 +18,7 @@ const ( mask4 = 1 << iota; ) -export type ( +type ( Empty interface {}; Point struct { x, y int; diff --git a/test/vectors.go b/test/vectors.go index f468f4b29..e5cbde2d5 100644 --- a/test/vectors.go +++ b/test/vectors.go @@ -9,7 +9,7 @@ package main import "array" -export type S struct { +type S struct { val int } |