Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes issue #267 #269

Merged
merged 3 commits into from Feb 1, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions Linq/Macro/Linq.nproj
Expand Up @@ -52,10 +52,7 @@
<AssemblyName>System.Core.dll</AssemblyName>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<Name>System.Windows.Forms</Name>
<AssemblyName>System.Windows.Forms.dll</AssemblyName>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="$(Nemerle)\Nemerle.dll" />
<Reference Include="$(Nemerle)\Nemerle.Compiler.dll" />
Expand Down
4 changes: 0 additions & 4 deletions macros/string.n
Expand Up @@ -593,15 +593,11 @@ namespace StringTemplate
{
def makeEllipsisSplaceExpr(env : GlobalEnv, expr : string, isComplexExpr : bool, startLoc : Location) : PT.PExpr
{
#if NET_4_0
// TODO: Find a real bug
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут дело в том, что для кортежей содержащих целые числа, вызов System.Convert.ToString(tuple) приводит к раскрытию кортежа и вместо вызова с одним параметром получается вызов с двумя параметрами. В дальнейшем это приводит к исключению. Так как в System.Convert.ToString перегрузки для кортежей, происходит преобразование в object. По хорошему для кортежей надо всегда генерировать вызов экземплярного ToStrong().

// Force create function in .Net, otherwise we get error
// Possibly it is realated to the bug that
// _ -> string doesn't use the right type but uses always object.
def convertToString = <[ x => System.Convert.ToString(x) ]>;
#else
def convertToString = <[ System.Convert.ToString : _ -> string ]>;
#endif

Util.locate(startLoc,
if (isComplexExpr || env.Manager.IsCompletionInProgress)
Expand Down
3 changes: 2 additions & 1 deletion ncc/testsuite/positive/Issue-git-0255.cs
@@ -1,4 +1,5 @@
using System;
// REFERENCE: System.Core
using System;
using System.Collections.Generic;
using System.Linq;

Expand Down
5 changes: 1 addition & 4 deletions snippets/Nemerle.WPF/Nemerle.WPF/Nemerle.WPF.nproj
Expand Up @@ -58,10 +58,7 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>$(Nemerle)\Nemerle.Compiler.dll</HintPath>
</Reference>
<Reference Include="WindowsBase, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<Name>WindowsBase</Name>
<AssemblyName>WindowsBase.dll</AssemblyName>
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="DependencyProperty.n" />
Expand Down