[nem-bug] [Nemerle 0000739]: Try block is not allowed inside expressions

feedback at nemerle.org feedback at nemerle.org
Mon Aug 14 21:52:32 CEST 2006


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=739> 
======================================================================
Reported By:                Snaury
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   739
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             08-14-2006 21:52 CEST
Last Modified:              08-14-2006 21:52 CEST
======================================================================
Summary:                    Try block is not allowed inside expressions
Description: 
// 1.n
// REFERENCE: Nemerle.Compiler
using Nemerle.Compiler;

def transform(l, r = []) {
  match(l) {
    | _ :: xs =>
      transform(xs, Util.locate(Location.Default, <[ null ]>) :: r)
    | _ => r.Rev()
  }
}

def p = transform([1, 2, 3, 4]);
System.Console.WriteLine(p.ToString());

// nbuild 1.n
ncc.exe -no-color -r:Nemerle.Compiler -out:1.exe 1.n
1.n:8:21:8:32: error: try block is not allowed inside expressions
1.n:8:21:8:32: error: try-blocks cannot be used inside expressions, this
message shouldn't happen though
error: child process exited abnormally
... while compiling 1.n

Huh? Why can't try block be used here?
======================================================================

Issue History
Date Modified  Username       Field                    Change              
======================================================================
08-14-06 21:52 Snaury         New Issue                                    
======================================================================




More information about the bugs mailing list