mirror of
https://github.com/golang/go
synced 2024-11-20 04:54:44 -07:00
fix bug involving typed nil constants:
interface = (*int)(nil) is not the same as interface = nil. package main func main() { var x interface{} = (*int)(nil); println(x.(*int)); } R=ken OCL=31232 CL=31232
This commit is contained in:
parent
7af032b87b
commit
a14b28a24d
@ -94,7 +94,7 @@ convlit1(Node *n, Type *t, int explicit)
|
||||
goto bad;
|
||||
|
||||
if(et == TINTER) {
|
||||
if(ct == CTNIL) {
|
||||
if(ct == CTNIL && n->type == types[TNIL]) {
|
||||
n->type = t;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user