blob: b6121159184f5ae167afdc76d84d4adec6a30a3c [file] [edit]
40 columns |
### The same code is used for formatting top-level and local variables, so we
### don't repeat all of the tests here. Instead, we just ensure that the basics
### are handled for top-level variables and rely on the local variable tests
### for everything else.
>>> Untyped.
late final longVariable = 1, anotherVariable = 2;
<<< 3.7
late final longVariable = 1,
anotherVariable = 2;
>>> Typed.
SomeLongTypeName longVariable = longInitializer;
<<< 3.7
SomeLongTypeName longVariable =
longInitializer;
>>> Late top level variable.
late var x = 1;
late int y = 2;
<<< 3.7
late var x = 1;
late int y = 2;
>>> Constant.
const uptyped = 123 ;
<<< 3.7
const uptyped = 123;
>>>
const String typed = 'string' ;
<<< 3.7
const String typed = 'string';