Skip to content

Commit d14fe6c

Browse files
committed
Don't compile first example because overloads get wrapped in main()
1 parent f7ac83c commit d14fe6c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

spec/function.dd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,15 +651,13 @@ $(H2 $(LNAME2 inout-functions, Inout Functions))
651651
into one function using the $(D inout) type constructor. Consider the following
652652
overload set:
653653
)
654-
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
655654
---
656655
int[] slice(int[] a, int x, int y) { return a[x .. y]; }
657656

658657
const(int)[] slice(const(int)[] a, int x, int y) { return a[x .. y]; }
659658

660659
immutable(int)[] slice(immutable(int)[] a, int x, int y) { return a[x .. y]; }
661660
---
662-
)
663661

664662
$(P The code generated by each of these functions is identical.
665663
The $(D_KEYWORD inout) type constructor can combine them into one function:)

0 commit comments

Comments
 (0)