|
@@ -349,6 +349,7 @@ type
|
|
|
Procedure TestClass;
|
|
|
Procedure TestClassDefaultInheritance;
|
|
|
Procedure TestClassTripleInheritance;
|
|
|
+ Procedure TestClassInheritanceCycleFail;
|
|
|
Procedure TestClassForward;
|
|
|
Procedure TestClassForwardAsAncestorFail;
|
|
|
Procedure TestClassForwardNotResolved;
|
|
@@ -4975,6 +4976,15 @@ begin
|
|
|
ParseProgram;
|
|
|
end;
|
|
|
|
|
|
+procedure TTestResolver.TestClassInheritanceCycleFail;
|
|
|
+begin
|
|
|
+ StartProgram(false);
|
|
|
+ Add([
|
|
|
+ 'type A = class(A)',
|
|
|
+ 'begin']);
|
|
|
+ CheckResolverException('Ancestor cycle detected',nAncestorCycleDetected);
|
|
|
+end;
|
|
|
+
|
|
|
procedure TTestResolver.TestClassForward;
|
|
|
begin
|
|
|
StartProgram(false);
|