Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
cd40cd24
Commit
cd40cd24
authored
Dec 19, 2008
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix new(bool) error message
R=ken OCL=21616 CL=21616
parent
eee50ae1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
walk.c
src/cmd/gc/walk.c
+8
-8
No files found.
src/cmd/gc/walk.c
View file @
cd40cd24
...
...
@@ -2000,19 +2000,19 @@ Node*
newcompat
(
Node
*
n
)
{
Node
*
r
,
*
on
;
Type
*
t
;
Type
*
t
,
*
t0
;
t
=
n
->
type
;
if
(
t
==
T
)
t
0
=
n
->
type
;
if
(
t
0
==
T
)
goto
bad
;
if
(
t
->
etype
==
TARRAY
)
if
(
t
0
->
etype
==
TARRAY
)
return
arrayop
(
n
,
Erv
);
if
(
!
isptr
[
t
->
etype
]
||
t
->
type
==
T
)
if
(
!
isptr
[
t
0
->
etype
]
||
t0
->
type
==
T
)
goto
bad
;
t
=
t
->
type
;
t
=
t
0
->
type
;
switch
(
t
->
etype
)
{
case
TSTRING
:
goto
bad
;
...
...
@@ -2031,7 +2031,7 @@ newcompat(Node *n)
default:
if
(
n
->
left
!=
N
)
yyerror
(
"cannot new(
*%T, expr)"
,
t
);
yyerror
(
"cannot new(
%T, expr)"
,
t0
);
dowidth
(
t
);
on
=
syslook
(
"mal"
,
1
);
argtype
(
on
,
t
);
...
...
@@ -2044,7 +2044,7 @@ newcompat(Node *n)
return
r
;
bad:
yyerror
(
"cannot new(
*%T)"
,
t
);
yyerror
(
"cannot new(
%T)"
,
t0
);
return
n
;
}
...
...
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