rsdn/nemerle — Issue #267: Bug for code generation $"..$a"
Author: NN---
Created: 2012-01-31 09:26:17+00:00
State: open

```nemerle
// REFERENCE: System.Core
// REFERENCE: Nemerle.Linq
using System;
using System.Console;
using System.Linq;
using Nemerle.Extensions;
using Nemerle.Collections;
using Nemerle.Utility;

module Program
{
Main() : void
{
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.InvariantCulture;

def result = array[1, 2].AsQueryable().Select(o => ('a', 'b'));
WriteLine($"..$result");
}
}
```

This generates following code:

```nemerle
Console.WriteLine(string.Concat(array[string.Join(", ",
NCollectionsExtensions.MapToArray.[object, string](
result, x => Convert.ToString(x)))]));
```

Instead of this:

```nemerle
Console.WriteLine(string.Concat(array[string.Join(", ",
NCollectionsExtensions.MapToArray.[Tuple.[char, char], string](
result, x => Convert.ToString(x)))]));
```

Incorrect: MapToArray.[object, string]
Correct: MapToArray.[Tuple.[char, char], string]