Optional new combined with generic constructor fails #32802
Labels
closed-duplicate
Closed in favor of an existing report
legacy-area-front-end
Legacy: Use area-dart-model instead.
P0
A serious issue requiring immediate resolution
Milestone
(Marking as P0 because this will show up a lot for optional new/const)
My current build: 2.0.0-edge.f5da30ef13b9272c0c4a8996e387978765b949eb
Code:
yields this error:
./repo/dart-sdk/sdk/out/ReleaseX64/dart --preview-dart-2 ~/tmp/x.dart
tmp/x.dart:2:46: Error: An equality expression can't be an operand of another equality expression.
Try re-writing the expression.
final List children = List.from([]);
^
tmp/x.dart:2:47: Error: Expected an identifier, but got '.'.
final List children = List.from([]);
^
tmp/x.dart:2:47: Error: Getter not found: ''.
final List children = List.from([]);
^
tmp/x.dart:2:39: Error: The method '<' isn't defined for the class 'dart.core::Type'.
Try correcting the name to the name of an existing method, or defining a method named '<'.
final List children = List.from([]);
^
tmp/x.dart:2:46: Error: An equality expression can't be an operand of another equality expression.
Try re-writing the expression.
final List children = List.from([]);
^
tmp/x.dart:2:47: Error: Expected an identifier, but got '.'.
final List children = List.from([]);
^
tmp/x.dart:2:47: Error: Getter not found: ''.
final List children = List.from([]);
^
tmp/x.dart:2:39: Error: The method '<' isn't defined for the class 'dart.core::Type'.
Try correcting the name to the name of an existing method, or defining a method named '<'.
final List children = List.from([]);
The text was updated successfully, but these errors were encountered: