mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:41:41 +00:00
[dart2js] Add support for Never as a type literal.
Change-Id: Ia543f33619ce46e42a6ac5d0b2d19f44b32525b2 Bug: https://github.com/dart-lang/sdk/issues/42344 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151461 Commit-Queue: Mayank Patke <fishythefish@google.com> Reviewed-by: Stephen Adams <sra@google.com>
This commit is contained in:
parent
6c593ac117
commit
f2f3a256b4
|
@ -1614,6 +1614,7 @@ class Namer extends ModularNamer {
|
|||
String getTypeRepresentationForTypeConstant(DartType type) {
|
||||
type = type.withoutNullability;
|
||||
if (type is DynamicType) return "dynamic";
|
||||
if (type is NeverType) return "Never";
|
||||
if (type is FutureOrType) {
|
||||
return "FutureOr<dynamic>";
|
||||
}
|
||||
|
|
|
@ -3251,6 +3251,7 @@ class KernelSsaGraphBuilder extends ir.Visitor {
|
|||
ir.DartType type = node.type;
|
||||
if (type is ir.InterfaceType ||
|
||||
type is ir.DynamicType ||
|
||||
type is ir.NeverType ||
|
||||
type is ir.TypedefType ||
|
||||
type is ir.FunctionType ||
|
||||
type is ir.FutureOrType) {
|
||||
|
|
Loading…
Reference in a new issue