mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
SVN=123249
This commit is contained in:
parent
53ec6500bc
commit
504aa698f7
|
@ -9,17 +9,21 @@ void
|
|||
convlit(Node *n, Type *t)
|
||||
{
|
||||
int et;
|
||||
Node *n1;
|
||||
|
||||
if(n == N || n->op != OLITERAL || t == T)
|
||||
return;
|
||||
|
||||
if(t->etype == TANY || isptrto(t, TANY)) {
|
||||
defaultlit(n);
|
||||
return;
|
||||
}
|
||||
|
||||
et = t->etype;
|
||||
switch(whatis(n)) {
|
||||
default:
|
||||
goto bad1;
|
||||
|
||||
case Wlitnil:
|
||||
if(isptr[et] || et = TINTER)
|
||||
break;
|
||||
goto bad1;
|
||||
|
||||
case Wlitint:
|
||||
if(isptrto(t, TSTRING)) {
|
||||
Rune rune;
|
||||
|
|
Loading…
Reference in a new issue