Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mcs] Emit field initializer with expression tree in all user constru…
…ctors. Fixes #18308
- Loading branch information
1 parent
77d00e1
commit 704ca78
Showing
7 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Linq.Expressions; | ||
|
||
public sealed class C | ||
{ | ||
public C () | ||
{ | ||
} | ||
|
||
public C (Action<object, object> tappedCallback) | ||
{ | ||
} | ||
|
||
public readonly string TappedCallbackProperty = Create<C, Action<object, object>> (o => o.TappedCallback); | ||
|
||
public Action<object, object> TappedCallback { | ||
get; | ||
set; | ||
} | ||
|
||
public static string Create<T1, T2> (Expression<Func<T1, T2>> getter) | ||
{ | ||
return null; | ||
} | ||
|
||
public static void Main () | ||
{ | ||
new C (null); | ||
} | ||
} |