diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-05-15 01:55:17 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-15 01:55:17 +0000 |
| commit | 2275e18fc052239fe67f3fda68252ad92bb83ca9 (patch) | |
| tree | 19cdf1917811e1c40362ef468c5d3d6a20344517 /source/slang/slang-check-modifier.cpp | |
| parent | 8c98714df2198db1aff4ce6c6f7922850e400f80 (diff) | |
Do not print errors in _coerce when "JustTrying". (#7064)
* Do not print errors in _coerce when "JustTrying".
While figuring out which generic-overload works best, `_coerce()` is
printing errors and Slang compilation terminates prematurely.
When `TryCheckGenericOverloadCandidateTypes()` is calling `_coerce()` in
"JustTrying" mode, the error messages should be snoozed.
The following logic shows the intention of how to silence the error
messages, but the chain of `sink` was broken in the middle and
`_coerce()` was using `getSink()` from the SemanticVisitor.
val = ExtractGenericArgInteger(
arg,
getType(m_astBuilder, valParamRef),
context.mode == OverloadResolveContext::Mode::JustTrying ? nullptr : getSink());
* Use tempSink when available.
Diffstat (limited to 'source/slang/slang-check-modifier.cpp')
| -rw-r--r-- | source/slang/slang-check-modifier.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp index cebcbe540..f9ad3a02f 100644 --- a/source/slang/slang-check-modifier.cpp +++ b/source/slang/slang-check-modifier.cpp @@ -828,7 +828,7 @@ Modifier* SemanticsVisitor::validateAttribute( if (!typeChecked) { arg = CheckTerm(arg); - arg = coerce(CoercionSite::Argument, paramDecl->getType(), arg); + arg = coerce(CoercionSite::Argument, paramDecl->getType(), arg, getSink()); } } paramIndex++; |
