diff --git a/examples/rest-collections/source/app.d b/examples/rest-collections/source/app.d index d687523fe..53d2a3e97 100644 --- a/examples/rest-collections/source/app.d +++ b/examples/rest-collections/source/app.d @@ -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; } }