Bug 28292 - Internal compiler error when an interpolated string is too long
Summary: Internal compiler error when an interpolated string is too long
Status: RESOLVED FIXED
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-21 12:50 UTC by bawNg
Modified: 2015-03-25 12:19 UTC (History)
2 users (show)

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


Attachments

Description bawNg 2015-03-21 12:50:06 UTC
Reproduced using:

>using System;
>
>public static class Test {
>	public static void Main() {
>		Console.WriteLine($"This should work but the compiler explodes if the string is too long!");
>	}
>}

This fails during compilation:
>error CS0589: Internal compiler error during parsingSystem.IndexOutOfRangeException: Array index is out of range.
>  at Mono.CSharp.Tokenizer.TokenizeInterpolatedString () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Tokenizer.xtoken () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Tokenizer.token () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.CSharpParser.yyparse (yyInput yyLex) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.CSharpParser.parse () [0x00000] in <filename unknown>:0
Comment 1 Marek Safar 2015-03-25 12:19:55 UTC
Fixed in master and mono 4.0

Note You need to log in before you can comment on or make changes to this bug.