Skip to content

Crash handling anonymous functions as keys to a Map with inferred types #1643

@bergwerf

Description

@bergwerf

dartdoc version: 0.17.1+1

Generation failed: NoSuchMethodError: The getter 'length' was called on null.
Receiver: null
Tried calling: length
dart:convert                                                                          HtmlEscape.convert
package:dartdoc/src/model.dart 3416                                                   ModelElement._calculateLinkedName
package:dartdoc/src/model.dart 3097                                                   ModelElement.linkedName
package:dartdoc/src/element_type.dart 127                                             ParameterizedElementType.linkedName
package:dartdoc/src/element_type.dart 304                                             CallableAnonymousElementType.linkedName
package:dartdoc/src/element_type.dart 133                                             ParameterizedElementType.linkedName.<fn>
dart:core                                                                             StringBuffer.writeAll
package:dartdoc/src/element_type.dart 133                                             ParameterizedElementType.linkedName
package:dartdoc/src/element_type.dart 224                                             DefinedElementType.createLinkedReturnTypeName
package:dartdoc/src/model.dart 278                                                    Accessor.linkedReturnType
package:dartdoc/src/model.dart 1646                                                   ModelElement&GetterSetterCombo.linkedReturnType
dart:mirrors                                                                          _LocalInstanceMirror.getField
package:mustache4dart/src/mirrors.dart 111                                            _MethodMirrorField.val
package:mustache4dart/mustache_context.dart 122                                       _MustacheContext._getMustacheContext
package:mustache4dart/mustache_context.dart 118                                       _MustacheContext._getContextForKey
package:mustache4dart/mustache_context.dart 82                                        _MustacheContext._getInThisOrParent
package:mustache4dart/mustache_context.dart 78                                        _MustacheContext.field
package:mustache4dart/src/tokens.dart 169                                             _ExpressionToken.apply
package:mustache4dart/src/tokens.dart 40                                              Token.call
package:mustache4dart/src/tmpl.dart 101                                               _Template._write
package:mustache4dart/src/tmpl.dart 76                                                _Template.call
package:mustache4dart/src/mustache.dart 11                                            render
package:mustache4dart/src/tokens.dart 211                                             _PartialToken.apply
package:mustache4dart/src/tokens.dart 286                                             _StartSectionToken.apply.<fn>.<fn>
package:mustache4dart/src/tokens.dart 309                                             _StartSectionToken.forEachUntilEndSection
package:mustache4dart/src/tokens.dart 286                                             _StartSectionToken.apply.<fn>
dart:core                                                                             Iterable.forEach
package:mustache4dart/src/tokens.dart 285                                             _StartSectionToken.apply
package:mustache4dart/src/tokens.dart 299                                             _StartSectionToken.apply.<fn>
package:mustache4dart/src/tokens.dart 309                                             _StartSectionToken.forEachUntilEndSection
package:mustache4dart/src/tokens.dart 299                                             _StartSectionToken.apply
package:mustache4dart/src/tokens.dart 40                                              Token.call
package:mustache4dart/src/tmpl.dart 101                                               _Template._write
package:mustache4dart/src/tmpl.dart 76                                                _Template.call
package:dartdoc/src/html/html_generator_instance.dart 283                             HtmlGeneratorInstance._build
package:dartdoc/src/html/html_generator_instance.dart 180                             HtmlGeneratorInstance.generateLibrary
package:dartdoc/src/html/html_generator_instance.dart 93                              HtmlGeneratorInstance._generateDocs
package:dartdoc/src/html/html_generator_instance.dart 36                              HtmlGeneratorInstance.generate
===== asynchronous gap ===========================
dart:async                                                                            _Completer.completeError
package:dartdoc/src/html/html_generator_instance.dart                                 HtmlGeneratorInstance.generate
===== asynchronous gap ===========================
dart:async                                                                            new Future.microtask
package:dartdoc/src/html/html_generator_instance.dart 34                              HtmlGeneratorInstance.generate
package:dartdoc/src/html/html_generator.dart 106                                      HtmlGenerator.generate
===== asynchronous gap ===========================
dart:async                                                                            new Future.microtask
package:dartdoc/src/html/html_generator.dart 72                                       HtmlGenerator.generate
package:dartdoc/dartdoc.dart 171                                                      DartDoc.generateDocs
===== asynchronous gap ===========================
dart:async                                                                            _asyncThenWrapperHelper
package:dartdoc/dartdoc.dart 157                                                      DartDoc.generateDocs
/tmp/tmpvgnPvD/dart-2.0.0-dev.39.0/dart/third_party/pkg/dartdoc/bin/dartdoc.dart 274  main.<fn>.<fn>
===== asynchronous gap ===========================
dart:async                                                                            new Future.microtask
/tmp/tmpvgnPvD/dart-2.0.0-dev.39.0/dart/third_party/pkg/dartdoc/bin/dartdoc.dart 273  main.<fn>.<fn>
dart:async                                                                            runZoned
/tmp/tmpvgnPvD/dart-2.0.0-dev.39.0/dart/third_party/pkg/dartdoc/bin/dartdoc.dart 273  main.<fn>
===== asynchronous gap ===========================
dart:async                                                                            new Future.microtask
/tmp/tmpvgnPvD/dart-2.0.0-dev.39.0/dart/third_party/pkg/dartdoc/bin/dartdoc.dart 272  main.<fn>
package:stack_trace                                                                   Chain.capture
/tmp/tmpvgnPvD/dart-2.0.0-dev.39.0/dart/third_party/pkg/dartdoc/bin/dartdoc.dart 272  main

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1A high priority bug; for example, a single project is unusable or has many test failures

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions