bug fix #364
This commit is contained in:
parent
21ee0407ce
commit
9888bc7412
9
TestSuite/extensionmethods20.pas
Normal file
9
TestSuite/extensionmethods20.pas
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
function SkipLast1<T>(self: sequence of T; count: integer := 1): sequence of T; extensionmethod;
|
||||
begin
|
||||
Result := Self.Reverse.Skip(count).Reverse;
|
||||
end;
|
||||
|
||||
begin
|
||||
var arr := Seq(1,2,3).SkipLast1(2).ToArray;
|
||||
assert(arr[0] = 1);
|
||||
end.
|
||||
|
|
@ -9030,7 +9030,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
tmp_si = tmp_si.Next;
|
||||
}
|
||||
function_node fn = convertion_data_and_alghoritms.select_function(pars, si, get_location(id_right));
|
||||
if (!fn.is_extension_method)
|
||||
if (!fn.is_extension_method && fn.polymorphic_state != SemanticTree.polymorphic_state.ps_static)
|
||||
return create_not_static_method_call(fn, en, get_location(id_right), false);
|
||||
else
|
||||
return create_static_method_call_with_params(fn, get_location(id_right), fn.return_value_type, false, pars);
|
||||
|
|
|
|||
|
|
@ -368,13 +368,7 @@ namespace VisualPascalABC
|
|||
EventedStreamReaderList.Remove(FileName);
|
||||
StartedFiles.Remove(StartedProcesses[FileName]);
|
||||
StartedProcesses.Remove(FileName);
|
||||
/*if (ReadSignalNames.ContainsKey(FileName))
|
||||
{
|
||||
ReadSignalList.Remove(ReadSignalNames[FileName]);
|
||||
ReadSignalNames.Remove(FileName);
|
||||
}*/
|
||||
}
|
||||
//messageServer.Disconnect(FileName);
|
||||
}
|
||||
public void Stop(string fileName)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -602,13 +602,6 @@ namespace VisualPascalABC
|
|||
//CurrentSyntaxEditor.SetText(text);
|
||||
}
|
||||
return true;
|
||||
/*case VisualEnvironmentCompilerAction.SetCurrentSourceFileTextFormatting:
|
||||
string text2 = (string)obj;
|
||||
CurrentSyntaxEditor.SelectAll();
|
||||
Tools.CopyTextToClipboard(text2);
|
||||
CurrentSyntaxEditor.Paste(false);
|
||||
//CurrentSyntaxEditor.SetText(text2);
|
||||
return true;*/
|
||||
case VisualEnvironmentCompilerAction.AddTextToCompilerMessages:
|
||||
AddTextToCompilerMessagesSync((string)obj);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -29,14 +29,10 @@ namespace VisualPascalABC
|
|||
private Dictionary<ICodeFileDocument, string> ReadRequests = new Dictionary<ICodeFileDocument, string>();
|
||||
private Dictionary<string, string> RunArgumentsTable = new Dictionary<string, string>();
|
||||
bool RunActiveTabPage = false;
|
||||
//IUserOptions UserOptions;
|
||||
//IVisualEnvironmentCompiler VisualEnvironmentCompiler;
|
||||
|
||||
public WorkbenchRunService()
|
||||
{
|
||||
//UserOptions = WorkbenchServiceFactory.Workbench.UserOptions;
|
||||
Workbench = WorkbenchServiceFactory.Workbench;
|
||||
//VisualEnvironmentCompiler = WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler;
|
||||
RunnerManager = new RunManager(ReadStringRequest);
|
||||
RunnerManager.Exited += new RunManager.RunnerManagerActionDelegate(RunnerManager_Exited);
|
||||
RunnerManager.Starting += new RunManager.RunnerManagerActionDelegate(RunnerManager_Started);
|
||||
|
|
@ -82,8 +78,6 @@ namespace VisualPascalABC
|
|||
WorkbenchServiceFactory.OperationsService.ClearOutputTextBoxForTabPage(tabPage);
|
||||
Workbench.ErrorsListWindow.ClearErrorList();
|
||||
DesignerService.GenerateAllDesignersCode();
|
||||
//this.Refresh();
|
||||
// new System.Threading.Thread(new System.Threading.ThreadStart(RunCompile)).Start();;
|
||||
string runtimeModule;
|
||||
string ModeName;
|
||||
bool RunWithPause = false;
|
||||
|
|
@ -225,11 +219,6 @@ namespace VisualPascalABC
|
|||
return true;
|
||||
}
|
||||
return true;
|
||||
/*else
|
||||
{
|
||||
DebugStop();
|
||||
return true;
|
||||
}*/
|
||||
}
|
||||
|
||||
void RunTabsAdd(string name, ICodeFileDocument p)
|
||||
|
|
|
|||
Loading…
Reference in a new issue