Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 9c5a8e0

Browse files
MoonlightSentineldlang-bot
authored andcommitted
Qualify ambiguous lambdas as function literals
dlang/dmd#12553 will change the return type inference s.t. these lambdas are inferred as `noreturn` instead of `void`. This causes an ambiguity regarding the `void function()` and the `void delegate` overloads.
1 parent d0dee39 commit 9c5a8e0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/core/thread/fiber.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1762,7 +1762,7 @@ unittest
17621762

17631763
try
17641764
{
1765-
(new Fiber({
1765+
(new Fiber(function() {
17661766
throw new Exception( MSG );
17671767
})).call();
17681768
assert( false, "Expected rethrown exception." );

src/core/thread/osthread.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,7 @@ unittest
10431043
try
10441044
{
10451045
new Thread(
1046+
function()
10461047
{
10471048
throw new Exception( MSG );
10481049
}).start().join();

0 commit comments

Comments
 (0)