From adaea0e993fd8db351b5dad92802e47ed6d0ec77 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 17 Aug 2022 23:08:34 -0700 Subject: Warning on lossy implicit casts. (#2367) * Warning on bool to float conversion. * Fix test cases. * Improve. * LanguageServer: don't show constant value for non constant variables. * Fix tests. * Fix warnings in tests. Co-authored-by: Yong He --- source/slang/slang-check-overload.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source/slang/slang-check-overload.cpp') diff --git a/source/slang/slang-check-overload.cpp b/source/slang/slang-check-overload.cpp index 36c93a2e2..9109130e2 100644 --- a/source/slang/slang-check-overload.cpp +++ b/source/slang/slang-check-overload.cpp @@ -314,14 +314,10 @@ namespace Slang // If we have an argument to work with, then we will // try to extract its speicalization-time constant value. // - // TODO: This is one of the places where we will need to - // generalize in order to support generic value parameters - // with types other than `int`. - // Val* val = nullptr; if( arg ) { - val = ExtractGenericArgInteger(arg, context.mode == OverloadResolveContext::Mode::JustTrying ? nullptr : getSink()); + val = ExtractGenericArgInteger(arg, getType(m_astBuilder, valParamRef), context.mode == OverloadResolveContext::Mode::JustTrying ? nullptr : getSink()); } // If any of the above checking steps fail and we don't -- cgit v1.2.3