Skip to content

Commit

Permalink
Fix compile error on old compiler versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Feb 8, 2024
1 parent d461b50 commit cc7b7a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/rest-collections/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ class LocalThreadAPI : ThreadAPI {

string[] get()
{
return m_data.threads.keys;
static if (__VERSION__ < 2099) {
// NOTE: .keys is not @safe on older compiler versions
return () @trusted { return m_data.threads.keys; } ();
} else return m_data.threads.keys;
}
}

Expand Down

0 comments on commit cc7b7a7

Please sign in to comment.