bug fix #2073
This commit is contained in:
parent
e933bdef07
commit
db16f420bd
|
|
@ -1,4 +1,4 @@
|
||||||
type
|
type
|
||||||
Recurrent<T> = class
|
Recurrent<T> = class
|
||||||
first: T;
|
first: T;
|
||||||
next: Func<T,T>;
|
next: Func<T,T>;
|
||||||
|
|
|
||||||
20
TestSuite/namespaces/nslambda1.pas
Normal file
20
TestSuite/namespaces/nslambda1.pas
Normal 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.
|
||||||
8
TestSuite/use_ns_lambda1.pas
Normal file
8
TestSuite/use_ns_lambda1.pas
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
//nopabcrtl
|
||||||
|
{$includenamespace 'namespaces/nslambda1.pas'}
|
||||||
|
|
||||||
|
uses nslambda1;
|
||||||
|
begin
|
||||||
|
assert(T1.Contains('abc','b') = true);
|
||||||
|
t2.Create.p1;
|
||||||
|
end.
|
||||||
|
|
@ -4040,7 +4040,7 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
{
|
{
|
||||||
generate_default_constructor();
|
generate_default_constructor();
|
||||||
}
|
}
|
||||||
if (!context.namespace_converted)
|
if (!context.namespace_converted || context.converted_type.name.IndexOf("<>") != -1)
|
||||||
visit_class_member_realizations(_class_body);
|
visit_class_member_realizations(_class_body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue