aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/expr.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/typecheck/expr.go')
-rw-r--r--src/cmd/compile/internal/typecheck/expr.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/cmd/compile/internal/typecheck/expr.go b/src/cmd/compile/internal/typecheck/expr.go
index 5752139c0b..12bfae67a8 100644
--- a/src/cmd/compile/internal/typecheck/expr.go
+++ b/src/cmd/compile/internal/typecheck/expr.go
@@ -35,14 +35,6 @@ func tcAddr(n *ir.AddrExpr) ir.Node {
if ir.Orig(r) != r {
base.Fatalf("found non-orig name node %v", r) // TODO(mdempsky): What does this mean?
}
- r.Name().SetAddrtaken(true)
- if r.Name().IsClosureVar() && !CaptureVarsComplete {
- // Mark the original variable as Addrtaken so that capturevars
- // knows not to pass it by value.
- // But if the capturevars phase is complete, don't touch it,
- // in case l.Name's containing function has not yet been compiled.
- r.Name().Defn.Name().SetAddrtaken(true)
- }
}
n.X = DefaultLit(n.X, nil)
if n.X.Type() == nil {