File tree 3 files changed +35
-0
lines changed
3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -1267,6 +1267,14 @@ public:
1267
1267
}
1268
1268
}
1269
1269
1270
+ override void visit (FuncExp e)
1271
+ {
1272
+ if (e.td)
1273
+ mangleSymbol(e.td);
1274
+ else
1275
+ mangleSymbol(e.fd);
1276
+ }
1277
+
1270
1278
// //////////////////////////////////////////////////////////////////////////
1271
1279
1272
1280
override void visit (Parameter p)
Original file line number Diff line number Diff line change
1
+ // https://issues.dlang.org/show_bug.cgi?id=21753
2
+
3
+ struct Sample {
4
+ int function () func1;
5
+ int function () func2;
6
+ }
7
+
8
+ void noth (Sample smpl)() {
9
+ static assert (smpl.func1() == 0 );
10
+ static assert (smpl.func2() == 1 );
11
+ }
12
+
13
+ void main () {
14
+ enum s = Sample(
15
+ { return 0 ; },
16
+ { return 1 ; }
17
+ );
18
+ static assert (s.func1() == 0 );
19
+ static assert (s.func2() == 1 );
20
+ noth! (s)();
21
+ }
Original file line number Diff line number Diff line change @@ -618,6 +618,12 @@ static assert(funcd.mangleof == "_D6mangle5funcdFPFZNnZi");
618
618
619
619
/* **************************************************/
620
620
621
+ struct S21753 { void function () f1; }
622
+ void fun21753 (S21753 v)() {}
623
+ alias fl21753 = (){};
624
+ static assert ((fun21753! (S21753 (fl21753))).mangleof == " _D6mangle__T8fun21753VSQv6S21753S1_DQBi10" ~ fl21753.stringof ~ " MFNaNbNiNfZvZQCaQp" );
625
+
626
+ /* **************************************************/
621
627
void main ()
622
628
{
623
629
test10077h();
You can’t perform that action at this time.
0 commit comments