diff --git a/CodeCompletion/DomSyntaxTreeVisitor.cs b/CodeCompletion/DomSyntaxTreeVisitor.cs index bf906be81..b4a9bcc4b 100644 --- a/CodeCompletion/DomSyntaxTreeVisitor.cs +++ b/CodeCompletion/DomSyntaxTreeVisitor.cs @@ -3480,6 +3480,20 @@ namespace CodeCompletion } } } + /*if (good_procs.Count == 0) + { + for (int i = 0; i < meths.Length; i++) + { + if (meths[i] is ProcScope) + { + if ((meths[i] as ProcScope).parameters.Count == arg_types.Count) + { + good_procs.Add(meths[i] as ProcScope); + break; + } + } + } + }*/ if (good_procs.Count > 0) { if (obj != null) diff --git a/CodeCompletion/SymTable.cs b/CodeCompletion/SymTable.cs index 52cee447f..2e5625ba4 100644 --- a/CodeCompletion/SymTable.cs +++ b/CodeCompletion/SymTable.cs @@ -3668,7 +3668,7 @@ namespace CodeCompletion if (arrs == null || !arrs.is_dynamic_arr && !arrs.IsMultiDynArray) if (ts is TypeSynonim) return this.IsConvertable((ts as TypeSynonim).actType); else return false; - if (arrs.elementType == null) + if (arrs.elementType == null || arrs.elementType is TemplateParameterScope) return true; if (!this.elementType.IsEqual(arrs.elementType)) return false; if (this.IsMultiDynArray && arrs.IsMultiDynArray) @@ -3693,7 +3693,8 @@ namespace CodeCompletion return this.IsEqual((ts as TypeSynonim).actType); else return false; - if (arrs.elementType == null) return true; + if (arrs.elementType == null || arrs.elementType is TemplateParameterScope) + return true; if (!this.elementType.IsEqual(arrs.elementType)) return false; if (is_multi_dyn_arr && !arrs.is_multi_dyn_arr) diff --git a/TestSuite/intellisense_tests/lambdas12.pas b/TestSuite/intellisense_tests/lambdas12.pas new file mode 100644 index 000000000..b72dac878 --- /dev/null +++ b/TestSuite/intellisense_tests/lambdas12.pas @@ -0,0 +1,9 @@ +begin + var a := MatrRandomInteger(3,4,1,9); + a.Println; + Println; + var b := a.Cols; + Sort(b, col -> col{@parameter col: array of integer;@}.Sum); // Сортировка с проекцией на ключ + a := MatrByCol(b); // собрать матрицу из массива массивов + a.Println; +end. \ No newline at end of file diff --git a/VisualPascalABCNET/Workbench/OptionsManager.cs b/VisualPascalABCNET/Workbench/OptionsManager.cs index cf228a85c..d4551d1ab 100644 --- a/VisualPascalABCNET/Workbench/OptionsManager.cs +++ b/VisualPascalABCNET/Workbench/OptionsManager.cs @@ -239,7 +239,11 @@ namespace VisualPascalABC if ((value = (string)Options[OptionsItemPABCDllChecked]) != null) UserOptions.PABCDllChecked = Convert.ToBoolean(value); if ((value = (string)Options[OptionsItemNameUseSemanticIntellisense]) != null) + { UserOptions.UseSemanticIntellisense = Convert.ToBoolean(value); + CodeCompletion.DomSyntaxTreeVisitor.use_semantic_for_intellisense = UserOptions.UseSemanticIntellisense; + } + int i = 0; while ((value = (string)Options[OptionsItemNameLastFile + (i++).ToString()]) != null) AddLastFile(value);