OVerriding imported types raise no error or even warning

Issue #214 resolved
Alex Bespalov created an issue

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)

  1. Alex Bespalov reporter

    @Eric Grange

    Strange, because for end-scripters no any difference in usage of imported and “local” types.

    Maybe some optional hint?

  2. Log in to comment