blob: b74b6d0153f9298e571a4b478ef0b9f7f8d0fb07 [file] [log] [blame]
class F {
/* notice the bracket at the end instead of parenthesis! */
final List<Undefined> foo1 = List<List<int>>[];
// variation #1: OK.
final List<Undefined> foo2 = <List<int>>[];
// variation #2: Bad.
final List<Undefined> foo3 = List[];
// variation #3: OK.
final List<Undefined> foo4 = List<List<int>>();
// variation #4: OK.
final List<Undefined> foo5 = List();
// variation #5: Bad.
final List<Undefined> foo6 = List<List<int>>[null];
// variation #6: This is actually just an indexed expression.
final List<Undefined> foo7 = List[null];
// variation #7: OK.
final List<Undefined> foo8 = <List<int>>[null];
// variation #8: OK.
final List<Undefined> foo9 = [null];
}