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

Lossen cast #1372

Merged
merged 2 commits into from
Aug 7, 2023
Merged

Lossen cast #1372

merged 2 commits into from
Aug 7, 2023

Conversation

nielsenko
Copy link
Contributor

@nielsenko nielsenko commented Aug 7, 2023

Calling

ElementDeclarationResult? getDeclarationFromElement(Element element) {
  return session.resolvedLibrary.getElementDeclaration(element);
}

on a ClassElement is not guaranteed to return a result with a node of type ClassDeclaration (It can be a ClassTypeAlias as well), so the previous cast in declarationAstNode is not safe. However we don't actually only need a AnnotatedNode which is a common base for both ClassDeclaration and ClassTypeAlias.

Fix: #1285

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5783812577

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.06%) to 88.807%

Files with Coverage Reduction New Missed Lines %
lib/src/list.dart 2 85.93%
Totals Coverage Status
Change from base Build 5752829848: -0.06%
Covered Lines: 3253
Relevant Lines: 3663

💛 - Coveralls

@nielsenko nielsenko merged commit 02448e4 into main Aug 7, 2023
18 checks passed
@nielsenko nielsenko deleted the kn/fix-mobx-generator-failure branch August 7, 2023 10:44
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Realm generator failure
4 participants