Skip to content

Commit d3daf15

Browse files
authored
Update broken examples
body is deprecated and text.txt is not readable on run.dlang.io which is suboptimal
1 parent 8d505e3 commit d3daf15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.dd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ void main()
529529
// Code is executed in any case upon scope exit.
530530
scope(exit) { writeln("Exiting main."); }
531531
// File is closed deterministically at scope's end.
532-
foreach (line; File("text.txt").byLine())
532+
foreach (line; File("/etc/issue").byLine())
533533
{
534534
writeln(line);
535535
}
@@ -584,15 +584,15 @@ class Widget : Printable
584584
{
585585
void print(uint level)
586586
in{ }
587-
body{ }
587+
do{ }
588588
}
589589

590590
// Single inheritance of state
591591
class ExtendedWidget : Widget
592592
{
593593
override void print(uint level)
594594
in { /* weakening precondition is okay */ }
595-
body
595+
do
596596
{
597597
//... level may be 0 here ...
598598
}

0 commit comments

Comments
 (0)