Bug 27816 - C#6 interpolated string raises NotImplementedException during compilation
Summary: C#6 interpolated string raises NotImplementedException during compilation
Status: RESOLVED DUPLICATE of bug 27525
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-03-10 09:12 UTC by bawNg
Modified: 2015-03-10 09:21 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 27525

Description bawNg 2015-03-10 09:12:22 UTC
Reproduced using:
>using System;
>
>public class Test {
>       const int bar = 1;
>       string foo = $"{bar}";
>	public void Main() { }
>}

Output during compilation:
>[ERROR] FATAL UNHANDLED EXCEPTION: System.NotImplementedException: CloneTo not implemented for expression Mono.CSharp.InterpolatedString
>  at Mono.CSharp.Expression.CloneTo (Mono.CSharp.CloneContext clonectx, Mono.CSharp.Expression target) [0x00000] in <filename unknown>:0
>  at Mono.CSharp.Expression.Clone (Mono.CSharp.CloneContext clonectx) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Assign.CloneTo (Mono.CSharp.CloneContext clonectx, Mono.CSharp.Expression t) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Expression.Clone (Mono.CSharp.CloneContext clonectx) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.TypeDefinition.ResolveFieldInitializers (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Constructor.Emit () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.TypeDefinition.Emit () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.ClassOrStruct.Emit () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Class.Emit () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.TypeDefinition.EmitContainer () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.TypeContainer.EmitContainer () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.TypeContainer.EmitContainer () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.TypeContainer.EmitContainer () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.ModuleContainer.EmitContainer () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.AssemblyDefinition.Emit () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.AssemblyDefinitionStatic.Emit () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0>
Comment 1 Marek Safar 2015-03-10 09:21:35 UTC

*** This bug has been marked as a duplicate of bug 27525 ***