summaryrefslogtreecommitdiff
path: root/tests/tbf
diff options
context:
space:
mode:
authorsvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-16 16:05:53 +0000
committersvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-16 16:05:53 +0000
commit0333be5d397ff20e39ad31fc50dc7ce49907e737 (patch)
treef64064a477892fb5fdeee8a755ca7db7f8a36d44 /tests/tbf
parent0fffdb47993af8450c2539f60dba7db90bbcc51e (diff)
downloadfpc-0333be5d397ff20e39ad31fc50dc7ce49907e737.tar.gz
Fix for Mantis #26481. This is a regression.
nutils.pas, handle_staticfield_access: * generics don't have staticvarsyms for their static fieldvarsyms so we need to simulate a non-static access to avoid 1) an exception and 2) incorrect errors that instance methods can't be accessed + added tests git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@29484 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/tbf')
-rw-r--r--tests/tbf/tb0250.pp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/tbf/tb0250.pp b/tests/tbf/tb0250.pp
new file mode 100644
index 0000000000..cc29a9f2ca
--- /dev/null
+++ b/tests/tbf/tb0250.pp
@@ -0,0 +1,22 @@
+{ %FAIL }
+
+program tb0250;
+
+{$mode delphi}
+
+type
+ TTest<T> = class
+ class var
+ fTest: TClass;
+ procedure Test;
+ end;
+
+procedure TTest<T>.Test;
+begin
+ fTest.ToString;
+end;
+
+begin
+
+end.
+