gopherjs / gopherjs/gopherjs

Interface Assertions not Working in Specific Cases

Open
#705 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug NeedsInvestigation
Dominant language
Go
Stars
13.2k
Forks
573
PR merge metrics
No merged PRs in 30d

Description

I'm not sure what exactly causes this. I tried to narrow this down but, unfortunately, no matter what I tried, the narrowed down code worked as expected. However, the code that I originally found the problem in is available. The tests for a project I'm working on fail in GopherJS but work fine in standard Go. In GopherJS, it panics with the line

interface conversion: io.Writer is not io.writer: missing method Write

Somewhat complicating the matter is that the io package in question is not the standard library's io package; it's a different package that's part of the aforementioned project.

I'll keep trying to narrow it down and update if I find the cause, but I figured I'd post this with the information I have so far in case someone's able to figure it out faster.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the wdte project tests with standard Go and GopherJS, then compare the interface assertion that produces the reported panic. The issue does not identify a source file or reduced reproduction, so done means isolating the failing case and making the GopherJS result match standard Go.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.