From 3bbac5f16e9dd47acd2132c0bb2a43393831c450 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 13 Apr 2023 16:40:36 -0700 Subject: Warn on float-to-double coercion for arguments. (#2802) * Warn on float-to-double coercion for arguments. * Fix test. * Rename. * Fixup. --------- Co-authored-by: Yong He --- source/slang/slang-check-overload.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 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 f786089f8..d544ce5a1 100644 --- a/source/slang/slang-check-overload.cpp +++ b/source/slang/slang-check-overload.cpp @@ -320,7 +320,7 @@ namespace Slang } else { - arg = coerce(getType(m_astBuilder, valParamRef), arg); + arg = coerce(CoercionSite::Argument, getType(m_astBuilder, valParamRef), arg); } // If we have an argument to work with, then we will @@ -427,7 +427,7 @@ namespace Slang } else { - arg = coerce(paramType, arg); + arg = coerce(CoercionSite::Argument, paramType, arg); } } return true; -- cgit v1.2.3