Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Null' is not a subtype of type 'InterfaceType' in type cast, _ContextTypeVisitor #48965

Open
scheglov opened this issue May 5, 2022 · 3 comments
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@scheglov
Copy link
Contributor

scheglov commented May 5, 2022

Thread 0 main thread
CastError: type 'Null' is not a subtype of type 'InterfaceType' in type cast
at _ContextTypeVisitor.visitListLiteral(feature_computer.dart:827)
at ListLiteralImpl.accept(ast.dart:7324)
at FeatureComputer.computeContextType(feature_computer.dart:162)
at CompletionGetSuggestions2Handler.handle.<fn>(completion_get_suggestions2.dart:191)
at <asynchronous gap>(async)
at OperationPerformanceImpl.runAsync(operation_performance.dart:158)
@scheglov scheglov added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-server analyzer-crash-report Issues which have been reported due to an analysis server crash labels May 5, 2022
@scheglov
Copy link
Contributor Author

scheglov commented May 5, 2022

Adding debug output in https://dart-review.googlesource.com/c/sdk/+/243840.

copybara-service bot pushed a commit that referenced this issue May 5, 2022
Bug: #48965
Change-Id: I50ac5baef607071f5b32df4aa63fb4327645a781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243840
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
@pq
Copy link
Member

pq commented May 6, 2022

@scheglov: do you have and idea on how to reproduce this or is that what the debug output is for?

@scheglov
Copy link
Contributor Author

scheglov commented May 6, 2022

No, I don't know how to reproduce this.
If I knew, I would not need adding the debug output :-)

@keertip keertip added the P2 A bug or feature request we're likely to work on label May 9, 2022
@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. and removed analyzer-crash-report Issues which have been reported due to an analysis server crash labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants