Skip to content

"late int v; v;" is expected to be fine but VM throws runtime error #39814

@a-siva

Description

@a-siva

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)

Metadata

Metadata

Assignees

Labels

NNBDIssues related to NNBD Releasearea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions