* branch init * add BindCollectLightSymInfo * moved lightsyminfo to syntaxVisitors * LIghtSymInfo fixes * binder 0.1 * Attributes -> SymbolAttributes * AssignTupleOptimizer -> AssignTupleDesugar * moved algorithm classes to AssignTupleDesugarAlgorithm namespace * fixes and refactoring * LightSymInfo rework * add rebuildDebug and build units * enable VarNamesInMethodsWithSameNameAsClassGenericParamsReplacer * remove CollectFullLightSymInfo call * bind now return BindResult * change BindResult path type * path testing * fix Current in BindCollectLightSymInfo * fix Current in BindCollectLightSymInfo * fix #3116 * (the rest of the fix) * potential symomyms handling without assigns count minimization * assign count minimization * rename AssignTuplesDesugar * move NewAssignTupleDesugar * add optimization switch * delete AssignTupleDesugar project * remove comments * collect symbols from var tuples * optimize var_tuple_def_statement and assign_var_tuple * fix * fix Tuple Visitor * #3091 * #3125 * revert #3125 * #3125 * #3123 * #3123 * #3127 * fix * del doc * await переместил * Перегенерировал грамматику * s.ToLines RenameDirectory * Исправление ToLines * Убрал из грамматики узлы await - случайно оставались * Sync `.ToLines` with `System.IO.StringReader` (#3154) * 3.9.0.3494 * add const optimization * #3152 * #3152 --------- Co-authored-by: Sun Serega <sunserega2@gmail.com> Co-authored-by: Ivan Bondarev <ibond84@googlemail.com> Co-authored-by: Mikhalkovich Stanislav <miks@math.sfedu.ru> Co-authored-by: Артём Филонов <afilono@sfedu.ru>
29 lines
749 B
ObjectPascal
29 lines
749 B
ObjectPascal
function V(n: byte) := 1;
|
|
|
|
function f1: sequence of integer;
|
|
begin
|
|
//Ошибка: Ожидалось имя процедуры или функции
|
|
var v := V(0);
|
|
// Если закомментировать эту строчку - предыдущая строчка работает
|
|
yield v;
|
|
end;
|
|
|
|
function f2: sequence of integer;
|
|
begin
|
|
//Ошибка: Ожидалось имя процедуры или функции
|
|
var v := V(0);
|
|
var w := v + 1;
|
|
// Если закомментировать эту строчку - предыдущая строчка работает
|
|
yield w;
|
|
end;
|
|
|
|
begin
|
|
var i := 0;
|
|
foreach var j in f1 do
|
|
i := j;
|
|
assert(i = 1);
|
|
|
|
foreach var j in f2 do
|
|
i := j;
|
|
assert(i = 2);
|
|
end. |