Commit 7ea58297 authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile: a couple of minor comment fixes

Change-Id: If1d08a84c9295816489b1cfdd031ba12892ae963
Reviewed-on: https://go-review.googlesource.com/31598Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
parent 584e3ea2
...@@ -30,7 +30,7 @@ type Pkg struct { ...@@ -30,7 +30,7 @@ type Pkg struct {
// an object declared within a package, but Syms are also used to name internal // an object declared within a package, but Syms are also used to name internal
// synthesized objects. // synthesized objects.
// //
// As a special exception, field and method names that are exported use the Sym // As an exception, field and method names that are exported use the Sym
// associated with localpkg instead of the package that declared them. This // associated with localpkg instead of the package that declared them. This
// allows using Sym pointer equality to test for Go identifier uniqueness when // allows using Sym pointer equality to test for Go identifier uniqueness when
// handling selector expressions. // handling selector expressions.
...@@ -42,7 +42,7 @@ type Sym struct { ...@@ -42,7 +42,7 @@ type Sym struct {
// saved and restored by dcopy // saved and restored by dcopy
Pkg *Pkg Pkg *Pkg
Name string // variable name Name string // object name
Def *Node // definition: ONAME OTYPE OPACK or OLITERAL Def *Node // definition: ONAME OTYPE OPACK or OLITERAL
Block int32 // blocknumber to catch redeclaration Block int32 // blocknumber to catch redeclaration
Lastlineno int32 // last declaration for diagnostic Lastlineno int32 // last declaration for diagnostic
......
...@@ -3660,9 +3660,8 @@ func typecheckdef(n *Node) *Node { ...@@ -3660,9 +3660,8 @@ func typecheckdef(n *Node) *Node {
default: default:
Fatalf("typecheckdef %v", n.Op) Fatalf("typecheckdef %v", n.Op)
// not really syms case OGOTO, OLABEL, OPACK:
case OGOTO, OLABEL: // nothing to do here
break
case OLITERAL: case OLITERAL:
if n.Name.Param.Ntype != nil { if n.Name.Param.Ntype != nil {
...@@ -3770,10 +3769,6 @@ func typecheckdef(n *Node) *Node { ...@@ -3770,10 +3769,6 @@ func typecheckdef(n *Node) *Node {
if Curfn != nil { if Curfn != nil {
resumecheckwidth() resumecheckwidth()
} }
// nothing to see here
case OPACK:
break
} }
ret: ret:
......
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