This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -459,6 +459,9 @@ class TypeInfo_Enum : TypeInfo
459
459
460
460
override @property inout (TypeInfo ) next() nothrow pure inout { return base.next; }
461
461
override @property uint flags() nothrow pure const { return base.flags; }
462
+ override const (OffsetTypeInfo )[] offTi () const { return base.offTi; }
463
+ override void destroy (void * p) const { return base.destroy (p); }
464
+ override void postblit (void * p) const { return base.postblit(p); }
462
465
463
466
override const (void )[] initializer () const
464
467
{
Original file line number Diff line number Diff line change 1
1
include ../common.mak
2
2
3
- TESTS: =comparison isbaseof
3
+ TESTS: =comparison isbaseof enum_
4
4
5
5
.PHONY : all clean
6
6
all : $(addprefix $(ROOT ) /,$(addsuffix .done,$(TESTS ) ) )
Original file line number Diff line number Diff line change
1
+ // https://issues.dlang.org/show_bug.cgi?id=21441
2
+
3
+ int dtorCount;
4
+ int postblitCount;
5
+
6
+ struct S
7
+ {
8
+ this (this ) { ++ postblitCount; }
9
+ ~this () { ++ dtorCount; }
10
+ }
11
+
12
+ enum E : S { _ = S.init }
13
+
14
+ void main ()
15
+ {
16
+ E e;
17
+ typeid (e).destroy (&e);
18
+ assert (dtorCount == 1 );
19
+ typeid (e).postblit(&e);
20
+ assert (postblitCount == 1 );
21
+ }
You can’t perform that action at this time.
0 commit comments