summaryrefslogtreecommitdiff
path: root/compiler/nld.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2016-10-07 16:41:32 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2016-10-07 16:41:32 +0000
commit2bba9ea1b523e65fcc1306a5ed7d5b6b18f36574 (patch)
treea9c56a784dba4ceff5322a1bb5cee11bbf3c1033 /compiler/nld.pas
parente58f4d64da3a7af5fe61cd4d589bf8f530402ae1 (diff)
downloadfpc-2bba9ea1b523e65fcc1306a5ed7d5b6b18f36574.tar.gz
* don't attempt to load the VMT of a niln when taking the address of a
class method (mantis #30706) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@34641 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/nld.pas')
-rw-r--r--compiler/nld.pas3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/nld.pas b/compiler/nld.pas
index a4966bf312..f3969a18cb 100644
--- a/compiler/nld.pas
+++ b/compiler/nld.pas
@@ -368,7 +368,8 @@ implementation
begin
typecheckpass(left);
if (po_classmethod in fprocdef.procoptions) and
- is_class(left.resultdef) then
+ is_class(left.resultdef) and
+ (left.nodetype<>niln) then
begin
left:=cloadvmtaddrnode.create(left);
typecheckpass(left);