You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compiler/natives/src/reflect: Override Value.assignTo method, drop v.Kind() == Interface && v.IsNil().
This change adds a copy of Value.assignTo method to reflect package,
identical to upstream, except with golang/go@eafa29b
not applied.
That commit adds a short-circuit check to that skips ifaceE2I, in order
to avoid a panic that occurs in ifaceE2I under that condition in gc and
gccgo compilers.
GopherJS implements a custom version of ifaceE2I which needs to run and
does not panic in that condition. So, there's no need skip it.
Fixes:
$ gopherjs test --short reflect html/template
--- FAIL: TestCallConvert (0.01s)
all_test.go:1639: expected [nil], got [<io.Reader Value>]
FAIL
FAIL reflect 3.084s
--- FAIL: TestEscapingNilNonemptyInterfaces (0.01s)
go/src/github.com/shurcooL/play/241/test.243863553:9608
if (!(($parseInt(methodSet.length) === 0)) || !!(typ.named)) {
^
TypeError: Cannot read property 'length' of undefined
at reflectType (go/src/github.com/shurcooL/play/241/test.243863553:9608:31)
at Object.TypeOf (go/src/github.com/shurcooL/play/241/reflect.go:312:3)
at indirect (/html/template/content.go:119:6)
at stringify (/html/template/content.go:153:4)
at htmlEscaper (/html/template/html.go:43:3)
at $call (go/src/github.com/shurcooL/play/241/test.243863553:30:50)
at go/src/github.com/shurcooL/play/241/test.243863553:1948:22
at Object.$packages.reflect.Value.ptr.call (go/src/github.com/shurcooL/play/241/reflect.go:880:3)
at Object.$packages.reflect.Value.ptr.Call (/reflect/value.go:308:3)
at Object.$packages.text/template.state.ptr.evalCall (/text/template/exec.go:667:3)
at Object.$packages.text/template.state.ptr.evalFunction (/text/template/exec.go:535:3)
at Object.$packages.text/template.state.ptr.evalCommand (/text/template/exec.go:432:4)
at Object.$packages.text/template.state.ptr.evalPipeline (/text/template/exec.go:405:4)
at Object.$packages.text/template.state.ptr.walk (/text/template/exec.go:231:4)
at Object.$packages.text/template.state.ptr.walk (/text/template/exec.go:239:5)
at Object.$packages.text/template.Template.ptr.execute (/text/template/exec.go:194:3)
at Object.$packages.text/template.Template.ptr.Execute (/text/template/exec.go:177:3)
at Object.$packages.html/template.Template.ptr.Execute (/html/template/template.go:122:3)
at Object.TestEscapingNilNonemptyInterfaces [as $blk] (/html/template/content_test.go:448:3)
at Object.tRunner [as $blk] (/testing/testing.go:777:3)
at fun (go/src/github.com/shurcooL/play/241/test.243863553:1479:37)
at $goroutine (go/src/github.com/shurcooL/play/241/test.243863553:1477:19)
at $runScheduled (go/src/github.com/shurcooL/play/241/test.243863553:1517:7)
at $schedule (go/src/github.com/shurcooL/play/241/test.243863553:1533:5)
at $go (go/src/github.com/shurcooL/play/241/test.243863553:1509:3)
at Object.<anonymous> (go/src/github.com/shurcooL/play/241/test.243863553:55363:1)
at Object.<anonymous> (go/src/github.com/shurcooL/play/241/test.243863553:55366:4)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:190:16)
at bootstrap_node.js:662:3
FAIL html/template 1.079s
0 commit comments