Skip to content

Commit

Permalink
GetKey, GetKeyTrigger opt constructors fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SunSerega committed Apr 7, 2019
1 parent 70760f2 commit 48a5ffc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/File tests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ep.SupprIO := true;

//var s := new Script('Lib\examples\Basic operators\main.sac');
var s := new Script('TestSuite\TestComp\VarMove2\Main.sac', ep);
var s := new Script('TestSuite/TestComp/AllOpers\Main.sac', ep);

//SaveObj('test.bin',s);

Expand Down
10 changes: 6 additions & 4 deletions src/StmParser.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2905,9 +2905,10 @@ CannotExecInLibModeException = class(WrongSettingsException)
vname := par[2];
end;

public constructor(kk: InputNValue; bl: StmBlock);
public constructor(kk: InputNValue; vname: string; bl: StmBlock);
begin
self.kk := kk;
self.vname := vname;
self.bl := bl;
self.scr := bl.scr;
end;
Expand All @@ -2926,7 +2927,7 @@ CannotExecInLibModeException = class(WrongSettingsException)
end else
if kk=nkk then
Result := self else
Result := new OperGetKey(nkk, bl);
Result := new OperGetKey(nkk, vname, bl);

nvn.Add(vname);
svn.Remove(vname);
Expand Down Expand Up @@ -3017,9 +3018,10 @@ CannotExecInLibModeException = class(WrongSettingsException)
vname := par[2];
end;

public constructor(kk: InputNValue; bl: StmBlock);
public constructor(kk: InputNValue; vname: string; bl: StmBlock);
begin
self.kk := kk;
self.vname := vname;
self.bl := bl;
self.scr := bl.scr;
end;
Expand All @@ -3038,7 +3040,7 @@ CannotExecInLibModeException = class(WrongSettingsException)
end else
if kk=nkk then
Result := self else
Result := new OperGetKeyTrigger(nkk, bl);
Result := new OperGetKeyTrigger(nkk, vname, bl);

nvn.Add(vname);
svn.Remove(vname);
Expand Down
Binary file modified src/Test.exe
Binary file not shown.

0 comments on commit 48a5ffc

Please sign in to comment.