Bug 17421 - REPL Crash
Summary: REPL Crash
Status: NEW
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2014-01-24 14:45 UTC by Rodrigo Kumpera
Modified: 2014-01-24 14:45 UTC (History)
1 user (show)

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


Description Rodrigo Kumpera 2014-01-24 14:45:07 UTC
Eval the following:

var f = new int[] { 1, 2 };
var v = new int [] { 4, 5 };
f.Zip(v, (a,b) => Tuple.Create(a,b)).SelectMany(t => Enumerable.Range(0,t.Item1).Select(_0=>t.Item2))

Fails with:
Mono.CSharp.InternalErrorException: (1,50): <InteractiveExpressionClass>.<Host>m__1(System.Tuple<int,int>) ---> Mono.CSharp.InternalErrorException: (1,1): ---> System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.CSharp.HoistedVariable.GetFieldExpression (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.HoistedVariable.Emit (Mono.CSharp.EmitContext ec, Boolean leave_copy) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.VariableReference.Emit (Mono.CSharp.EmitContext ec, Boolean leave_copy) [0x00000] in <filename unknown>:0

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