rsdn/nemerle — Issue #302: bug - non local goto (block return?) detected (l4156)
Author: Firebie
Created: 2012-02-26 11:09:47+00:00
State: open

using Nemerle.Collections;
using Nemerle.Text;
using Nemerle.Utility;
using Nemerle.Imperative;

using System;
using System.Collections.Generic;
using System.Console;
using System.Linq;
using System.IO;
using System.Text;

module Program
{
Main() : void
{
Test(10);
}

Test(a : int) : void
{
mutable classes = [1, 2, 3];
mutable sorted = List();

while (true)
{
def withNoDep = classes.Filter(x => x == 0);

when (a == 0)
break; // BUG???

sorted.AddRange(withNoDep);

def withDep = classes.Filter(x => x > 0);
withNoDep.Iter(_b => withDep.Iter(x => _ = x));
}
}
}