bug fix #774
This commit is contained in:
parent
3e1d264cbd
commit
15e62a5335
|
|
@ -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.
|
|
@ -1836,6 +1836,7 @@ namespace PascalABCCompiler.Parsers
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
sb.Append(tt[i].Name);
|
||||
if (i < tt.Length - 1) sb.Append(',');
|
||||
|
|
|
|||
3
TestSuite/intellisense_tests/generics7.pas
Normal file
3
TestSuite/intellisense_tests/generics7.pas
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
begin
|
||||
''.Select{@(расширение sequence of T) function Select<char,TResult>(selector: char->TResult): sequence of TResult;@}(x->Ord(x));
|
||||
end.
|
||||
Loading…
Reference in a new issue