Skip to content

Commit 7048127

Browse files
barylukPetarKirov
authored andcommitted
class allocator receives size_t not uint
When running gdc 9.3.0: ``` decl.d:45:12: error: allocator decl.XClass.new first argument must be type size_t, not uint ```
1 parent d5c9223 commit 7048127

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/class.dd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -997,15 +997,15 @@ $(GNAME Allocator):
997997
$(P A class member function of the form:)
998998

999999
------
1000-
new(uint size)
1000+
new(size_t size)
10011001
{
10021002
...
10031003
}
10041004
------
10051005

10061006
is called a class allocator.
10071007
The class allocator can have any number of parameters, provided
1008-
the first one is of type uint.
1008+
the first one is of type `size_t`.
10091009
Any number can be defined for a class, the correct one is
10101010
determined by the usual function overloading rules.
10111011
When a new expression:
@@ -1031,7 +1031,7 @@ class Foo
10311031
{
10321032
this(string a) { ... }
10331033

1034-
new(uint size, int x, int y)
1034+
new(size_t size, int x, int y)
10351035
{
10361036
...
10371037
}

0 commit comments

Comments
 (0)