Skip to content

Analyzer 5.3.0 crashing on Flutter stable #50643

@domesticmouse

Description

@domesticmouse
$ dart run build_runner build
Building package executable... 
Failed to build build_runner:build_runner:
../../../../../.pub-cache/hosted/pub.dartlang.org/analyzer-5.3.0/lib/src/dart/ast/ast.dart:8153:48: Error: The method 'elementAtOrNull' isn't defined for the class 'NodeListImpl<TypeAnnotationImpl>'.
 - 'NodeListImpl' is from 'package:analyzer/src/dart/ast/ast.dart' ('../../../../../.pub-cache/hosted/pub.dartlang.org/analyzer-5.3.0/lib/src/dart/ast/ast.dart').
 - 'TypeAnnotationImpl' is from 'package:analyzer/src/dart/ast/ast.dart' ('../../../../../.pub-cache/hosted/pub.dartlang.org/analyzer-5.3.0/lib/src/dart/ast/ast.dart').
Try correcting the name to the name of an existing method, or defining a method named 'elementAtOrNull'.
    var elementType = typeArguments?.arguments.elementAtOrNull(0)?.typeOrThrow;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions