Commit a14b28a2 authored by Russ Cox's avatar Russ Cox

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
parent 7af032b8
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment