bug fix #2714
This commit is contained in:
parent
73185e3fa0
commit
4a1408562d
|
|
@ -528,7 +528,7 @@ namespace SyntaxVisitors
|
||||||
{
|
{
|
||||||
cu.visit(methodsVis);
|
cu.visit(methodsVis);
|
||||||
// Collect
|
// Collect
|
||||||
collectedMethods.UnionWith(methodsVis.CollectedMethods.Select(id => id.name.ToLower()));
|
collectedMethods.UnionWith(methodsVis.CollectedMethods.Select(id => id.name != null ? id.name.ToLower() : null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
TestSuite/yieldoperator1.pas
Normal file
22
TestSuite/yieldoperator1.pas
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
type
|
||||||
|
t1 = class
|
||||||
|
|
||||||
|
// Обязательно оператор
|
||||||
|
static function operator+(p1, p2: t1): t1;
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
// Обязательно yield-функция
|
||||||
|
// Не важно, статическая или экземплярная
|
||||||
|
function f1: sequence of byte;
|
||||||
|
begin
|
||||||
|
yield 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
var o := new t1;
|
||||||
|
assert(o.f1.ToArray[0] = 1);
|
||||||
|
end.
|
||||||
Loading…
Reference in a new issue