From 6ca06e6aaf5854f226b24d21376da78c33bca429 Mon Sep 17 00:00:00 2001 From: Dmitriy Suponitskiy Date: Tue, 6 May 2025 14:23:08 -0400 Subject: [PATCH] Replaced dynamic_cast with typeid() to fix failures in unittests linked with clang++-18 and running on MacOS --- src/core/include/lattice/hal/default/ilparams.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/include/lattice/hal/default/ilparams.h b/src/core/include/lattice/hal/default/ilparams.h index e08b1a732..b3ad215cd 100644 --- a/src/core/include/lattice/hal/default/ilparams.h +++ b/src/core/include/lattice/hal/default/ilparams.h @@ -126,8 +126,12 @@ class ILParamsImpl final : public ElemParams { * DCRTPoly, False otherwise */ bool operator==(const ElemParams& rhs) const override { - if (!dynamic_cast*>(&rhs)) + // ATTENTION: dynamic_cast was replaced with typeid() to fix failures in unittests linked with clang++-18 and running on MacOS + // =========================================================================================================================== + // see a similar change in "operator==()" for "class ILDCRTParams" (ildcrtparams.h) + if (typeid(rhs) != typeid(const ILParamsImpl)) return false; + return ElemParams::operator==(rhs); }