var list = const [3];list[0] = 9;should throw error in compile time #45886
Labels
analyzer-constants
analyzer-warning
Issues with the analyzer's Warning codes
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
var list = const [3];
list[0] = 9; // error in runtime, but this can analyze in compile time.
var list2 = List.unmodifiable([3]);
list2[0] = 99; // this should error in runtime not in compile time.
The text was updated successfully, but these errors were encountered: