Skip to content

Commit 4bfcb2f

Browse files
authored
Merge pull request gopherjs#1139 from cuishuang/master
fix some typos
2 parents 2d12e51 + ee15c78 commit 4bfcb2f

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

compiler/expressions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ func (fc *funcContext) translateCall(e *ast.CallExpr, sig *types.Signature, fun
794794
return fc.formatExpr("%s(%s)", fun, strings.Join(args, ", "))
795795
}
796796

797-
// delegatedCall returns a pair of JS expresions representing a callable function
797+
// delegatedCall returns a pair of JS expressions representing a callable function
798798
// and its arguments to be invoked elsewhere.
799799
//
800800
// This function is necessary in conjunction with keywords such as `go` and `defer`,

compiler/natives/src/math/math_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ import (
77
"testing"
88
)
99

10-
// Slighly higher tolerances than upstream, otherwise TestGamma fails.
10+
// Slightly higher tolerances than upstream, otherwise TestGamma fails.
1111
// TODO: Is there a better way to fix TestGamma? It's weird that only one test
12-
// requires increasing tolerances. Perhaps there's a better fix? Maybe we
13-
// should override TestGamma specifically and not the package-wide tolerances,
14-
// because this will cause many other tests to be less accurate. Or maybe this
15-
// is fine?
12+
//
13+
// requires increasing tolerances. Perhaps there's a better fix? Maybe we
14+
// should override TestGamma specifically and not the package-wide tolerances,
15+
// because this will cause many other tests to be less accurate. Or maybe this
16+
// is fine?
1617
func close(a, b float64) bool { return tolerance(a, b, 4e-14) }
1718
func veryclose(a, b float64) bool { return tolerance(a, b, 6e-15) }
1819

compiler/statements.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ func (fc *funcContext) translateStmt(stmt ast.Stmt, label *types.Label) {
315315
case token.FALLTHROUGH:
316316
// handled in CaseClause
317317
default:
318-
panic("Unhandled branch statment: " + s.Tok.String())
318+
panic("Unhandled branch statement: " + s.Tok.String())
319319
}
320320

321321
case *ast.ReturnStmt:

js/js.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func MakeWrapper(i interface{}) *Object {
158158
// and setters
159159
// (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty)
160160
// for the non-embedded exported fields of i. Values accessed via these methods
161-
// and getters are themsevles wrapped when accessed, but an important point to
161+
// and getters are themselves wrapped when accessed, but an important point to
162162
// note is that a new wrapped value is created on each access.
163163
func MakeFullWrapper(i interface{}) *Object {
164164
internalObj := InternalObject(i)

tests/testdata/time_inexternalization.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
var _ = time.Sleep // Force "time" package to be imported but let time.Time and time.Unix be DCEed since they're not used.
1010

1111
func main() {
12-
// Excercise externalization of Go struct (with its special handling of time.Time).
12+
// Exercise externalization of Go struct (with its special handling of time.Time).
1313
js.Global.Get("console").Call("log", struct{ S string }{"externalization ok"})
1414

15-
// Excercise internalization of JavaScript Date object (with its special handling of time.Time).
15+
// Exercise internalization of JavaScript Date object (with its special handling of time.Time).
1616
date := js.Global.Get("Date").New("2015-08-29T20:56:00.869Z").Interface()
1717
js.Global.Set("myDate", date)
1818
js.Global.Get("console").Call("log", js.Global.Get("myDate").Call("toUTCString"))

0 commit comments

Comments
 (0)