You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a-siva opened this issue
Dec 17, 2019
· 5 comments
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.NNBDIssues related to NNBD Releasetype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
language/nnbd/static_errors/not_assigned_local_initializer_test.dart expects late int v; v; //# 04: ok to be a valid construct but we get an error
Unhandled exception:
LateInitializationError: v
#0 _LateInitializationError._throwNew (dart:core-patch/errors_patch.dart:600:5)
#1 main (file:///usr/local/google/home/asiva/workspace/dart-nnbd/sdk/out/DebugX64NNBD/generated_tests/language/nnbd/static_errors/not_assigned_local_initializer_test_04.dart:18:15)
#2 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:307:19)
#3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)
The text was updated successfully, but these errors were encountered:
a-siva
added
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
NNBD
Issues related to NNBD Release
labels
Dec 17, 2019
I would expect reading a variable which is definitely unassigned to be an error, even if the variable is late. The late only affects reads which are potentially unassigned.
If this were statically valid, it would be a runtime error. It is intended to be a static error, but the spec was missing this error. I have a PR adding the static error here: dart-lang/language#750 .
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.NNBDIssues related to NNBD Releasetype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
language/nnbd/static_errors/not_assigned_local_initializer_test.dart expects
late int v; v; //# 04: ok
to be a valid construct but we get an errorThe text was updated successfully, but these errors were encountered: