summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/methods
Commit message (Collapse)AuthorAge
* Fix ICE when immutable value is passed to a bwd_diff function. (#7973)Yong He2025-07-29
|
* Emit additional diagnostic for invalid pointer taking operations (#7663)Gangzheng Tong2025-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | * Emit special diagnostic for invalid pointer taking operations * Update source/slang/slang-diagnostic-defs.h Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> * Add OperatorAddressOf KnownBuiltin modifier * update error message for non-l-value assignment * update the diagnostics in the tests * Use enum based KnownBuiltinDeclName * format code (#7772) Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --------- Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Diagnostic location highlighting (#1700)jsmall-nvidia2021-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * #include an absolute path didn't work - because paths were taken to always be relative. * WIP: First pass in supporting output of line error information. * Add support for lexing to better be able to indicate SourceLocation information. * Fix lexer usage in DiagnosticSink in C++ extractor. * Update diagnostics tests to have line location info. * Fixed test expected output that now have source location information in them. * Better handling of tab. * Fix test expected results for tabbing change. * DiagnosticLexer -> DiagnosticSink::SourceLocationLexer Added line continuation tests. * Fix typo. * Added String::appendRepeatedChar * Change to rerun tests. Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
* Fix bugs related to mutating implementations of interface methods (#1461)Tim Foley2020-07-24
There are two main bug fixes here: * We were failing to diagnose when code calls a `[mutating]` method on a value that doesn't support mutation (that is an r-value instead of an l-value). * We had a bug in the synthesis logic for interface requirements where we used the *result* type of the requirement in place of each of the *parameter* types. The second bug made synthesis often produce incorrect signatures with `void` parameters. The first bug meant that even though a `[mutating]` method should not be able to satisfy a non-`[mutating]` method (and we had code to enforce this for the "exact match" case), when we go on to try and synthesize a non-`[mutating]` method that satisfies the requirement by delegating to the user-written one, it would end up succeeding, because nothing was stopping a non-`[mutating]` method from calling a `[mutating]` one. In each case this code adds a fix and a test case to confirm it.