Skip to content

dartdoc crashes if a method uses short-hand syntax and is throwing an exception #6086

Closed
@DartBot

Description

@DartBot

This issue was originally filed by ppater...@gmail.com


The following class will not work in dartdoc - it crashes with the attached traceback (Unhandled exception: expected an expression, but got 'throw')

// Will not work with dartdoc
class FixedSize {
   increase() => throw new FixedSizeError('Cannot increase a fixed size');
}

This does work

// Will work with dartdoc
class FixedSize {
   increase() {
       throw new FixedSizeError('Cannot increase a fixed size');
   }
}


Attachment:
traceback.txt (4.45 KB)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions