[nem-bug] [Nemerle 0000588]: Nullrefence in runtime for yields in try block

feedback at nemerle.org feedback at nemerle.org
Thu Dec 22 21:23:43 CET 2005


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=588> 
======================================================================
Reported By:                nazgul
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   588
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             12-22-2005 21:23 CET
Last Modified:              12-22-2005 21:23 CET
======================================================================
Summary:                    Nullrefence in runtime for yields in try block
Description: 
using System;
using System.Collections;
using Nemerle.Imperative;

public class Test
{
	public Foo (a : int) :  IEnumerable
	{
		try {
			try {
				yield a;
			} finally {
				Console.WriteLine ("Hello World");
			}

			Console.WriteLine ("Next block");

			try {
				yield a * a;
			} finally {
				Console.WriteLine ("Boston");
			}
		} finally {
			Console.WriteLine ("Outer finally");
		}

		Console.WriteLine ("Outer block");
	}
}

class X
{
	static Main () : int
	{
		def test = Test ();

		def list = ArrayList ();
		foreach (o in test.Foo (5))
			list.Add (o);
          
		return 0;
	}
}

======================================================================

Issue History
Date Modified  Username       Field                    Change              
======================================================================
12-22-05 21:23 nazgul         New Issue                                    
======================================================================




More information about the bugs mailing list