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
3b37b028
Commit
3b37b028
authored
May 29, 2009
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 149
R=r OCL=29612 CL=29612
parent
47fe18bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
const.c
src/cmd/gc/const.c
+4
-1
bug149.go
test/fixedbugs/bug149.go
+0
-0
golden.out
test/golden.out
+0
-6
No files found.
src/cmd/gc/const.c
View file @
3b37b028
...
@@ -83,7 +83,6 @@ convlit1(Node *n, Type *t, int explicit)
...
@@ -83,7 +83,6 @@ convlit1(Node *n, Type *t, int explicit)
n
->
type
=
n
->
left
->
type
;
n
->
type
=
n
->
left
->
type
;
return
;
return
;
}
}
// avoided repeated calculations, errors
// avoided repeated calculations, errors
if
(
cvttype
(
n
->
type
,
t
))
{
if
(
cvttype
(
n
->
type
,
t
))
{
n
->
type
=
t
;
n
->
type
=
t
;
...
@@ -127,6 +126,10 @@ convlit1(Node *n, Type *t, int explicit)
...
@@ -127,6 +126,10 @@ convlit1(Node *n, Type *t, int explicit)
default:
default:
goto
bad
;
goto
bad
;
case
TSTRING
:
// let normal conversion code handle it
return
;
case
TPTR32
:
case
TPTR32
:
case
TPTR64
:
case
TPTR64
:
case
TINTER
:
case
TINTER
:
...
...
test/bugs/bug149.go
→
test/
fixed
bugs/bug149.go
View file @
3b37b028
File moved
test/golden.out
View file @
3b37b028
...
@@ -104,10 +104,6 @@ BUG should compile
...
@@ -104,10 +104,6 @@ BUG should compile
5 7
5 7
BUG: should crash
BUG: should crash
=========== bugs/bug149.go
bugs/bug149.go:14: cannot convert []uint8 constant to string
BUG: should compile
=========== fixedbugs/bug016.go
=========== fixedbugs/bug016.go
fixedbugs/bug016.go:7: constant -3 overflows uint
fixedbugs/bug016.go:7: constant -3 overflows uint
...
@@ -142,7 +138,6 @@ fixedbugs/bug039.go:6: variable x redeclared in this block
...
@@ -142,7 +138,6 @@ fixedbugs/bug039.go:6: variable x redeclared in this block
fixedbugs/bug041.go:5: export of incomplete type t
fixedbugs/bug041.go:5: export of incomplete type t
=========== fixedbugs/bug049.go
=========== fixedbugs/bug049.go
fixedbugs/bug049.go:6: cannot convert nil constant to string
fixedbugs/bug049.go:6: illegal types for operand: EQ
fixedbugs/bug049.go:6: illegal types for operand: EQ
string
string
nil
nil
...
@@ -154,7 +149,6 @@ fixedbugs/bug050.go:3: package statement must be first
...
@@ -154,7 +149,6 @@ fixedbugs/bug050.go:3: package statement must be first
fixedbugs/bug051.go:10: expression must be a constant
fixedbugs/bug051.go:10: expression must be a constant
=========== fixedbugs/bug062.go
=========== fixedbugs/bug062.go
fixedbugs/bug062.go:6: cannot convert nil constant to string
fixedbugs/bug062.go:6: illegal types for operand: AS
fixedbugs/bug062.go:6: illegal types for operand: AS
string
string
nil
nil
...
...
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