summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw17675a.pp
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-10-20 14:12:58 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-10-20 14:12:58 +0000
commit85927d4000c4e4dab239bb4bf0494bcefe0ddbbe (patch)
tree9341fcc2e463f678cb43d7f60cabbc9aa0200200 /tests/webtbs/tw17675a.pp
parente9fe3e1bcfc199aac11622b04ae9f6e77af72f4f (diff)
downloadfpc-85927d4000c4e4dab239bb4bf0494bcefe0ddbbe.tar.gz
* don't internalerror when a property is hidden by a method in a child class
(mantis #17675) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16191 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/webtbs/tw17675a.pp')
-rw-r--r--tests/webtbs/tw17675a.pp46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/webtbs/tw17675a.pp b/tests/webtbs/tw17675a.pp
new file mode 100644
index 0000000000..d3c7198b70
--- /dev/null
+++ b/tests/webtbs/tw17675a.pp
@@ -0,0 +1,46 @@
+{ %fail }
+
+program project1;
+
+{$mode objfpc}{$H+}
+
+uses
+ {$IFDEF UNIX}{$IFDEF UseCThreads}
+ cthreads,
+ {$ENDIF}{$ENDIF}
+ Classes;
+
+type
+
+ TBase = class
+ public
+ function Count: Integer; overload;
+ end;
+
+ TSub = class(TBase)
+ private
+ function GetCount: Integer;
+ public
+ property Count: Integer read GetCount;
+ end;
+
+function TSub.Count: Integer;
+begin
+ Result := 0;
+end;
+
+{ TBase }
+
+function TBase.GetCount: Integer;
+begin
+ Result := 0;
+end;
+
+var
+ MySub: TSub;
+ i : Integer;
+begin
+ MySub := TSub.Create;
+// uncomment the next line for Fatal Internal error 200111022:
+ for i := 0 to MySub.Count do begin end;
+end.