issues 0033 + 0034: rename repros to focused regression tests
Both repros emit their target diagnostics cleanly today (verified 2026-05-28 against HEAD): - `issue-0033` → "no visible xx conversion from 's64' to 'Wrap' — impl exists in another module but is not imported". Catches the case where an `impl Into(X) for Y` is registered globally via one module's import chain but is NOT transitively imported by the file containing the `xx` site. - `issue-0034` → "duplicate xx conversion from 's64' to 'Wrap': impls in <a> and <b>". Catches two impls covering the same (Source, Target) pair both reachable from a single `xx` site. Renamed to focused feature names: - `issue-0033*` → `179-impl-visibility*` (4 files: main + impl + types + user). - `issue-0034*` → `180-impl-duplicate*` (4 files: main + impl-a + impl-b + types). Path references inside the files updated. Comment headers tightened to feature-focused (drop issue-NNNN provenance — that's in git history now). Expected `.txt` / `.exit` files captured against the full diagnostic text and exit code 1. The `issue-*` namespace in `examples/` now shrinks to the literal list of UNRESOLVED bug repros. 218/218.
This commit is contained in:
23
examples/180-impl-duplicate.sx
Normal file
23
examples/180-impl-duplicate.sx
Normal file
@@ -0,0 +1,23 @@
|
||||
// Duplicate impl detection — two impls for the same (Source, Target)
|
||||
// pair are both visible from the same `xx` site (because both their
|
||||
// defining modules are transitively imported). The compiler must
|
||||
// emit a "duplicate xx conversion" diagnostic naming both modules,
|
||||
// not silently pick one or the other.
|
||||
//
|
||||
// Setup:
|
||||
// - 180-impl-duplicate-impl-a.sx: `impl Into(Wrap) for s64` (mul by 10).
|
||||
// - 180-impl-duplicate-impl-b.sx: `impl Into(Wrap) for s64` (add 100).
|
||||
// - Main imports both; the `xx 7 : Wrap` site must error.
|
||||
//
|
||||
// Expected exit = 1, expected output = the focused diagnostic naming
|
||||
// both impl modules.
|
||||
|
||||
#import "modules/std.sx";
|
||||
#import "./180-impl-duplicate-impl-a.sx";
|
||||
#import "./180-impl-duplicate-impl-b.sx";
|
||||
|
||||
main :: () -> s32 {
|
||||
w : Wrap = xx 7;
|
||||
print("w.v = {}\n", w.v);
|
||||
0;
|
||||
}
|
||||
Reference in New Issue
Block a user