This commit is contained in:
parent
16274ab958
commit
00846fd0fc
4
TestSuite/generics47.pas
Normal file
4
TestSuite/generics47.pas
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
begin
|
||||||
|
var s := '1234';
|
||||||
|
assert(s.All(char.IsDigit));
|
||||||
|
end.
|
||||||
|
|
@ -1187,6 +1187,18 @@ namespace PascalABCCompiler.TreeRealization
|
||||||
if (sil != null && sil.Count > 0)
|
if (sil != null && sil.Count > 0)
|
||||||
fact_func = sil[0].sym_info as function_node;
|
fact_func = sil[0].sym_info as function_node;
|
||||||
}
|
}
|
||||||
|
else if (dm != null && dm.proper_methods.Count > 1 && formal_type.original_generic is compiled_type_node && (formal_type.original_generic as compiled_type_node).compiled_type.FullName.StartsWith("System.Func`"))
|
||||||
|
{
|
||||||
|
var ctn = formal_type.original_generic as compiled_type_node;
|
||||||
|
foreach (var fc in dm.proper_methods)
|
||||||
|
{
|
||||||
|
if (fc.simple_function_node.parameters.Count == formal_type.instance_params.Count - 1)
|
||||||
|
{
|
||||||
|
fact_func = fc.simple_function_node;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (fact_func != null)
|
if (fact_func != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue