Bug 13786 - Invalid code emitted when calling vararg as named argument out of position
Summary: Invalid code emitted when calling vararg as named argument out of position
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2013-08-06 14:55 UTC by Urs Keller
Modified: 2013-08-07 06:50 UTC (History)
1 user (show)

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


Attachments
NUnit-test (1.05 KB, application/octet-stream)
2013-08-06 14:55 UTC, Urs Keller
Details


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 FIXED

Description Urs Keller 2013-08-06 14:55:39 UTC
Created attachment 4556 [details]
NUnit-test

mono --version
Mono JIT compiler version 3.2.0 ((no/7c7fcc7 Tue Jul 23 19:59:39 EDT 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug 
	LLVM:          yes(3.3svn-mono)
	GC:            sgen

mcs --version
Mono C# compiler version 3.2.0.0

Steps to reproduce:
- compile the following code and run with mono

using System;
using System.Linq;
using System.Linq.Expressions;
using System.Collections.Generic;
      public class VarargsByNameNotInOrderTest
      {
        public static IList<string> All (bool asc=true,
                                         params Expression<Func<string,bool>>[] where)
        {
          return new List<string> ();
        }
        public static void Main() {
          All(where: x=> true,asc:false);
        }
}

Expected behaviour:
- Program should complete 

Actual behaviour:
- Program terminates with System.InvalidProgramException

Attached a NUnit-test with more details.
Comment 1 Marek Safar 2013-08-07 06:50:19 UTC
Fixed in master