This commit is contained in:
Бондарев Иван 2019-10-20 12:28:44 +02:00
parent e933bdef07
commit db16f420bd
4 changed files with 30 additions and 2 deletions

View file

@ -1,4 +1,4 @@
type
type
Recurrent<T> = class
first: T;
next: Func<T,T>;

View file

@ -0,0 +1,20 @@
namespace nslambda1;
type
T1 = class
public static function Contains(s: string; c: char) := s.Any(x -> x = c);
end;
t2 = class
const c1 = 5;
procedure p1;
begin
var arr1 := ArrGen(1, i -> c1);
assert(arr1[0] = 5);
end;
end;
end.

View file

@ -0,0 +1,8 @@
//nopabcrtl
{$includenamespace 'namespaces/nslambda1.pas'}
uses nslambda1;
begin
assert(T1.Contains('abc','b') = true);
t2.Create.p1;
end.

View file

@ -4040,7 +4040,7 @@ namespace PascalABCCompiler.TreeConverter
{
generate_default_constructor();
}
if (!context.namespace_converted)
if (!context.namespace_converted || context.converted_type.name.IndexOf("<>") != -1)
visit_class_member_realizations(_class_body);
}