- changed status to resolved
OVerriding imported types raise no error or even warning
Delphi:
FDWSUnitImport.ExposeRTTI(TypeInfo(TStringList),[eoExposePublic, eoNoFreeOnCleanup]);
Script:
program test;
type
TStringList = record
abc : Integer;
end;
var testa : TStringList;
begin
testa.abc := 999;
AddToSystemJournal(testa.abc);
testa.Add('aaa');
AddToSystemJournal(testa.Count);
end.
Result:
19:47:56:910 [Demise - Vizzz]: Compiling
19:47:56:929 [Demise - Vizzz]: Compiler: [Syntax Error] (DWS_test 7.sc at 13:9): There is no accessible member with name "Add" for type TStringList
19:47:56:929 [Demise - Vizzz]: Compiling failed.
19:47:56:929 [Demise - Vizzz]: Script DWS_test 7.sc stopped successfuly
No errors, no warnings - just silent overriding.
@Eric Grange it that normal?
Comments (3)
-
repo owner -
reporter @Eric Grange
Strange, because for end-scripters no any difference in usage of imported and “local” types.
Maybe some optional hint?
-
reporter @Eric Grange
- Log in to comment
That's normal, that's not an override, that a newly introduced type in an inner scope.