summaryrefslogtreecommitdiff
path: root/test/assign.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-01-17 12:40:45 +0100
committerOndřej Surý <ondrej@sury.org>2011-01-17 12:40:45 +0100
commit3e45412327a2654a77944249962b3652e6142299 (patch)
treebc3bf69452afa055423cbe0c5cfa8ca357df6ccf /test/assign.go
parentc533680039762cacbc37db8dc7eed074c3e497be (diff)
downloadgolang-upstream/2011.01.12.tar.gz
Imported Upstream version 2011.01.12upstream/2011.01.12
Diffstat (limited to 'test/assign.go')
-rw-r--r--test/assign.go48
1 files changed, 24 insertions, 24 deletions
diff --git a/test/assign.go b/test/assign.go
index fea7c2828..59471388c 100644
--- a/test/assign.go
+++ b/test/assign.go
@@ -9,45 +9,45 @@ package main
import "sync"
type T struct {
- int;
- sync.Mutex;
+ int
+ sync.Mutex
}
func main() {
{
- var x, y sync.Mutex;
- x = y; // ERROR "assignment.*Mutex"
- _ = x;
+ var x, y sync.Mutex
+ x = y // ERROR "assignment.*Mutex"
+ _ = x
}
{
- var x, y T;
- x = y; // ERROR "assignment.*Mutex"
- _ = x;
+ var x, y T
+ x = y // ERROR "assignment.*Mutex"
+ _ = x
}
{
- var x, y [2]sync.Mutex;
- x = y; // ERROR "assignment.*Mutex"
- _ = x;
+ var x, y [2]sync.Mutex
+ x = y // ERROR "assignment.*Mutex"
+ _ = x
}
{
- var x, y [2]T;
- x = y; // ERROR "assignment.*Mutex"
- _ = x;
+ var x, y [2]T
+ x = y // ERROR "assignment.*Mutex"
+ _ = x
}
{
- x := sync.Mutex{0, 0}; // ERROR "assignment.*Mutex"
- _ = x;
+ x := sync.Mutex{0, 0} // ERROR "assignment.*Mutex"
+ _ = x
}
{
- x := sync.Mutex{key: 0}; // ERROR "(unknown|assignment).*Mutex"
- _ = x;
+ x := sync.Mutex{key: 0} // ERROR "(unknown|assignment).*Mutex"
+ _ = x
}
{
- x := &sync.Mutex{}; // ok
- var y sync.Mutex; // ok
- y = *x; // ERROR "assignment.*Mutex"
- *x = y; // ERROR "assignment.*Mutex"
- _ = x;
- _ = y;
+ x := &sync.Mutex{} // ok
+ var y sync.Mutex // ok
+ y = *x // ERROR "assignment.*Mutex"
+ *x = y // ERROR "assignment.*Mutex"
+ _ = x
+ _ = y
}
}