Skip to content

Commit c1287d6

Browse files
authored
[spec/function] Tweak pure factory functions (#3550)
See https://forum.dlang.org/post/[email protected].
1 parent b4f5bfe commit c1287d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/function.dd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ $(H3 $(LNAME2 pure-special-cases, Special Cases))
526526
$(H3 $(LNAME2 pure-factory-functions, Pure Factory Functions))
527527

528528
$(P A $(I pure factory function) is a strongly pure function
529-
that returns a result that has mutable indirections.
529+
that returns a result that has only mutable indirections.
530530
All mutable
531531
memory returned by the call cannot be referenced by any other part of the
532532
program, i.e. it is newly allocated by the function.
@@ -545,7 +545,7 @@ $(H3 $(LNAME2 pure-factory-functions, Pure Factory Functions))
545545
pure List* make(int a, int b)
546546
{
547547
auto result = new List(a, null);
548-
result.next = new List(b, result);
548+
result.next = new List(b, null);
549549
return result;
550550
}
551551

0 commit comments

Comments
 (0)