dbremner / rubydotnetcompiler

Automatically exported from code.google.com/p/rubydotnetcompiler
0 stars 0 forks source link

return inside when and else #13

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
def f; case nil; when nil; return nil; else; return nil; end; end; f

Ruby.NET generates invalid code.

Original issue reported on code.google.com by sanxiyn on 23 Aug 2007 at 12:26

GoogleCodeExporter commented 8 years ago
This may have been fixed by one of my recent commits.

peverify still reports a stack underflow error but the code in question is 
unreachable.

I would therefore like to classify this issue as resolved.

Your thoughts???

Original comment by DrWayneK...@gmail.com on 3 Sep 2007 at 1:50

GoogleCodeExporter commented 8 years ago
Unfortunately, the generated code (with r75) still throws 
InvalidProgramException on
Mono (r84500 ~= 1.2.5).

Original comment by sanxiyn on 3 Sep 2007 at 2:28

GoogleCodeExporter commented 8 years ago
While mono not allowing unverifiable code sounds like a bug, I think this would 
also 
prevent running in Silverlight and other contexts.

Original comment by douglas....@gmail.com on 3 Sep 2007 at 3:03

GoogleCodeExporter commented 8 years ago
Reopening this bug.

Original comment by sason...@gmail.com on 25 Oct 2007 at 7:05

GoogleCodeExporter commented 8 years ago
Confirmed in Mono/Windows, but only when the file is compiled using 
RubyCompiler.exe. The .rb file runs OK from Ruby.exe.

Original comment by sason...@gmail.com on 25 Oct 2007 at 8:36