cleanup: revert KI-3 exception-handler var renames to plain E

The KI-3 ARC triple-release bug — multiple `on E: TYPE do` handlers in one
except block colliding on a single QBE slot — is fixed, so the workaround of
giving each handler a distinct variable name can be reverted. Handler vars are
now the natural `E` again in:
  - blaise.testing.pas: the runner's 4-handler dispatch block
    (EAF/EIT/E/ETO -> E) — the exact KI-3 scenario, in the test framework's
    own outcome classifier.
  - cp.test.attributes.pas: ETO -> E.
  - cp.test.sets.pas: ESE/EEx -> E.

(There were no {$IFDEF FPC} blocks left to remove — the KI-2 .Free guards and
all other FPC conditionals were already gone from the source tree as part of
the FPC-independence migration; verified by a full-tree directive scan.)

All three fixpoints green; 3501 tests pass, including the framework's own
FAIL/IGNORED/ERROR outcome paths.
This commit is contained in:
Graeme Geldenhuys 2026-06-18 12:17:06 +01:00
parent 1ef226369d
commit bc0485285f
3 changed files with 10 additions and 10 deletions

View file

@ -522,25 +522,25 @@ begin
try
Self.RunTest();
except
on EAF: EAssertionFailed do
on E: EAssertionFailed do
begin
Outcome := 'FAIL';
AResult.AddFailure(Self.FName, EAF.ToString());
AResult.AddFailure(Self.FName, E.ToString());
end;
on EIT: EIgnoredTest do
on E: EIgnoredTest do
begin
Outcome := 'IGNORED';
AResult.AddIgnored(Self.FName, EIT.FMessage);
AResult.AddIgnored(Self.FName, E.FMessage);
end;
on E: Exception do
begin
Outcome := 'ERROR';
AResult.AddError(Self.FName, E.ClassName + ': ' + E.Message);
end;
on ETO: TObject do
on E: TObject do
begin
Outcome := 'ERROR';
AResult.AddError(Self.FName, 'Unhandled exception: ' + ETO.ClassName);
AResult.AddError(Self.FName, 'Unhandled exception: ' + E.ClassName);
end;
end;
finally

View file

@ -405,8 +405,8 @@ begin
on E: Exception do
if Pos('Unknown attribute', E.Message) >= 0 then
OK := True;
on ETO: TObject do
if Pos('Unknown attribute', ETO.ClassName) >= 0 then
on E: TObject do
if Pos('Unknown attribute', E.ClassName) >= 0 then
OK := True;
end;
AssertTrue('unknown attribute raises semantic error', OK);

View file

@ -720,11 +720,11 @@ begin
Prog.Free();
Fail('Expected ESemanticError but none was raised');
except
on ESE: ESemanticError do
on E: ESemanticError do
begin
Prog.Free();
end;
on EEx: Exception do
on E: Exception do
begin
Prog.Free();
raise;