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

Constant does not have value when expected #25971

Closed
bwilkerson opened this issue Mar 10, 2016 · 2 comments
Closed

Constant does not have value when expected #25971

bwilkerson opened this issue Mar 10, 2016 · 2 comments
Labels
analyzer-constants analyzer-stability area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. 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

@bwilkerson
Copy link
Member

Dart analysis server, SDK version 1.15.0-dev.0.0, server version 1.14.0, error: Task failed: VerifyUnitTask for source ...
Unexpected exception while performing VerifyUnitTask for source ...
#0 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:328)
#1 AnalysisTask.perform (package:analyzer/task/model.dart:218)
#2 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:274)
#3 AnalysisDriver.performAnalysisTask (package:analyzer/src/task/driver.dart:249)
#4 AnalysisContextImpl.performAnalysisTask. (package:analyzer/src/context/context.dart:1122)
#5 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:194)
#6 AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1120)
#7 PerformAnalysisOperation.perform (package:analysis_server/src/operation/operation_analysis.dart:371)
#8 AnalysisServer.performOperation (package:analysis_server/src/analysis_server.dart:807)
#9 Future.Future. (dart:async/future.dart:118)
#10 _rootRun (dart:async/zone.dart:891)
#11 _CustomZone.run (dart:async/zone.dart:790)
#12 _CustomZone.runGuarded (dart:async/zone.dart:696)
#13 _CustomZone.bindCallback. (dart:async/zone.dart:721)
#14 _rootRun (dart:async/zone.dart:895)
#15 _CustomZone.run (dart:async/zone.dart:790)
#16 _CustomZone.runGuarded (dart:async/zone.dart:696)
#17 _CustomZone.bindCallback. (dart:async/zone.dart:721)
#18 Timer._createTimer. (dart:async-patch/timer_patch.dart:16)
#19 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:385)
#20 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:414)
#21 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

Caused by 'package:analyzer/src/generated/resolver.dart': Failed assertion: line 1341: '!node.isConst' is not true.
#0 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:27)
#1 ConstantVerifier.visitVariableDeclaration (package:analyzer/src/generated/resolver.dart:1341)
#2 VariableDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:10443)
#3 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7410)
#4 VariableDeclarationListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10544)
#5 RecursiveAstVisitor.visitVariableDeclarationList (package:analyzer/dart/ast/visitor.dart:1138)
#6 VariableDeclarationListImpl.accept (package:analyzer/src/dart/ast/ast.dart:10538)
#7 AstNodeImpl._safelyVisitChild (package:analyzer/src/dart/ast/ast.dart:935)
#8 FieldDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4112)
#9 RecursiveAstVisitor.visitFieldDeclaration (package:analyzer/dart/ast/visitor.dart:747)
#10 FieldDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:4107)
#11 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7410)
#12 ClassDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1856)
#13 RecursiveAstVisitor.visitClassDeclaration (package:analyzer/dart/ast/visitor.dart:603)
#14 ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1796)
#15 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7410)
#16 CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2367)
#17 RecursiveAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:627)
#18 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2360)
#19 VerifyUnitTask.internalPerform (package:analyzer/src/task/dart.dart:5307)
#20 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:318)
#21 AnalysisTask.perform (package:analyzer/task/model.dart:218)
#22 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:274)
#23 AnalysisDriver.performAnalysisTask (package:analyzer/src/task/driver.dart:249)
#24 AnalysisContextImpl.performAnalysisTask. (package:analyzer/src/context/context.dart:1122)
#25 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:194)
#26 AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1120)
#27 PerformAnalysisOperation.perform (package:analysis_server/src/operation/operation_analysis.dart:371)
#28 AnalysisServer.performOperation (package:analysis_server/src/analysis_server.dart:807)
#29 Future.Future. (dart:async/future.dart:118)
#30 _rootRun (dart:async/zone.dart:891)
#31 _CustomZone.run (dart:async/zone.dart:790)
#32 _CustomZone.runGuarded (dart:async/zone.dart:696)
#33 _CustomZone.bindCallback. (dart:async/zone.dart:721)
#34 _rootRun (dart:async/zone.dart:895)
#35 _CustomZone.run (dart:async/zone.dart:790)
#36 _CustomZone.runGuarded (dart:async/zone.dart:696)
#37 _CustomZone.bindCallback. (dart:async/zone.dart:721)
#38 Timer._createTimer. (dart:async-patch/timer_patch.dart:16)
#39 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:385)
#40 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:414)
#41 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

@bwilkerson bwilkerson added P1 A high priority bug; for example, a single project is unusable or has many test failures area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-constants analyzer-stability type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Mar 10, 2016
@bwilkerson
Copy link
Member Author

Added several tests (https://codereview.chromium.org/1798993003/) but have not yet been able to reproduce this behavior. It's possible that it only occurs in the case where analyzer is recreating a resolved AST when the element model already exists.

@bwilkerson bwilkerson added P2 A bug or feature request we're likely to work on and removed P2 A bug or feature request we're likely to work on P1 A high priority bug; for example, a single project is unusable or has many test failures labels Nov 29, 2016
@srawlins
Copy link
Member

srawlins commented Oct 8, 2021

This bug is so old, I think we'll just have to re-open if we se again, since it doesn't have a good reproduction.

@srawlins srawlins closed this as completed Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-constants analyzer-stability area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. 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

2 participants