diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-04-24 12:49:16 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-04-24 12:49:16 +0000 |
commit | 390ef652928381d669d7d83bc04dcc6c6b7db22a (patch) | |
tree | a398fa43204233226d4924c83034508e10785d6a /compiler/nobjc.pas | |
parent | 16899628de07a0fce51707fb6d3480f0cde1fee6 (diff) | |
download | fpc-390ef652928381d669d7d83bc04dcc6c6b7db22a.tar.gz |
* do not crash but give a fatal error when using Objective-Pascal code
without {$modeswitch objectivec1}
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@15163 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/nobjc.pas')
-rw-r--r-- | compiler/nobjc.pas | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/nobjc.pas b/compiler/nobjc.pas index 60f325b57c..a10f13a83c 100644 --- a/compiler/nobjc.pas +++ b/compiler/nobjc.pas @@ -58,7 +58,7 @@ implementation uses sysutils, - globtype,cclasses,systems, + globtype,globals,cclasses,systems, verbose,pass_1, defutil, symtype,symtable,symdef,symconst,symsym, @@ -84,6 +84,8 @@ function tobjcselectornode.pass_typecheck: tnode; len: longint; s: shortstring; begin + if not(m_objectivec1 in current_settings.modeswitches) then + Message(parser_f_modeswitch_objc_required); result:=nil; typecheckpass(left); { argument can be @@ -141,6 +143,8 @@ constructor tobjcprotocolnode.create(forprotocol: tnode); function tobjcprotocolnode.pass_typecheck: tnode; begin + if not(m_objectivec1 in current_settings.modeswitches) then + Message(parser_f_modeswitch_objc_required); result:=nil; typecheckpass(left); if (left.nodetype<>typen) then |