diff options
author | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-01-16 16:05:53 +0000 |
---|---|---|
committer | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-01-16 16:05:53 +0000 |
commit | 0333be5d397ff20e39ad31fc50dc7ce49907e737 (patch) | |
tree | f64064a477892fb5fdeee8a755ca7db7f8a36d44 /tests/tbf | |
parent | 0fffdb47993af8450c2539f60dba7db90bbcc51e (diff) | |
download | fpc-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.pp | 22 |
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. + |