Browse Source

* fixed error msg (that->this)
* array properties can be published in delphi mode though it makes no sense to publish them because they can't be streamed

git-svn-id: trunk@3694 -

florian 19 years ago
parent
commit
daeda1b9e0
3 changed files with 4 additions and 3 deletions
  1. 1 1
      compiler/msg/errore.msg
  2. 1 1
      compiler/msgtxt.inc
  3. 2 1
      compiler/pdecvar.pas

+ 1 - 1
compiler/msg/errore.msg

@@ -770,7 +770,7 @@ parser_e_property_default_value_must_const=03132_E_The default value of a proper
 parser_e_cant_publish_that=03133_E_Symbol can't be published, can be only a class
 % Only class type variables can be in a \var{published} section of a class
 % if they are not declared as a property.
-parser_e_cant_publish_that_property=03134_E_That kind of property can't be published
+parser_e_cant_publish_that_property=03134_E_This kind of property can't be published
 % Properties in a \var{published} section cannot be array properties.
 % they must be moved to public sections. Properties in a \var{published}
 % section must be an ordinal type, a real type, strings or sets.

+ 1 - 1
compiler/msgtxt.inc

@@ -240,7 +240,7 @@ const msgtxt : array[0..000166,1..240] of char=(
   '03131_E_Property can'#039't have a default value'#000+
   '03132_E_The default valu','e of a property must be constant'#000+
   '03133_E_Symbol can'#039't be published, can be only a class'#000+
-  '03134_E_That kind of property can'#039't be published'#000+
+  '03134_E_This kind of property can'#039't be published'#000+
   '03136_E_An import name is required'#000+
   '03138_E_Division by zero'#000+
   '03139_E_Invalid floating point operation'#000+

+ 2 - 1
compiler/pdecvar.pas

@@ -248,7 +248,8 @@ implementation
          { property parameters ? }
          if try_to_consume(_LECKKLAMMER) then
            begin
-              if (sp_published in current_object_option) then
+              if (sp_published in current_object_option) and
+                not (m_delphi in aktmodeswitches) then
                 Message(parser_e_cant_publish_that_property);
               { create a list of the parameters }
               symtablestack.push(readprocdef.parast);