Skip to content

Commit 2b6f270

Browse files
dkorpelDennis Korpel
andauthored
Update spec for static opCall (#4320)
Co-authored-by: Dennis Korpel <dennis@sarc.nl>
1 parent 920d92c commit 2b6f270

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

spec/operatoroverloading.dd

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -630,13 +630,6 @@ $(H2 $(LEGACY_LNAME2 FunctionCall, function-call, Function Call Operator Overloa
630630
were a function.
631631
)
632632

633-
$(P Note that merely declaring $(D opCall) automatically disables
634-
$(DDSUBLINK spec/struct, StructLiteral, struct literal) syntax.
635-
To avoid the limitation, declare a
636-
$(DDSUBLINK spec/struct, Struct-Constructor, constructor)
637-
so that it takes priority over $(D opCall) in $(D Type(...)) syntax.
638-
)
639-
640633
$(SPEC_RUNNABLE_EXAMPLE_RUN
641634
-------
642635
struct Multiplier
@@ -677,6 +670,10 @@ $(H3 $(LNAME2 static-opcall, Static opCall))
677670
-------
678671
)
679672

673+
$(P Note that merely declaring a $(D static opCall) automatically disables
674+
$(DDSUBLINK spec/struct, StructLiteral, struct literal) syntax.
675+
)
676+
680677
$(P Mixing struct constructors and $(D static opCall) is not allowed.)
681678

682679
---

0 commit comments

Comments
 (0)