Merge pull request #5664 from lateralusX/lateralusX/mkbundle-windows-toolchains
[mono.git] / mcs / errors / cs8075.cs
1 // CS8075: An expression tree cannot contain a collection initializer with extension method
2 // Line: 12
3
4 using System;
5 using System.Collections.Generic;
6 using System.Linq.Expressions;
7
8 class Program
9 {
10         static void Main()
11         {
12                 Expression<Func<Stack<int>>> e = () => new Stack<int> { 42 };           
13         }
14 }
15
16 static class X
17 {
18         public static void Add<T>(this Stack<T> s, T value) => s.Push (value);
19 }