mirror of
https://github.com/golang/go
synced 2024-11-24 12:10:03 -07:00
89c0dd829f
3 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Dan Scales
|
90a8482a17 |
test: re-enable most go/tests that were disabled because of types2 differences
I made the default be that, where there are differences between types2 and -G=0 error messages, we want errorcheck tests to pass types2. Typically, we can get errorcheck to pass on types2 and -G=0 if they give the same number of error messages on the same lines, just different wording. If they give a different number of error messages, then I made types2 pass. I added an exception list for -G=0 to cover those cases where -G=0 and types give different numbers of error messages. Because types2 does not run if there are syntax errors, for several tests, I had to split the tests into two parts in order to get all the indicated errors to be reported in types2 (bug228.go, bug388.go, issue11610.go, issue14520.go) I tried to preserve the GCCGO labeling correctly (but may have gotten some wrong). When types2 now matches where a GCCGO error previously occurred, I transformed GCCGO_ERROR -> ERROR. When types2 no longer reports an error in a certain place, I transformed ERROR -> GCCGO_ERROR. When types2 reports an error in a new place, I used GC_ERROR. The remaining entries in types2Failures are things that I think we probably still need to fix - either actually missing errors in types2, or cases where types2 gives worse errors than -G=0. Change-Id: I7f01e82b322b16094096b67d7ed2bb39b410c34f Reviewed-on: https://go-review.googlesource.com/c/go/+/372854 Trust: Dan Scales <danscales@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> |
||
Ian Lance Taylor
|
ce61ccca8f |
test: match gofrontend error messages
fixedbugs/issue14136.go:17:16: error: unknown field ‘X’ in ‘T’ fixedbugs/issue14136.go:18:13: error: incompatible type in initialization (cannot use type int as type string) fixedbugs/issue14520.go:9:37: error: import path contains control character fixedbugs/issue14520.go:14:2: error: expected ‘)’ fixedbugs/issue14520.go:14:3: error: expected declaration fixedbugs/issue14652.go:9:7: error: use of undefined type ‘any’ fixedbugs/issue14729.go:13:17: error: embedded type may not be a pointer fixedbugs/issue15514.dir/c.go:10: error: incompatible type in initialization fixedbugs/issue15898.go:11:9: error: duplicate type in switch fixedbugs/issue15898.go:16:9: error: duplicate type in switch fixedbugs/issue16439.go:10:21: error: index expression is negative fixedbugs/issue16439.go:13:21: error: index expression is negative fixedbugs/issue16439.go:16:21: error: index expression is not integer constant fixedbugs/issue16439.go:18:22: error: index expression is not integer constant fixedbugs/issue17328.go:11:20: error: expected ‘{’ fixedbugs/issue17328.go:11:20: error: expected ‘;’ or ‘}’ or newline fixedbugs/issue17328.go:13:1: error: expected declaration fixedbugs/issue17588.go:14:15: error: expected type fixedbugs/issue17631.go:20:17: error: unknown field ‘updates’ in ‘unnamed struct’ fixedbugs/issue17645.go:15:13: error: incompatible type in initialization fixedbugs/issue17758.go:13:1: error: redefinition of ‘foo’ fixedbugs/issue17758.go:9:1: note: previous definition of ‘foo’ was here fixedbugs/issue18092.go:13:19: error: expected colon fixedbugs/issue18231.go:17:12: error: may only omit types within composite literals of slice, array, or map type fixedbugs/issue18393.go:24:38: error: expected type fixedbugs/issue18419.dir/test.go:12: error: reference to unexported field or method 'member' fixedbugs/issue18655.go:14:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:15:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:16:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:17:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:18:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:20:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:21:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:22:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18915.go:13:20: error: expected ‘;’ after statement in if expression fixedbugs/issue18915.go:16:21: error: parse error in for statement fixedbugs/issue18915.go:19:24: error: expected ‘;’ after statement in switch expression fixedbugs/issue18915.go:13:12: error: ‘a’ declared but not used fixedbugs/issue18915.go:16:13: error: ‘b’ declared but not used fixedbugs/issue18915.go:19:16: error: ‘c’ declared but not used fixedbugs/issue19012.go:16:17: error: return with value in function with no return type fixedbugs/issue19012.go:18:9: error: return with value in function with no return type fixedbugs/issue19012.go:22:16: error: argument 2 has incompatible type (cannot use type bool as type uint) fixedbugs/issue19012.go:22:9: error: too many arguments fixedbugs/issue19012.go:22:16: error: incompatible types in binary expression fixedbugs/issue19012.go:24:9: error: too many arguments fixedbugs/issue19056.go:9:9: error: expected operand fixedbugs/issue19056.go:9:9: error: expected ‘;’ or newline after top level declaration fixedbugs/issue19482.go:25:15: error: expected struct field name fixedbugs/issue19482.go:27:15: error: expected struct field name fixedbugs/issue19482.go:31:19: error: expected struct field name fixedbugs/issue19482.go:33:15: error: expected struct field name fixedbugs/issue19667.go:13:1: error: expected operand fixedbugs/issue19667.go:13:1: error: missing ‘)’ fixedbugs/issue19667.go:13:105: error: expected ‘;’ after statement in if expression fixedbugs/issue19667.go:13:105: error: expected ‘{’ fixedbugs/issue19667.go:12:19: error: reference to undefined name ‘http’ Change-Id: Ia9c75b9c78671f354f0a0623dbc075157ef8f181 Reviewed-on: https://go-review.googlesource.com/c/go/+/277433 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> Reviewed-by: Cherry Zhang <cherryyz@google.com> |
||
Emmanuel Odeke
|
19d2061d50 |
cmd/compile: suppress callsite signatures if any type is unknown
Fixes #19012. Fallback to return signatures without detailed types. These error message will be of the form of issue: * https://golang.org/issues/4215 * https://golang.org/issues/6750 So: func f(x int, y uint) { return x > y } f(10, "a" < 3) will give errors: too many errors to return too many arguments in call to f instead of: too many errors to return have (<T>) want () too many arguments in call to f have (number, <T>) want (number, number) Change-Id: I680abc7cdd8444400e234caddf3ff49c2d69f53d Reviewed-on: https://go-review.googlesource.com/36806 Reviewed-by: Robert Griesemer <gri@golang.org> |