mirror of
https://github.com/golang/go
synced 2024-11-18 15:34:53 -07:00
f78efc0178
5 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Ian Lance Taylor
|
6d2b3351f6 |
test: match gofrontend error messages
fixedbugs/bug13343.go:10:12: error: initialization expressions for ‘b’ and ‘c’ depend upon each other fixedbugs/bug13343.go:11:9: note: ‘c’ defined here fixedbugs/bug13343.go:11:9: error: initialization expression for ‘c’ depends upon itself fixedbugs/bug13343.go:11:9: error: initialization expressions for ‘c’ and ‘b’ depend upon each other fixedbugs/bug13343.go:10:12: note: ‘b’ defined here fixedbugs/issue10700.dir/test.go:24:10: error: reference to method ‘Do’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:25:10: error: reference to method ‘do’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:27:10: error: reference to method ‘Dont’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:28:13: error: reference to undefined field or method ‘Dont’ fixedbugs/issue10700.dir/test.go:31:10: error: reference to undefined field or method ‘do’ fixedbugs/issue10700.dir/test.go:33:13: error: reference to undefined field or method ‘do’ fixedbugs/issue10700.dir/test.go:34:10: error: reference to undefined field or method ‘Dont’ fixedbugs/issue10700.dir/test.go:35:13: error: reference to undefined field or method ‘Dont’ fixedbugs/issue10700.dir/test.go:37:10: error: reference to method ‘Do’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:38:10: error: reference to method ‘do’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:40:13: error: reference to undefined field or method ‘do’ fixedbugs/issue10700.dir/test.go:41:10: error: reference to method ‘Dont’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:42:13: error: reference to undefined field or method ‘Dont’ fixedbugs/issue10700.dir/test.go:43:10: error: reference to method ‘secret’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:44:13: error: reference to unexported field or method ‘secret’ fixedbugs/issue10975.go:13:9: error: interface contains embedded non-interface fixedbugs/issue11326.go:26:17: error: floating-point constant overflow fixedbugs/issue11326.go:27:17: error: floating-point constant overflow fixedbugs/issue11326.go:28:17: error: floating-point constant overflow fixedbugs/issue11361.go:9:11: error: import file ‘fmt’ not found fixedbugs/issue11361.go:11:11: error: reference to undefined name ‘fmt’ fixedbugs/issue11371.go:12:15: error: floating-point constant truncated to integer fixedbugs/issue11371.go:13:15: error: integer constant overflow fixedbugs/issue11371.go:17:15: error: floating-point constant truncated to integer fixedbugs/issue11590.go:9:17: error: integer constant overflow fixedbugs/issue11590.go:9:17: error: integer constant overflow fixedbugs/issue11590.go:10:22: error: complex real part overflow fixedbugs/issue11590.go:10:22: error: complex real part overflow fixedbugs/issue11590.go:11:23: error: complex real part overflow fixedbugs/issue11590.go:11:23: error: complex real part overflow fixedbugs/issue11590.go:9:19: error: integer constant overflow fixedbugs/issue11590.go:10:24: error: complex real part overflow fixedbugs/issue11590.go:11:25: error: complex real part overflow fixedbugs/issue11610.go:11:7: error: import path is empty fixedbugs/issue11610.go:12:4: error: invalid character 0x3f in input file fixedbugs/issue11610.go:14:1: error: expected identifier fixedbugs/issue11610.go:14:1: error: expected type fixedbugs/issue11614.go:14:9: error: interface contains embedded non-interface fixedbugs/issue13248.go:13:1: error: expected operand fixedbugs/issue13248.go:13:1: error: missing ‘)’ fixedbugs/issue13248.go:12:5: error: reference to undefined name ‘foo’ fixedbugs/issue13266.go:10:8: error: package name must be an identifier fixedbugs/issue13266.go:10:8: error: expected ‘;’ or newline after package clause fixedbugs/issue13266.go:10:8: error: expected declaration fixedbugs/issue13273.go:50:18: error: expected ‘chan’ fixedbugs/issue13273.go:53:24: error: expected ‘chan’ fixedbugs/issue13274.go:11:58: error: expected ‘}’ fixedbugs/issue13365.go:14:19: error: index expression is negative fixedbugs/issue13365.go:15:21: error: index expression is negative fixedbugs/issue13365.go:16:22: error: index expression is negative fixedbugs/issue13365.go:19:13: error: some element keys in composite literal are out of range fixedbugs/issue13365.go:22:19: error: incompatible type for element 1 in composite literal fixedbugs/issue13365.go:23:21: error: incompatible type for element 1 in composite literal fixedbugs/issue13365.go:24:22: error: incompatible type for element 1 in composite literal fixedbugs/issue13415.go:14:5: error: redefinition of ‘x’ fixedbugs/issue13415.go:14:5: note: previous definition of ‘x’ was here fixedbugs/issue13415.go:14:5: error: ‘x’ declared but not used fixedbugs/issue13471.go:12:25: error: floating-point constant truncated to integer fixedbugs/issue13471.go:13:25: error: floating-point constant truncated to integer fixedbugs/issue13471.go:14:25: error: floating-point constant truncated to integer fixedbugs/issue13471.go:15:24: error: floating-point constant truncated to integer fixedbugs/issue13471.go:16:23: error: floating-point constant truncated to integer fixedbugs/issue13471.go:18:26: error: floating-point constant truncated to integer fixedbugs/issue13471.go:19:26: error: floating-point constant truncated to integer fixedbugs/issue13471.go:20:26: error: floating-point constant truncated to integer fixedbugs/issue13471.go:21:25: error: floating-point constant truncated to integer fixedbugs/issue13471.go:22:24: error: floating-point constant truncated to integer fixedbugs/issue13471.go:24:24: error: floating-point constant truncated to integer fixedbugs/issue13821b.go:18:12: error: incompatible types in binary expression fixedbugs/issue13821b.go:19:13: error: incompatible types in binary expression fixedbugs/issue13821b.go:20:13: error: incompatible types in binary expression fixedbugs/issue13821b.go:21:13: error: incompatible types in binary expression fixedbugs/issue13821b.go:22:13: error: incompatible types in binary expression fixedbugs/issue13821b.go:24:12: error: incompatible types in binary expression fixedbugs/issue14006.go:24:18: error: expected ‘;’ or ‘}’ or newline fixedbugs/issue14006.go:30:18: error: expected ‘;’ or ‘}’ or newline fixedbugs/issue14006.go:37:22: error: expected ‘;’ or ‘}’ or newline fixedbugs/issue14006.go:43:22: error: expected ‘;’ or ‘}’ or newline fixedbugs/issue14006.go:59:17: note: previous definition of ‘labelname’ was here fixedbugs/issue14006.go:64:17: error: label ‘labelname’ already defined fixedbugs/issue14006.go:24:17: error: value computed is not used fixedbugs/issue14006.go:30:17: error: value computed is not used fixedbugs/issue14006.go:37:20: error: value computed is not used fixedbugs/issue14006.go:43:20: error: value computed is not used fixedbugs/issue14006.go:59:17: error: label ‘labelname’ defined and not used fixedbugs/issue14010.go:13:14: error: invalid left hand side of assignment fixedbugs/issue14010.go:14:14: error: invalid left hand side of assignment fixedbugs/issue14010.go:14:9: error: invalid use of type fixedbugs/issue14321.go:30:10: error: method ‘F’ is ambiguous in type ‘C’ fixedbugs/issue14321.go:31:10: error: ‘G’ is ambiguous via ‘A’ and ‘B’ fixedbugs/issue14321.go:33:10: error: type ‘C’ has no method ‘I’ fixedbugs/issue8183.go:12:14: error: integer constant overflow fixedbugs/issue9036.go:21:12: error: invalid prefix for floating constant fixedbugs/issue9036.go:22:12: error: invalid prefix for floating constant fixedbugs/issue9076.go:14:5: error: incompatible type in initialization (cannot use type uintptr as type int32) fixedbugs/issue9076.go:15:5: error: incompatible type in initialization (cannot use type uintptr as type int32) For issue9083.go avoid an error about a variable that is set but not used. fixedbugs/issue9370.go:105:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:106:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:107:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:108:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:109:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:110:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:112:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:113:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:114:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:115:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:116:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:117:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:119:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:119:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:36:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:39:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:43:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:46:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:50:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:53:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:56:15: error: incompatible types in binary expression fixedbugs/issue9370.go:57:15: error: incompatible types in binary expression fixedbugs/issue9370.go:58:15: error: incompatible types in binary expression fixedbugs/issue9370.go:59:15: error: incompatible types in binary expression fixedbugs/issue9370.go:60:15: error: incompatible types in binary expression fixedbugs/issue9370.go:61:15: error: incompatible types in binary expression fixedbugs/issue9370.go:65:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:68:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:70:15: error: incompatible types in binary expression fixedbugs/issue9370.go:71:15: error: incompatible types in binary expression fixedbugs/issue9370.go:72:15: error: incompatible types in binary expression fixedbugs/issue9370.go:73:15: error: incompatible types in binary expression fixedbugs/issue9370.go:74:15: error: incompatible types in binary expression fixedbugs/issue9370.go:75:15: error: incompatible types in binary expression fixedbugs/issue9370.go:77:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:78:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:79:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:80:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:81:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:82:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:84:15: error: incompatible types in binary expression fixedbugs/issue9370.go:85:15: error: incompatible types in binary expression fixedbugs/issue9370.go:86:15: error: incompatible types in binary expression fixedbugs/issue9370.go:87:15: error: incompatible types in binary expression fixedbugs/issue9370.go:88:15: error: incompatible types in binary expression fixedbugs/issue9370.go:89:15: error: incompatible types in binary expression fixedbugs/issue9370.go:91:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:92:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:93:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:94:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:95:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:96:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:98:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:99:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go💯15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:101:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:102:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:103:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:121:15: error: incompatible types in binary expression fixedbugs/issue9370.go:122:15: error: incompatible types in binary expression fixedbugs/issue9370.go:123:15: error: incompatible types in binary expression fixedbugs/issue9370.go:124:15: error: incompatible types in binary expression Change-Id: I4089de4919112b08f5f2bbec20f84fcc7dbe3955 Reviewed-on: https://go-review.googlesource.com/c/go/+/276832 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> |
||
Robert Griesemer
|
ceb849dd97 |
cmd/compile: accept new Go2 number literals
This CL introduces compiler support for the new binary and octal integer literals, hexadecimal floats, and digit separators for all number literals. The new Go 2 number literal scanner accepts the following liberal format: number = [ prefix ] digits [ "." digits ] [ exponent ] [ "i" ] . prefix = "0" [ "b" |"B" | "o" | "O" | "x" | "X" ] . digits = { digit | "_" } . exponent = ( "e" | "E" | "p" | "P" ) [ "+" | "-" ] digits . If the number starts with "0x" or "0X", digit is any hexadecimal digit; otherwise, digit is any decimal digit. If the accepted number is not valid, errors are reported accordingly. See the new test cases in scanner_test.go for a selection of valid and invalid numbers and the respective error messages. R=Go1.13 Updates #12711. Updates #19308. Updates #28493. Updates #29008. Change-Id: Ic8febc7bd4dc5186b16a8c8897691e81125cf0ca Reviewed-on: https://go-review.googlesource.com/c/157677 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> |
||
Emmanuel Odeke
|
53fd522c0d |
all: make copyright headers consistent with one space after period
Follows suit with https://go-review.googlesource.com/#/c/20111. Generated by running $ grep -R 'Go Authors. All' * | cut -d":" -f1 | while read F;do perl -pi -e 's/Go Authors. All/Go Authors. All/g' $F;done The code in cmd/internal/unvendor wasn't changed. Fixes #15213 Change-Id: I4f235cee0a62ec435f9e8540a1ec08ae03b1a75f Reviewed-on: https://go-review.googlesource.com/21819 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> |
||
Robert Griesemer
|
ed1a5e5da6 |
cmd/compile: cleanup number lexing
Change-Id: Ib0dd458d4ab1c58a2baf36491e288ac32e2ff99e Reviewed-on: https://go-review.googlesource.com/19962 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> |
||
David Chase
|
596bb76248 |
cmd/compile: reject p-notation floats in Go source files
Use pkgimport == nil (or not) to distinguish between parsing .go source files where "p" exponent specifier is not allowed and parsing .a or .o export data where it is. Use that to control error when p-exponent is seen. Fixes #9036 Change-Id: I8924f09c91d4945ef3f20e80a6e544008a94a7e4 Reviewed-on: https://go-review.googlesource.com/10450 Reviewed-by: Russ Cox <rsc@golang.org> |