This commit is contained in:
Ivan Bondarev 2022-09-25 10:53:20 +02:00
parent 73185e3fa0
commit 4a1408562d
2 changed files with 23 additions and 1 deletions

View file

@ -528,7 +528,7 @@ namespace SyntaxVisitors
{
cu.visit(methodsVis);
// Collect
collectedMethods.UnionWith(methodsVis.CollectedMethods.Select(id => id.name.ToLower()));
collectedMethods.UnionWith(methodsVis.CollectedMethods.Select(id => id.name != null ? id.name.ToLower() : null));
}
}
}

View 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.