Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
71983af4
Commit
71983af4
authored
Nov 08, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug212, bug213.
R=ken
http://go/go-review/1026032
parent
b1a52ce4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
18 deletions
+28
-18
src/cmd/gc/print.c
src/cmd/gc/print.c
+7
-0
src/cmd/gc/subr.c
src/cmd/gc/subr.c
+12
-7
src/cmd/gc/swt.c
src/cmd/gc/swt.c
+7
-3
src/pkg/debug/dwarf/open.go
src/pkg/debug/dwarf/open.go
+1
-1
test/fixedbugs/bug212.go
test/fixedbugs/bug212.go
+1
-1
test/fixedbugs/bug213.go
test/fixedbugs/bug213.go
+0
-0
test/golden.out
test/golden.out
+0
-6
No files found.
src/cmd/gc/print.c
View file @
71983af4
...
...
@@ -328,6 +328,13 @@ exprfmt(Fmt *f, Node *n, int prec)
}
fmtprint
(
f
,
")"
);
break
;
case
OMAKEMAP
:
fmtprint
(
f
,
"make(%#T)"
,
n
->
type
);
break
;
case
OMAPLIT
:
fmtprint
(
f
,
"map literal"
);
}
if
(
prec
>
nprec
)
...
...
src/cmd/gc/subr.c
View file @
71983af4
...
...
@@ -1654,7 +1654,7 @@ iscomposite(Type *t)
int
eqtype1
(
Type
*
t1
,
Type
*
t2
,
int
d
,
int
names
)
{
if
(
d
>=
1
0
)
if
(
d
>=
2
0
)
return
1
;
if
(
t1
==
t2
)
return
1
;
...
...
@@ -1720,14 +1720,19 @@ eqtype1(Type *t1, Type *t2, int d, int names)
return
1
;
case
TARRAY
:
if
(
t1
->
bound
=
=
t2
->
bound
)
break
;
return
0
;
if
(
t1
->
bound
!
=
t2
->
bound
)
return
0
;
break
;
case
TCHAN
:
if
(
t1
->
chan
==
t2
->
chan
)
break
;
return
0
;
if
(
t1
->
chan
!=
t2
->
chan
)
return
0
;
break
;
case
TMAP
:
if
(
!
eqtype1
(
t1
->
down
,
t2
->
down
,
d
+
1
,
names
))
return
0
;
break
;
}
return
eqtype1
(
t1
->
type
,
t2
->
type
,
d
+
1
,
names
);
}
...
...
src/cmd/gc/swt.c
View file @
71983af4
...
...
@@ -313,9 +313,13 @@ casebody(Node *sw, Node *typeswvar)
// botch - shouldnt fall thru declaration
last
=
stat
->
end
->
n
;
if
(
last
->
op
==
OXFALL
)
if
(
last
->
op
==
OXFALL
)
{
if
(
typeswvar
)
{
setlineno
(
last
);
yyerror
(
"cannot fallthrough in type switch"
);
}
last
->
op
=
OFALL
;
else
}
else
stat
=
list
(
stat
,
br
);
}
...
...
@@ -771,7 +775,7 @@ walkswitch(Node *sw)
sw
->
ntest
=
nodbool
(
1
);
typecheck
(
&
sw
->
ntest
,
Erv
);
}
if
(
sw
->
ntest
->
op
==
OTYPESW
)
{
typeswitch
(
sw
);
//dump("sw", sw);
...
...
src/pkg/debug/dwarf/open.go
View file @
71983af4
...
...
@@ -51,7 +51,7 @@ func New(abbrev, aranges, frame, info, line, pubnames, ranges, str []byte) (*Dat
ranges
:
ranges
,
str
:
str
,
abbrevCache
:
make
(
map
[
uint32
]
abbrevTable
),
typeCache
:
make
(
map
[
uint32
]
Type
),
typeCache
:
make
(
map
[
Offset
]
Type
),
};
// Sniff .debug_info to figure out byte order.
...
...
test/bugs/bug212.go
→
test/
fixed
bugs/bug212.go
View file @
71983af4
...
...
@@ -5,7 +5,7 @@
// license that can be found in the LICENSE file.
package
main
type
I
int
type
I
int
type
S
struct
{
f
map
[
I
]
int
}
var
v1
=
S
{
make
(
map
[
int
]
int
)
}
// ERROR "cannot|illegal|incompatible|wrong"
var
v2
map
[
I
]
int
=
map
[
int
]
int
{}
// ERROR "cannot|illegal|incompatible|wrong"
...
...
test/bugs/bug213.go
→
test/
fixed
bugs/bug213.go
View file @
71983af4
File moved
test/golden.out
View file @
71983af4
...
...
@@ -201,9 +201,3 @@ throw: interface conversion
panic PC=xxx
== bugs/
=========== bugs/bug212.go
BUG: errchk: command succeeded unexpectedly
=========== bugs/bug213.go
BUG: errchk: command succeeded unexpectedly
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment