From 26a4e395e8853de8f83c7c56341066f98e6a8d4f Mon Sep 17 00:00:00 2001 From: Denis Feklushkin Date: Sun, 4 Feb 2024 03:57:39 +0300 Subject: [PATCH] Unsupported platform static asserts --- druntime/src/core/thread/osthread.d | 2 ++ druntime/src/core/time.d | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/druntime/src/core/thread/osthread.d b/druntime/src/core/thread/osthread.d index 41de313fcfbb..27f098feabf9 100644 --- a/druntime/src/core/thread/osthread.d +++ b/druntime/src/core/thread/osthread.d @@ -1925,6 +1925,8 @@ private extern (D) void resume(ThreadBase _t) nothrow @nogc t.m_curr.tstack = t.m_curr.bstack; } } + else + static assert(false, "Platform not supported."); } diff --git a/druntime/src/core/time.d b/druntime/src/core/time.d index be941e2abcd8..c3192fc39f9c 100644 --- a/druntime/src/core/time.d +++ b/druntime/src/core/time.d @@ -2584,6 +2584,8 @@ extern(C) void _d_initMonoTime() @nogc nothrow } } } + else + static assert(0, "Unsupported platform"); } @@ -2883,6 +2885,8 @@ deprecated: else ticksPerSec = 1_000_000; } + else + static assert(0, "Unsupported platform"); if (ticksPerSec != 0) appOrigin = TickDuration.currSystemTick;