diff options
Diffstat (limited to 'src/cmd/compile/internal/noder/reader.go')
| -rw-r--r-- | src/cmd/compile/internal/noder/reader.go | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/cmd/compile/internal/noder/reader.go b/src/cmd/compile/internal/noder/reader.go index 8270c403fe..e69d8edc0b 100644 --- a/src/cmd/compile/internal/noder/reader.go +++ b/src/cmd/compile/internal/noder/reader.go @@ -1096,9 +1096,6 @@ func (r *reader) typeExt(name *ir.Name) { } name.SetPragma(r.pragmaFlag()) - if name.Pragma()&ir.NotInHeap != 0 { - typ.SetNotInHeap(true) - } typecheck.SetBaseTypeIndex(typ, r.Int64(), r.Int64()) } @@ -2440,16 +2437,6 @@ func (r *reader) expr() (res ir.Node) { // TODO(mdempsky): Stop constructing expressions of untyped type. x = typecheck.DefaultLit(x, typ) - if op, why := typecheck.Convertop(x.Op() == ir.OLITERAL, x.Type(), typ); op == ir.OXXX { - // types2 ensured that x is convertable to typ under standard Go - // semantics, but cmd/compile also disallows some conversions - // involving //go:notinheap. - // - // TODO(mdempsky): This can be removed after #46731 is implemented. - base.ErrorfAt(pos, "cannot convert %L to type %v%v", x, typ, why) - base.ErrorExit() // harsh, but prevents constructing invalid IR - } - ce := ir.NewConvExpr(pos, ir.OCONV, typ, x) ce.TypeWord, ce.SrcRType = typeWord, srcRType if implicit { |
