tools icon indicating copy to clipboard operation
tools copied to clipboard

Constructing a memory RealNode with a non-root parent fails on the Web with dart2js + null safety

Open hacker1024 opened this issue 4 years ago • 3 comments

When using version 6.0.0-nullsafety.4 with null safety enabled and dart2js, RealNode's constructor throws an error when creating a node with a non-root parent.

The issue seems to be here where clock is accessed. The following error is thrown:

NoSuchMethodError: method not found: 'clock' on null

As this isn't a problem when using dartdevc, it's probably a dart2js bug. Before reporting anything there, I though it'd be a good idea to see if anyone can narrow down the issue further so the actual problem could be reported rather than this symptom.

I've made an example Flutter project to demonstrate this.

As a temporary solution, using 5.x with sound null safety disabled works.

hacker1024 avatar Jan 11 '21 02:01 hacker1024

Happy to review a PR to fix it. FWIW this repo is currently maintained in a best-effort manner, so I'm not likely to fix this unless it becomes a problem for the flutter command line tool

jonahwilliams avatar Feb 17 '21 20:02 jonahwilliams

This seems to be fixed now. I'll close the issue.

hacker1024 avatar Jun 28 '22 08:06 hacker1024

Broken on master again (same error)

rodydavis avatar Jan 06 '23 08:01 rodydavis