1
0
mirror of https://github.com/golang/go synced 2024-11-06 00:36:14 -07:00
Commit Graph

349 Commits

Author SHA1 Message Date
Josh Bleecher Snyder
e7173dfdfd test: migrate remaining tests to run.go
* bug248, bug345, bug369, and bug429 were ported from bash commands to run scripts. bug369 remains disabled.
* bug395 is a test for issue 1909, which is still open. It is marked as skip now and will be usable with compile with run.go when issue 1909 is fixed.

Fixes #4139

Updates #1909

Change-Id: Ibb5fbfb5cf72ddc285829245318eeacd3fb5a636
Reviewed-on: https://go-review.googlesource.com/1774
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 22:41:34 +00:00
Rémy Oudompheng
9aef20e823 cmd/gc: fix wrong interaction between inlining and embedded builtins.
The patch makes the compile user an ordinary package-local
symbol for the name of embedded fields of builtin type.

This is incompatible with the fix delivered for issue 2687
(revision 3c060add43fb) but fixes it in a different way, because
the explicit symbol on the field makes the typechecker able to
find it in lookdot.

Fixes #3552.

R=lvd, rsc, daniel.morsing
CC=golang-dev
https://golang.org/cl/6866047
2012-12-22 19:16:31 +01:00
Russ Cox
cd22afa07b test: expand run.go's errorcheck, make clear which bugs run
Today, if run.go doesn't understand a test header line it just ignores
the test, making it too easy to write or edit tests that are not actually
being run.

- expand errorcheck to accept flags, so that bounds.go and escape*.go can run.
- create a whitelist of skippable tests in run.go; skipping others is an error.
- mark all skipped tests at top of file.

Update #4139.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6549054
2012-09-23 13:16:14 -04:00
Rémy Oudompheng
8f3c2055bd cmd/6g, cmd/8g: eliminate short integer arithmetic when possible.
Fixes #3909.
Fixes #3910.

R=rsc, nigeltao
CC=golang-dev
https://golang.org/cl/6442114
2012-09-01 16:40:54 +02:00
Russ Cox
ce69666273 exp/locale/collate: avoid 16-bit math
There's no need for the 16-bit arithmetic here,
and it tickles a long-standing compiler bug.
Fix the exp code not to use 16-bit math and
create an explicit test for the compiler bug.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6256048
2012-05-24 14:50:36 -04:00
Luuk van Dijk
81d9621534 cmd/gc: test for issue 3552
R=rsc
CC=golang-dev
https://golang.org/cl/6128051
2012-05-02 16:56:26 +02:00
Russ Cox
987a580b9f cmd/gc: do not confuse unexported methods of same name
Fixes #3146.

R=ken2
CC=golang-dev
https://golang.org/cl/5756074
2012-03-07 01:55:17 -05:00
Robert Griesemer
69015b6fc4 test: bug424: wrong embedded method called
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5695083
2012-02-27 18:52:40 -08:00
Russ Cox
290e68b983 gc: undo most of 'fix infinite recursion for embedded interfaces'
Preserve test.

changeset:   11593:f1deaf35e1d1
user:        Luuk van Dijk <lvd@golang.org>
date:        Tue Jan 17 10:00:57 2012 +0100
summary:     gc: fix infinite recursion for embedded interfaces

This is causing 'interface type loop' errors during compilation
of a complex program.  I don't understand what's happening
well enough to boil it down to a simple test case, but undoing
this change fixes the problem.

The change being undone is fixing a corner case (uses of
pointer to interface in an interface definition) that basically
only comes up in erroneous Go programs.  Let's not try to
fix this again until after Go 1.

Unfixes issue 1909.

TBR=lvd
CC=golang-dev
https://golang.org/cl/5555063
2012-01-20 17:14:09 -05:00
Russ Cox
1cb7f85d74 gc: 0 expected bugs
Now that Luuk's qualified exporting code
is in, fixing this bug is trivial.

R=ken2
CC=golang-dev
https://golang.org/cl/5479048
2011-12-09 14:58:28 -05:00
Ian Lance Taylor
5f172fadbe test: Add test for inheriting private method from anonymous field.
The spec says that all methods are inherited from an anonymous
field.  There is no exception for non-exported methods.

This is related to issue 1536.

R=rsc
CC=golang-dev
https://golang.org/cl/5012043
2011-09-14 10:31:51 -07:00
Anthony Martin
0b209b36b6 gc: relax assignability of method receivers
The spec was adjusted in commit df410d6a4842 to allow the
implicit assignment of strutures with unexported fields in
method receivers.  This change updates the compiler.

Also moved bug322 into fixedbugs and updated golden.out
to reflect the removal of the last known bug.

Fixes #1402.

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/4526069
2011-05-24 19:48:19 -04:00
Russ Cox
5ff3336490 gc: correct handling of unexported method names in embedded interfaces
go/types: update for export data format change
reflect: require package qualifiers to match during interface check
runtime: require package qualifiers to match during interface check
test: fixed bug324, adapt to be silent

Fixes #1550.
Issue 1536 remains open.

R=gri, ken2, r
CC=golang-dev
https://golang.org/cl/4442071
2011-04-21 08:14:50 -04:00
Ian Lance Taylor
3dbf65871c test: adjust bug324 to expect run-time failure, not compile-time.
Failing at compile time requires that for each conversion
between two interface types the compiler compare the sets of
unexported methods to see if they come from different
packages.  Since this test will fail approximately never on
real code, and since it can't catch all cases of the problem,
I don't think it's worth testing in the compiler.  This CL
changes this test to look for a run-time panic rather than a
compile-time error.

R=gri, rsc1, iant2, rsc
CC=golang-dev
https://golang.org/cl/4332041
2011-03-29 15:03:09 -07:00
Ian Lance Taylor
61c9d3f08a test: adjust bugs/bug322 to match current spec.
R=gri, rsc1
CC=golang-dev
https://golang.org/cl/4328041
2011-03-29 06:49:21 -07:00
Robert Griesemer
ad8b0d915b bug324.go: test case for issue 1550
Also: renamed fixedbugs/bug322.go to fixedbugs/bug323.go
because we already have a bugs/bug322.go and bug322.dir.

R=rsc
CC=golang-dev
https://golang.org/cl/4219044
2011-02-24 19:29:25 -08:00
Robert Griesemer
459da21603 issue 1402: added test case
R=rsc
CC=golang-dev
https://golang.org/cl/4079063
2011-02-03 20:35:14 -08:00
Russ Cox
dc9a3b2791 gc: align structs according to max alignment of fields
cc: same
runtime: test cc alignment (required moving #define of offsetof to runtime.h)
fix bug260

Fixes #482.
Fixes #609.

R=ken2, r
CC=golang-dev
https://golang.org/cl/3563042
2010-12-13 16:22:19 -05:00
Robert Griesemer
5667d82599 fix build
R=iant
CC=golang-dev, ken2
https://golang.org/cl/2182043
2010-09-15 17:00:00 -07:00
Ian Lance Taylor
b9988edbb6 test: Add test for //line (currently fails).
R=rsc
CC=golang-dev
https://golang.org/cl/2127045
2010-09-10 19:12:43 -07:00
Russ Cox
c6cb303a8a gc: bug299, bug300
R=ken2
CC=golang-dev
https://golang.org/cl/1731057
2010-08-03 00:53:32 -07:00
Robert Griesemer
500425ac7b bug300: literal types must not be parenthesized
( This CL is dependent on acceptance of
https://golang.org/cl/1913041/show )

R=go-dev
CC=golang-dev
https://golang.org/cl/1860045
2010-07-29 18:14:49 -07:00
Robert Griesemer
7734ad5179 bug299: parenthesized receiver types/anonymous fields are illegal
R=r
CC=golang-dev
https://golang.org/cl/1846051
2010-07-29 10:54:03 -07:00
Russ Cox
691d765121 gc: bug274
R=ken2
CC=golang-dev
https://golang.org/cl/1742044
2010-07-15 15:05:56 -07:00
Russ Cox
17f90c68c6 gc: fix handling of types inside function bodies
Fixes #849.
Fixes #920.

R=ken2
CC=golang-dev
https://golang.org/cl/1841042
2010-07-15 14:25:50 -07:00
Robert Griesemer
fb279e7347 bug286: test case
R=r
CC=golang-dev
https://golang.org/cl/1644042
2010-06-09 16:05:00 -07:00
Russ Cox
565b5dc076 gc: new typechecking rules
* Code for assignment, conversions now mirrors spec.
* Changed some snprint -> smprint.
* Renamed runtime functions to separate
  interface conversions from type assertions:
  convT2I, assertI2T, etc.
* Correct checking of \U sequences.

Fixes #840.
Fixes #830.
Fixes #778.

R=ken2
CC=golang-dev
https://golang.org/cl/1303042
2010-06-08 18:50:02 -07:00
Russ Cox
f892540513 fix build
R=gri
CC=golang-dev
https://golang.org/cl/1616041
2010-06-08 16:14:19 -07:00
Russ Cox
57a62a8bcb bug284: make conversion legal, fix error patterns
R=gri
CC=golang-dev
https://golang.org/cl/1612041
2010-06-08 15:51:31 -07:00
Russ Cox
2ec58f73e3 bug285: delete invalid map assignment
*T2 implements I2, but T2 does not.

R=gri
CC=golang-dev
https://golang.org/cl/1613041
2010-06-08 15:50:53 -07:00
Robert Griesemer
86c9aca41e bug285: assignment compatible map keys must be accepted
R=r
CC=golang-dev
https://golang.org/cl/1473042
2010-06-03 14:58:00 -07:00
Robert Griesemer
c0b378ff5c bug284: additional conversion test case
R=r, iant
CC=golang-dev
https://golang.org/cl/1433042
2010-06-02 10:36:19 -07:00
Robert Griesemer
3b1e4b217e bug284: test cases for new conversion rules
R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/1465041
2010-06-02 09:23:04 -07:00
Russ Cox
2e9b67afa6 gc: bug277 - new conversion syntax
R=ken2
CC=golang-dev
https://golang.org/cl/1220046
2010-05-24 15:25:30 -07:00
Robert Griesemer
2034f72139 bug277: tests for conversion syntax
- accepted by gccgo, gofmt
- some not accepted by 6g
- spec revision forthcoming

R=rsc
CC=golang-dev
https://golang.org/cl/1279041
2010-05-24 13:57:34 -07:00
Ken Thompson
333002bf53 clean up bug 275
R=rsc
CC=golang-dev
https://golang.org/cl/1224044
2010-05-20 21:01:59 -07:00
Robert Griesemer
ce7487baa8 bug275: cannot apply real() to a complex array element
R=r, ken2
CC=golang-dev
https://golang.org/cl/1260041
2010-05-19 13:10:00 -07:00
Robert Griesemer
434c4378c1 bug274: test case for issue 777
R=r, iant
CC=golang-dev
https://golang.org/cl/1195042
2010-05-13 11:52:04 -07:00
Russ Cox
32df678894 gc: bug264
Fixes #692.

R=ken2
CC=golang-dev
https://golang.org/cl/1092041
2010-05-03 17:51:48 -07:00
Russ Cox
b5f54db359 gc: bug267
R=ken2
CC=golang-dev
https://golang.org/cl/1067042
2010-05-03 15:29:59 -07:00
Robert Griesemer
d971f71703 6g bug: no need for parens around array index expression
where index is a composite literal

R=rsc
CC=golang-dev
https://golang.org/cl/961044
2010-04-27 13:09:32 -07:00
Russ Cox
3908c16ffe gc: bug265
Fixes #700.

R=ken2
CC=golang-dev
https://golang.org/cl/839041
2010-03-29 15:27:59 -07:00
Robert Griesemer
71f5fa3111 bug265: test case for issue 700
( http://code.google.com/p/go/issues/detail?id=700 )

R=r
CC=golang-dev
https://golang.org/cl/827042
2010-03-29 10:34:16 -07:00
Rob Pike
c93273c0f5 bug264 didn't report BUG correctly, caused "fail" from test/run
R=rsc, gri
CC=golang-dev
https://golang.org/cl/762041
2010-03-25 14:27:24 -07:00
Robert Griesemer
a291e998c1 bug264: test case for issue 692
R=r
CC=golang-dev
https://golang.org/cl/715042
2010-03-25 10:01:51 -07:00
Ian Lance Taylor
4b22e1bdb6 Generate same output on all architectures.
Passing an argument to bug260 will indicate which alignments
are wrong.

R=r
CC=golang-dev
https://golang.org/cl/231042
2010-03-05 10:43:33 -08:00
Rob Pike
6e3853e294 add a test that structures pack. 6g fails.
R=rsc
CC=golang-dev
https://golang.org/cl/237041
2010-03-04 15:26:15 -08:00
Russ Cox
1734cb02e7 gc: recursive interface embedding
Fixes #287.

R=ken2
CC=golang-dev
https://golang.org/cl/215048
2010-02-18 11:15:36 -08:00
Russ Cox
7b5789b584 gc: undo attempt at fixing recursive interface embedding
Fixes #582.

Update #287
Status: Accepted
Bug fix was too intrusive; undo and reopen issue.

R=ken2
CC=golang-dev
https://golang.org/cl/209044
2010-02-16 17:44:15 -08:00
Russ Cox
674458e1c4 gc: bug246
R=ken2
CC=golang-dev
https://golang.org/cl/198057
2010-02-01 23:05:15 -08:00