* by default disable the warning about interfaces raising a particular

method's visibility, because this is common practice in Object-Pascal.
    It can be re-enabled with {$warn INTF_RAISE_VISIBILITY on} (mainly
    useful when trying to keep code compatible with the JVM target)

git-svn-id: trunk@21329 -
This commit is contained in:
Jonas Maebe 2012-05-19 10:19:49 +00:00
parent 8282d6e37a
commit 958600e74b
4 changed files with 168 additions and 163 deletions

View File

@ -1854,13 +1854,16 @@ type_e_no_managed_assign_generic_typecast=04115_E_The assignment side of an expr
% to statically determine that no type-unsafe assignments or operations occur. By assigning a parent class type to a
% variable of a child type by typecasting the assignment side to the parent class type, the type safety would no
% longer be guaranteed and the generated code would fail verification at run time time.
type_w_interface_lower_visibility=04116_W_The interface method "$1" raises the visibility of "$2" to public when accessed via an interface instance
type_w_interface_lower_visibility=04116_-W_The interface method "$1" raises the visibility of "$2" to public when accessed via an interface instance
type_e_interface_lower_visibility=04117_E_The interface method "$1" has a higher visibility (public) than "$2"
% All methods in an interface have always public visibility. That means that if
% an interface method is implemented using a (strict) protected or private method,
% this method is actually publicly accessible via the interface. On the JVM
% target this situation results in an error because the JVM rejects such
% attempts to circumvent the visibility rules.
% attempts to circumvent the visibility rules. On other targets this is a
% warning that is disabled by default because such situations are common
% practice, but it can be enabled in case you are concerned with keeping your
% code compilable for the JVM target.
% \end{description}
#
# Symtable

View File

@ -942,7 +942,7 @@ const
option_info=11024;
option_help_pages=11025;
MsgTxtSize = 65773;
MsgTxtSize = 65774;
MsgIdxMax : array[1..20] of longint=(
26,92,322,118,87,55,116,26,202,63,

File diff suppressed because it is too large Load Diff

View File

@ -1268,7 +1268,6 @@ unit scandir;
$warn <identifier> on
$warn <identifier> off
$warn <identifier> error
not implemented yet
}
procedure dir_warn;
var
@ -1360,6 +1359,9 @@ unit scandir;
else
if ident='CVT_NARROWING_STRING_LOST' then
recordpendingmessagestate(type_w_unicode_data_loss, msgstate)
else
if ident='INTF_RAISE_VISIBILITY' then
recordpendingmessagestate(type_w_interface_lower_visibility, msgstate)
else
begin
i:=0;