This commit is contained in:
Бондарев Иван 2018-04-19 21:05:47 +02:00
parent 3e1d264cbd
commit 15e62a5335
4 changed files with 11 additions and 1 deletions

View file

@ -6762,10 +6762,16 @@ namespace CodeCompletion
//private CompiledScope ret_type;
public CompiledMethodScope(SymInfo si, MethodInfo mi, CompiledScope declaringType)
public CompiledMethodScope(SymInfo si, MethodInfo mi, TypeScope declaringType)
{
this.si = si;
this.mi = mi;
if (declaringType == TypeTable.string_type && mi.GetParameters().Length >= 1 && mi.GetParameters()[0].ParameterType.Name == "IEnumerable`1")
{
List<TypeScope> type_list = new List<TypeScope>();
type_list.Add(TypeTable.char_type);
declaringType = TypeTable.get_compiled_type(mi.GetParameters()[0].ParameterType.GetGenericTypeDefinition()).GetInstance(type_list);
}
string[] args = declaringType.TemplateArguments;
this.declaringType = declaringType;
if (args != null)

Binary file not shown.

View file

@ -1836,6 +1836,7 @@ namespace PascalABCCompiler.Parsers
}
}
}
else
sb.Append(tt[i].Name);
if (i < tt.Length - 1) sb.Append(',');

View file

@ -0,0 +1,3 @@
begin
''.Select{@(расширение sequence of T) function Select<char,TResult>(selector: char->TResult): sequence of TResult;@}(x->Ord(x));
end.