Commit 6531fab0 authored by Tal Shprecher's avatar Tal Shprecher Committed by Matthew Dempsky

cmd/compile: remove unnecessary assignments while type checking.

Change-Id: Ica0ec84714d7f01d800d62fa10cdb08321d43cf3
Reviewed-on: https://go-review.googlesource.com/21967Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
parent 6af4e996
......@@ -338,7 +338,6 @@ OpSwitch:
ok |= Etype
if n.Type == nil {
n.Type = nil
return n
}
......@@ -449,7 +448,6 @@ OpSwitch:
n.Op = OTYPE
n.Type = tointerface(n.List.Slice())
if n.Type == nil {
n.Type = nil
return n
}
......@@ -458,7 +456,6 @@ OpSwitch:
n.Op = OTYPE
n.Type = functype(n.Left, n.List.Slice(), n.Rlist.Slice())
if n.Type == nil {
n.Type = nil
return n
}
n.Left = nil
......@@ -822,7 +819,6 @@ OpSwitch:
ok |= Erv
n = typecheckcomplit(n)
if n.Type == nil {
n.Type = nil
return n
}
break OpSwitch
......@@ -864,7 +860,6 @@ OpSwitch:
if n.Type.Etype != TFUNC || n.Type.Recv() == nil {
Yyerror("type %v has no method %v", n.Left.Type, Sconv(n.Right.Sym, FmtShort))
n.Type = nil
n.Type = nil
return n
}
......@@ -1961,7 +1956,6 @@ OpSwitch:
ok |= Erv
typecheckclosure(n, top)
if n.Type == nil {
n.Type = nil
return n
}
break OpSwitch
......
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