Index: sdk/lib/_internal/compiler/implementation/util/link_implementation.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart b/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart |
index efd0ff91d1215c826138f879e0e7d763a353a8ed..ff484d1f1ad0d0e874ea31704740763d8c3867b4 100644 |
--- a/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart |
+++ b/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart |
@@ -114,9 +114,9 @@ class LinkBuilderImplementation<T> implements LinkBuilder<T> { |
LinkBuilderImplementation(); |
- Link<T> toLink() { |
- if (head == null) return const Link(); |
- lastLink.tail = const Link(); |
+ Link<T> toLink([Link<T> tail = const Link()]) { |
+ if (head == null) return tail; |
+ lastLink.tail = tail; |
Link<T> link = head; |
lastLink = null; |
head = null; |