@@ -504,6 +504,37 @@ alias FP12704 = typeof(function() { foo12704(); });
504
504
static assert (is (FP12704 == void function () @system ));
505
505
506
506
/* **************************************************/
507
+ // 12970
508
+
509
+ @system { @safe void f12970a() {} }
510
+ @system { void f12970b() @safe {} }
511
+ static assert (is (typeof (&f12970a) == void function () @safe ));
512
+ static assert (is (typeof (&f12970b) == void function () @safe ));
513
+
514
+ @system { @trusted void f12970c() {} }
515
+ @system { void f12970d() @trusted {} }
516
+ static assert (is (typeof (&f12970c) == void function () @trusted ));
517
+ static assert (is (typeof (&f12970d) == void function () @trusted ));
518
+
519
+ @safe { @system void f12970e() {} }
520
+ @safe { void f12970f() @system {} }
521
+ static assert (is (typeof (&f12970e) == void function () @system ));
522
+ static assert (is (typeof (&f12970f) == void function () @system ));
523
+
524
+ @safe { @trusted void f12970g() {} }
525
+ @safe { void f12970h() @trusted {} }
526
+ static assert (is (typeof (&f12970g) == void function () @trusted ));
527
+ static assert (is (typeof (&f12970h) == void function () @trusted ));
528
+
529
+ @trusted { @safe void f12970i() {} }
530
+ @trusted { void f12970j() @safe {} }
531
+ static assert (is (typeof (&f12970i) == void function () @safe ));
532
+ static assert (is (typeof (&f12970j) == void function () @safe ));
533
+
534
+ @trusted { @system void f12970k() {} }
535
+ @trusted { void f12970l() @system {} }
536
+ static assert (is (typeof (&f12970k) == void function () @system ));
537
+ static assert (is (typeof (&f12970l) == void function () @system ));
507
538
508
539
// Add more tests regarding inferences later.
509
540
0 commit comments