[nem-bug] [Nemerle 0000551]: { } brackets in string interpolation
crash compiler
feedback at nemerle.org
feedback at nemerle.org
Wed Oct 19 18:55:42 CEST 2005
The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=551>
======================================================================
Reported By: gildur
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 551
Category: Compiler (parser/macros engine)
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 10-19-2005 18:55 CEST
Last Modified: 10-19-2005 18:55 CEST
======================================================================
Summary: { } brackets in string interpolation crash compiler
Description:
I tried to compile following code:
------
using System;
public module Lists
{
public Head[T](l : list[T]) : T
{
match (l)
{
| x :: _ => x
| [] => throw ArgumentException("List too short.")
}
}
public Tail[T](l : list[T]) : list[T]
{
match (l)
{
| _ :: xs => xs
| [] => []
}
}
}
def l = [1, 2, 3];
Console.WriteLine($"List: ${l}");
Console.WriteLine($"Head: ${Lists.Head(l)}");
Console.WriteLine($"Tail: ${Lists.Tail(l)}");
------
And i got following error:
error: internal compiler error: got some unknown exception of type
System.IndexOutOfRangeException: Array index is out of range.
in <0x001fd> Nemerle.Compiler.NamespaceTree+Node:TryPath
(Nemerle.Core.list`1 n)
<rest of stack trace here>
Expected result: rejecting this code with a hint to change { } to ( ) in
string
interpolation code.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
10-19-05 18:55 gildur New Issue
======================================================================
More information about the bugs
mailing list