File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -484,8 +484,11 @@ to work properly with code that includes attributes.
484484 ; ; typename
485485 " \\ (?:[A-Za-z_][[:alnum:]]*\\ .\\ )*"
486486 " [A-Za-z_][[:alnum:]]*"
487- ; ; optional generic constraint
488- " \\ (?:<\\ (?:[[:alpha:]][[:alnum:]]*\\ )\\ (?:[, ]+[[:alpha:]][[:alnum:]]*\\ )*>\\ )?"
487+ ; ; simplified generic constraint.
488+ ; ; handles generic sub-types.
489+ ; ; { is optional because otherwise initializers with
490+ ; ; bracket on same line will indent wrongly.
491+ " \\ (?:<[[:alnum:], <>]+>[ \t\n\f\v\r ]*{?\\ )?"
489492 ; ; optional array-specifier
490493 " \\ (?:\\ [\\ ]\\ )?"
491494 ; ; spacing
Original file line number Diff line number Diff line change @@ -69,6 +69,11 @@ public void Test()
6969 { 2 , "false" } ,
7070 } ;
7171
72+ var map3 = new Dictionary < string , Func < int , bool > >
73+ {
74+ { "IsZero" , ( int i ) => i == 0 }
75+ } ;
76+
7277 using ( test )
7378 {
7479 System . Console . WriteLine ( "boo" ) ;
You can’t perform that action at this time.
0 commit comments