]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: remove period from "not allowed in runtime" errors
authorMatthew Dempsky <mdempsky@google.com>
Mon, 14 Oct 2019 19:16:52 +0000 (12:16 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 14 Oct 2019 19:32:08 +0000 (19:32 +0000)
We don't punctuate compiler diagnostics.

Change-Id: I19e1f30fbf04f0d1bfe6648fae26beaf3a06ee92
Reviewed-on: https://go-review.googlesource.com/c/go/+/201077
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/closure.go
src/cmd/compile/internal/gc/esc.go
src/cmd/compile/internal/gc/walk.go
test/fixedbugs/issue14999.go

index 055ddbae331dcf61256ad34828e7f4e9287b27eb..f00fd59f86d0c2bb51934e63f955716b5399f2dc 100644 (file)
@@ -345,7 +345,7 @@ func closuredebugruntimecheck(clo *Node) {
                }
        }
        if compiling_runtime && clo.Esc == EscHeap {
-               yyerrorl(clo.Pos, "heap-allocated closure, not allowed in runtime.")
+               yyerrorl(clo.Pos, "heap-allocated closure, not allowed in runtime")
        }
 }
 
index ee2a27cb7ee1073480767bf9d302458048cf6f6a..725e7410c4990b6de441dd242270f09dae7935aa 100644 (file)
@@ -251,7 +251,7 @@ func moveToHeap(n *Node) {
                Dump("MOVE", n)
        }
        if compiling_runtime {
-               yyerror("%v escapes to heap, not allowed in runtime.", n)
+               yyerror("%v escapes to heap, not allowed in runtime", n)
        }
        if n.Class() == PAUTOHEAP {
                Dump("n", n)
index bebb9b6afe55cba7d90f52a29079262fb4323be2..39d1ab689d276c89386c5e074cbaa98adf34f38d 100644 (file)
@@ -195,7 +195,7 @@ func walkstmt(n *Node) *Node {
                v := n.Left
                if v.Class() == PAUTOHEAP {
                        if compiling_runtime {
-                               yyerror("%v escapes to heap, not allowed in runtime.", v)
+                               yyerror("%v escapes to heap, not allowed in runtime", v)
                        }
                        if prealloc[v] == nil {
                                prealloc[v] = callnew(v.Type)
index 6ce768e23b91c22b63e4c9cccd16a08df0ac7aeb..b648441fc29779b1f202a20b9056da176f32e59f 100644 (file)
@@ -7,11 +7,11 @@
 package p
 
 func f(x int) func(int) int {
-       return func(y int) int { return x + y } // ERROR "heap-allocated closure, not allowed in runtime."
+       return func(y int) int { return x + y } // ERROR "heap-allocated closure, not allowed in runtime"
 }
 
-func g(x int) func(int) int { // ERROR "x escapes to heap, not allowed in runtime."
-       return func(y int) int { // ERROR "heap-allocated closure, not allowed in runtime."
+func g(x int) func(int) int { // ERROR "x escapes to heap, not allowed in runtime"
+       return func(y int) int { // ERROR "heap-allocated closure, not allowed in runtime"
                x += y
                return x + y
        }