summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-check-overload.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-08-17 23:08:34 -0700
committerGitHub <noreply@github.com>2022-08-17 23:08:34 -0700
commitadaea0e993fd8db351b5dad92802e47ed6d0ec77 (patch)
treedfad5201677b0202b0b890cbae066b5b2f3f033b /source/slang/slang-check-overload.cpp
parentd65c6183c0d8b365aa182c3d9026ba85522531f2 (diff)
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 <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-check-overload.cpp')
-rw-r--r--source/slang/slang-check-overload.cpp6
1 files changed, 1 insertions, 5 deletions
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