Skip to content

Dartdoc crashes on "Future<void> foo()" #1625

Closed
@whesse

Description

@whesse

The Dart language now allows Future<void>, and the type of dart:io RandomAccessFile.close() has been changed to that in commit
44aa9a17fd8ca5278dfe12590ad48212fefda4dd

Future<void> close(); instead of
Future<RandomAccessFile> close();

This causes a crash in line 176 of src/element_type.dart, where f.element.library is tested against null, to special-case A<dynamic>. But with A<void>, f.element is itself null. If we change to f.element?.library != null, we get a crash in the call to ModelElement.from(f.element, lib), again, where there is special casing for dynamic, but not for void.

Flutter code is being changed to use Future<void>, and this IO change should also land, so we need to handle this case.

Reverting 44aa9a17fd8ca5278dfe12590ad48212fefda4dd until this is fixed and rolled to Dart SDK

The builder with the failure is:
https://ci.chromium.org/buildbot/client.dart/dart-sdk-linux-be/19230

@jcollins-g
@jcollins-g: edited to escape types

Metadata

Metadata

Assignees

Labels

P0A serious issue requiring immediate resolutiontype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions