Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(668)

Unified Diff: test/declbad.go

Issue 3991043: code review 3991043: delete float, complex - code changes (Closed)
Patch Set: code review 3991043: delete float, complex - code changes Created 14 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/decl.go ('k') | test/fixedbugs/bug006.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/declbad.go
===================================================================
--- a/test/declbad.go
+++ b/test/declbad.go
@@ -8,51 +8,51 @@
package main
-func f1() int { return 1 }
-func f2() (float, int) { return 1, 2 }
-func f3() (float, int, string) { return 1, 2, "3" }
+func f1() int { return 1 }
+func f2() (float32, int) { return 1, 2 }
+func f3() (float32, int, string) { return 1, 2, "3" }
func main() {
{
// simple redeclaration
i := f1()
- i := f1() // ERROR "redeclared|no new"
+ i := f1() // ERROR "redeclared|no new"
_ = i
}
{
// change of type for f
i, f, s := f3()
- f, g, t := f3() // ERROR "redeclared|cannot assign|incompatible"
+ f, g, t := f3() // ERROR "redeclared|cannot assign|incompatible"
_, _, _, _, _ = i, f, s, g, t
}
{
// change of type for i
i, f, s := f3()
- j, i, t := f3() // ERROR "redeclared|cannot assign|incompatible"
+ j, i, t := f3() // ERROR "redeclared|cannot assign|incompatible"
_, _, _, _, _ = i, f, s, j, t
}
{
// no new variables
i, f, s := f3()
- i, f := f2() // ERROR "redeclared|no new"
+ i, f := f2() // ERROR "redeclared|no new"
_, _, _ = i, f, s
}
{
// single redeclaration
i, f, s := f3()
- i := f1() // ERROR "redeclared|no new|incompatible"
+ i := f1() // ERROR "redeclared|no new|incompatible"
_, _, _ = i, f, s
}
- // double redeclaration
+ // double redeclaration
{
i, f, s := f3()
- i, f := f2() // ERROR "redeclared|no new"
+ i, f := f2() // ERROR "redeclared|no new"
_, _, _ = i, f, s
}
{
// triple redeclaration
i, f, s := f3()
- i, f, s := f3() // ERROR "redeclared|no new"
+ i, f, s := f3() // ERROR "redeclared|no new"
_, _, _ = i, f, s
}
}
« no previous file with comments | « test/decl.go ('k') | test/fixedbugs/bug006.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b