unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 41dfed7df7fbc05a120dce00892a62f81c97a325 125202 bytes (raw)
name: gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch 	 # note: path name is non-authoritative(*)

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
 
Includes the following commits:
6f5bfe5cf5a
3812d1c13fc
a80f3d0d87c
b2f051f0b19
2a202a8478b
4d7d1606d73
d9970305731
94e80fc8d7f
0b9280083a9
07d1e5f36a5
5f279f14aa2
889421f3bef
f4c0fd3dc11
71df5c63b46
d6e5bf16782
207f5c2cd6d
c512752a416
9aca8d5fe4b
diff --git a/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs b/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs
index 97f9e047e6d..f8bf63455de 100644
--- a/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs
+++ b/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs
@@ -131,5 +131,17 @@ namespace MonoTests.EvaluatorTest
 		{
 			Evaluator.Run ("public class TestClass { private TestEnum _te; public string Get() { return _te.ToString(); } } public enum TestEnum { First, Second }");
 		}
+
+		[Test]
+		public void EnumTypeWithOrderDependency ()
+		{
+			Evaluator.Run ("public class TestClass { public enum TestEnum { Val1, Val2, Val3 } public TestEnum test; public TestClass() { test = TestEnum.Val3; } }");
+			object res = Evaluator.Evaluate ("new TestClass()");
+
+			var fields = res.GetType ().GetFields ();
+			foreach (var field in fields) {
+				Console.WriteLine ($"{field.Name} = {field.MemberType}");
+			}
+		}
 	}
 }
\ No newline at end of file
diff --git a/mcs/errors/cs0023-30.cs b/mcs/errors/cs0023-30.cs
new file mode 100644
index 00000000000..fc19cc24e3e
--- /dev/null
+++ b/mcs/errors/cs0023-30.cs
@@ -0,0 +1,11 @@
+// CS0023: The `is' operator cannot be applied to operand of type `default'
+// Line: 9
+// Compiler options: -langversion:latest
+
+class C
+{
+	static void Main ()
+	{
+		bool d = default is C;
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0029-39.cs b/mcs/errors/cs0029-39.cs
new file mode 100644
index 00000000000..0ed200036dc
--- /dev/null
+++ b/mcs/errors/cs0029-39.cs
@@ -0,0 +1,15 @@
+// CS0029: Cannot implicitly convert type `S' to `object'
+// Line: 13
+// Compiler options: -langversion:latest
+
+public ref struct S
+{
+}
+
+class Test
+{
+	public static void Main ()
+	{
+		object o = new S ();
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0029-40.cs b/mcs/errors/cs0029-40.cs
new file mode 100644
index 00000000000..6d9167c31fa
--- /dev/null
+++ b/mcs/errors/cs0029-40.cs
@@ -0,0 +1,19 @@
+// CS0029: Cannot implicitly convert type `S' to `System.ValueType'
+// Line: 16
+// Compiler options: -langversion:latest
+
+using System;
+
+public ref struct S
+{
+}
+
+class Test
+{
+	public static void Main ()
+	{
+		var s = default (S);
+		ValueType s2 = s;
+		var res = default (S).ToString ();
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0029-41.cs b/mcs/errors/cs0029-41.cs
new file mode 100644
index 00000000000..1a65f52f737
--- /dev/null
+++ b/mcs/errors/cs0029-41.cs
@@ -0,0 +1,12 @@
+// CS0029: Cannot implicitly convert type `System.TypedReference' to `object'
+// Line: 10
+
+using System;
+
+class Test
+{
+	public static void Main ()
+	{
+		var res = default (TypedReference).ToString ();
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0029-42.cs b/mcs/errors/cs0029-42.cs
new file mode 100644
index 00000000000..c7671000c76
--- /dev/null
+++ b/mcs/errors/cs0029-42.cs
@@ -0,0 +1,10 @@
+// CS0029: Cannot implicitly convert type `string' to `int'
+// Line: 8
+
+class C
+{
+	void Exists (int _)
+	{
+		_ = "2";
+	}	
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0030-17.cs b/mcs/errors/cs0030-17.cs
new file mode 100644
index 00000000000..b72b8bf71e5
--- /dev/null
+++ b/mcs/errors/cs0030-17.cs
@@ -0,0 +1,15 @@
+// CS0030: Cannot convert type `object' to `S'
+// Line: 13
+// Compiler options: -langversion:latest
+
+ref struct S
+{
+}
+
+class X
+{
+	public static void Foo (object o)
+	{
+		var res = (S) o;
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0103-18.cs b/mcs/errors/cs0103-18.cs
new file mode 100644
index 00000000000..8cec755d23d
--- /dev/null
+++ b/mcs/errors/cs0103-18.cs
@@ -0,0 +1,10 @@
+// CS0103: The name `_' does not exist in the current context
+// Line: 8
+
+class C
+{
+	void Test ()
+	{
+		_.ToString ();
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0123-10.cs b/mcs/errors/cs0123-10.cs
new file mode 100644
index 00000000000..43d5e5d6368
--- /dev/null
+++ b/mcs/errors/cs0123-10.cs
@@ -0,0 +1,18 @@
+// CS0123: A method or delegate `object.ToString()' parameters do not match delegate `System.Func<string>()' parameters
+// Line: 16
+// Compiler options: -langversion:latest
+
+using System;
+
+public ref struct S
+{
+}
+
+class Test
+{
+	public static void Main ()
+	{
+		var s = new S ();
+		Func<string> f = s.ToString;
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0123-11.cs b/mcs/errors/cs0123-11.cs
new file mode 100644
index 00000000000..427b628c159
--- /dev/null
+++ b/mcs/errors/cs0123-11.cs
@@ -0,0 +1,12 @@
+// CS0123: A method or delegate `object.ToString()' parameters do not match delegate `System.Func<string>()' parameters
+// Line: 16
+
+using System;
+
+class Test
+{
+	public static void Main ()
+	{
+		Func<string> f = default (TypedReference).ToString;
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0133-2.cs b/mcs/errors/cs0133-2.cs
index b7a37182d73..48488876f7e 100644
--- a/mcs/errors/cs0133-2.cs
+++ b/mcs/errors/cs0133-2.cs
@@ -1,4 +1,4 @@
-// CS0133: The expression being assigned to `c' must be constant
+// CS0133: The expression being assigned to `c' must be a constant or default value
 // Line: 10
 
 class C
diff --git a/mcs/errors/cs0133-3.cs b/mcs/errors/cs0133-3.cs
index caae3bde68c..2f7dac6880d 100644
--- a/mcs/errors/cs0133-3.cs
+++ b/mcs/errors/cs0133-3.cs
@@ -1,5 +1,5 @@
-// CS0133: The expression being assigned to `Foo' must be constant
-// Line: 12
+// CS0133: The expression being assigned to `Foo' must be a constant or default value
+// Line: 8
 
 class T
 {
diff --git a/mcs/errors/cs0133-4.cs b/mcs/errors/cs0133-4.cs
index 41fe639b446..54162d544ca 100644
--- a/mcs/errors/cs0133-4.cs
+++ b/mcs/errors/cs0133-4.cs
@@ -1,4 +1,4 @@
-// CS0133: The expression being assigned to `S.pathName' must be constant
+// CS0133: The expression being assigned to `S.pathName' must be a constant or default value
 // Line: 12
 // Compiler options: -unsafe
 
diff --git a/mcs/errors/cs0133-5.cs b/mcs/errors/cs0133-5.cs
index a49f265c690..32e6bfdf416 100644
--- a/mcs/errors/cs0133-5.cs
+++ b/mcs/errors/cs0133-5.cs
@@ -1,4 +1,4 @@
-// CS0133: The expression being assigned to `b' must be constant
+// CS0133: The expression being assigned to `b' must be a constant or default value
 // Line: 8
 
 class X
diff --git a/mcs/errors/cs0133-6.cs b/mcs/errors/cs0133-6.cs
index a523169cdbd..28448dd6de8 100644
--- a/mcs/errors/cs0133-6.cs
+++ b/mcs/errors/cs0133-6.cs
@@ -1,4 +1,4 @@
-// CS0133: The expression being assigned to `o' must be constant
+// CS0133: The expression being assigned to `o' must be a constant or default value
 // Line: 8
 
 class X
diff --git a/mcs/errors/cs0133-7.cs b/mcs/errors/cs0133-7.cs
index 10d82d9fe5e..024bc148229 100644
--- a/mcs/errors/cs0133-7.cs
+++ b/mcs/errors/cs0133-7.cs
@@ -1,4 +1,4 @@
-// CS0133: The expression being assigned to `o' must be constant
+// CS0133: The expression being assigned to `o' must be a constant or default value
 // Line: 8
 
 class X
diff --git a/mcs/errors/cs0133.cs b/mcs/errors/cs0133.cs
index 094194deabb..f0dda9ee3cb 100644
--- a/mcs/errors/cs0133.cs
+++ b/mcs/errors/cs0133.cs
@@ -1,5 +1,6 @@
-// CS0133: The expression being assigned to `x' must be constant
-// Line: 6
+// CS0133: The expression being assigned to `x' must be a constant or default value
+// Line: 7
+
 class X {
 	X (int arg)
 	{
diff --git a/mcs/errors/cs0306-4.cs b/mcs/errors/cs0306-4.cs
new file mode 100644
index 00000000000..4653512e55b
--- /dev/null
+++ b/mcs/errors/cs0306-4.cs
@@ -0,0 +1,15 @@
+// CS0306: The type `S' may not be used as a type argument
+// Line: 13
+// Compiler options: -langversion:latest
+
+public ref struct S
+{
+}
+
+class Test<T>
+{
+	public static void Foo ()
+	{
+		Test<S> local;
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0611-3.cs b/mcs/errors/cs0611-3.cs
new file mode 100644
index 00000000000..6eda773dd24
--- /dev/null
+++ b/mcs/errors/cs0611-3.cs
@@ -0,0 +1,15 @@
+// CS0611: Array elements cannot be of type `S'
+// Line: 13
+// Compiler options: -langversion:latest
+
+public ref struct S
+{
+}
+
+class Test
+{
+	public static void Main ()
+	{
+		var x = new S[0];
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0815-9.cs b/mcs/errors/cs0815-9.cs
new file mode 100644
index 00000000000..f54703349be
--- /dev/null
+++ b/mcs/errors/cs0815-9.cs
@@ -0,0 +1,11 @@
+// CS0815: An implicitly typed local variable declaration cannot be initialized with `default'
+// Line: 9
+// Compiler options: -langversion:latest
+
+static class X
+{
+	public static void Main ()
+	{
+		var x = default;
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1502-11.cs b/mcs/errors/cs1502-11.cs
deleted file mode 100644
index 82dcb3a2c17..00000000000
--- a/mcs/errors/cs1502-11.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// CS1502: The best overloaded method match for `string.String(char*)' has some invalid arguments
-// Line: 8
-
-class C
-{
-	static string Prop {
-		get {
-			return new string ("s");
-		}
-    }
-}
diff --git a/mcs/errors/cs1599-2.cs b/mcs/errors/cs1599-2.cs
index 941ff6bb0d6..28aa05b2ed3 100644
--- a/mcs/errors/cs1599-2.cs
+++ b/mcs/errors/cs1599-2.cs
@@ -1,4 +1,4 @@
-// CS1599: Method or delegate cannot return type `System.ArgIterator'
+// CS1599: The return type of `System.ArgIterator' is not allowed
 // Line: 8
 
 using System;
diff --git a/mcs/errors/cs1599-3.cs b/mcs/errors/cs1599-3.cs
index e4869dcaf70..9d378099d82 100644
--- a/mcs/errors/cs1599-3.cs
+++ b/mcs/errors/cs1599-3.cs
@@ -1,4 +1,4 @@
-// CS1599: Method or delegate cannot return type `System.ArgIterator'
+// CS1599: The return type of `System.ArgIterator' is not allowed
 // Line: 8
 
 using System;
diff --git a/mcs/errors/cs1599-4.cs b/mcs/errors/cs1599-4.cs
new file mode 100644
index 00000000000..358eee59a13
--- /dev/null
+++ b/mcs/errors/cs1599-4.cs
@@ -0,0 +1,12 @@
+// CS1599: The return type of `System.TypedReference' is not allowed
+// Line: 8
+
+using System;
+
+public class Program
+{
+    public static TypedReference operator + (int a, Program b)
+    {
+    	throw new ApplicationException ();
+    }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1599.cs b/mcs/errors/cs1599.cs
index 5cef32d7f97..871d9fb3e7a 100644
--- a/mcs/errors/cs1599.cs
+++ b/mcs/errors/cs1599.cs
@@ -1,4 +1,4 @@
-// CS1599: Method or delegate cannot return type `System.TypedReference'
+// CS1599: The return type of `System.TypedReference' is not allowed
 // Line: 8
 
 using System;
diff --git a/mcs/errors/cs1644-57.cs b/mcs/errors/cs1644-57.cs
new file mode 100644
index 00000000000..7ee98373080
--- /dev/null
+++ b/mcs/errors/cs1644-57.cs
@@ -0,0 +1,7 @@
+// CS1644: Feature `ref structs' cannot be used because it is not part of the C# 7.0 language specification
+// Line: 5
+// Compiler options: -langversion:7
+
+ref struct S
+{
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1644-58.cs b/mcs/errors/cs1644-58.cs
new file mode 100644
index 00000000000..e994cf338bd
--- /dev/null
+++ b/mcs/errors/cs1644-58.cs
@@ -0,0 +1,8 @@
+// CS1644: Feature `default literal' cannot be used because it is not part of the C# 7.0 language specification
+// Line: 7
+// Compiler options: -langversion:7
+
+class X
+{
+	int i = default;
+}
diff --git a/mcs/errors/cs1644-59.cs b/mcs/errors/cs1644-59.cs
new file mode 100644
index 00000000000..2f8aed6b958
--- /dev/null
+++ b/mcs/errors/cs1644-59.cs
@@ -0,0 +1,13 @@
+// CS1644: Feature `readonly references' cannot be used because it is not part of the C# 7.0 language specification
+// Line: 9
+// Compiler options: -langversion:7
+
+class X
+{
+	int i;
+
+	ref readonly int Test ()
+	{
+		return ref i;
+	}
+}
diff --git a/mcs/errors/cs1644-60.cs b/mcs/errors/cs1644-60.cs
new file mode 100644
index 00000000000..ca9547bc561
--- /dev/null
+++ b/mcs/errors/cs1644-60.cs
@@ -0,0 +1,11 @@
+// CS1644: Feature `discards' cannot be used because it is not part of the C# 6.0 language specification
+// Line: 9
+// Compiler options: -langversion:6
+
+class X
+{
+	int Test ()
+	{
+		_ = 2;
+	}
+}
diff --git a/mcs/errors/cs1738-2.cs b/mcs/errors/cs1738-2.cs
index f59221f4c7a..44b3f6d1b14 100644
--- a/mcs/errors/cs1738-2.cs
+++ b/mcs/errors/cs1738-2.cs
@@ -1,4 +1,4 @@
-// CS1738: Named arguments must appear after the positional arguments
+// CS1738: Named arguments must appear after the positional arguments when using language version older than 7.2
 // Line: 13
 
 using System;
diff --git a/mcs/errors/cs1738-3.cs b/mcs/errors/cs1738-3.cs
index 53c4efc3553..901ac0e5d59 100644
--- a/mcs/errors/cs1738-3.cs
+++ b/mcs/errors/cs1738-3.cs
@@ -1,4 +1,4 @@
-// CS1738: Named arguments must appear after the positional arguments
+// CS1738: Named arguments must appear after the positional arguments when using language version older than 7.2
 // Line: 14
 
 class C
diff --git a/mcs/errors/cs1738.cs b/mcs/errors/cs1738.cs
index dab9a61160b..537bc17b917 100644
--- a/mcs/errors/cs1738.cs
+++ b/mcs/errors/cs1738.cs
@@ -1,4 +1,4 @@
-// CS1738: Named arguments must appear after the positional arguments
+// CS1738: Named arguments must appear after the positional arguments when using language version older than 7.2
 // Line: 12
 
 class C
diff --git a/mcs/errors/cs1983.cs b/mcs/errors/cs1983.cs
index a2ef6c150d6..76d2db4e677 100644
--- a/mcs/errors/cs1983.cs
+++ b/mcs/errors/cs1983.cs
@@ -1,4 +1,4 @@
-// CS1983: The return type of an async method must be void, Task, or Task<T>
+// CS1983: The return type of an async method must be void or task type
 // Line: 6
 
 class C
diff --git a/mcs/errors/cs4012-3.cs b/mcs/errors/cs4012-3.cs
new file mode 100644
index 00000000000..fb3d1dc276f
--- /dev/null
+++ b/mcs/errors/cs4012-3.cs
@@ -0,0 +1,19 @@
+// CS4012: Parameters or local variables of type `S' cannot be declared in async methods or iterators
+// Line: 16
+// Compiler options: -langversion:latest
+
+using System;
+using System.Threading.Tasks;
+
+public ref struct S
+{
+}
+
+class C
+{
+	public async void Test ()
+	{
+		var tr = new S ();
+		await Task.Factory.StartNew (() => 6);
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8175-2.cs b/mcs/errors/cs8175-2.cs
new file mode 100644
index 00000000000..27c4babf8bf
--- /dev/null
+++ b/mcs/errors/cs8175-2.cs
@@ -0,0 +1,19 @@
+// CS8175: Cannot use by-reference variable `s' inside an anonymous method, lambda expression, or query expression
+// Line: 17
+// Compiler options: -langversion:latest
+
+using System;
+
+public ref struct S
+{
+}
+
+class Test
+{
+	public static void Main ()
+	{
+		var s = new S ();
+
+		Action a = () => Console.WriteLine (s);
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8183.cs b/mcs/errors/cs8183.cs
new file mode 100644
index 00000000000..f9e9004b737
--- /dev/null
+++ b/mcs/errors/cs8183.cs
@@ -0,0 +1,11 @@
+// CS8183: Cannot infer the type of implicitly-typed discard
+// Line: 9
+// Compiler options: -langversion:7.2
+
+class X
+{
+	public static void Main ()
+	{
+		_ = default;
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8184.cs b/mcs/errors/cs8184.cs
new file mode 100644
index 00000000000..19a4685d7bd
--- /dev/null
+++ b/mcs/errors/cs8184.cs
@@ -0,0 +1,10 @@
+// CS8184: A deconstruction cannot mix declarations and expressions on the left-hand-side
+// Line: 8
+
+class X
+{
+	public static void Main ()
+	{
+		(int a, b) = (1, 2);
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8207.cs b/mcs/errors/cs8207.cs
new file mode 100644
index 00000000000..31090948b45
--- /dev/null
+++ b/mcs/errors/cs8207.cs
@@ -0,0 +1,19 @@
+// CS8207: An expression tree cannot contain a discard
+// Line: 11
+
+using System;
+using System.Linq.Expressions;
+
+class X
+{
+	void Test ()
+	{
+		Expression<Func<bool>> e = () => TryGetValue (out _);
+	}
+
+	bool TryGetValue (out int arg)
+	{
+		arg = 3;
+		return true;
+	}
+}
diff --git a/mcs/errors/cs8209.cs b/mcs/errors/cs8209.cs
new file mode 100644
index 00000000000..3a46a206c8e
--- /dev/null
+++ b/mcs/errors/cs8209.cs
@@ -0,0 +1,10 @@
+// CS8209: Cannot assign void to a discard
+// Line: 8
+
+class C
+{
+	public static void Main ()
+	{
+		_ = Main ();
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8310.cs b/mcs/errors/cs8310.cs
new file mode 100644
index 00000000000..134624c03b7
--- /dev/null
+++ b/mcs/errors/cs8310.cs
@@ -0,0 +1,11 @@
+// CS8310: Operator `+' cannot be applied to operand `default'
+// Line: 9
+// Compiler options: -langversion:latest
+
+class C
+{
+	static void Main ()
+	{
+		int h = 1 + default;
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8311.cs b/mcs/errors/cs8311.cs
new file mode 100644
index 00000000000..5b35229442d
--- /dev/null
+++ b/mcs/errors/cs8311.cs
@@ -0,0 +1,12 @@
+// CS8311: Cannot use a default literal as an argument to a dynamically dispatched operation
+// Line: 10
+// Compiler options: -langversion:latest
+
+class C
+{
+    static void Main ()
+    {
+        dynamic d = null;
+        d.M2 (default);
+    }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8312.cs b/mcs/errors/cs8312.cs
new file mode 100644
index 00000000000..d2ad3f52f02
--- /dev/null
+++ b/mcs/errors/cs8312.cs
@@ -0,0 +1,12 @@
+// CS8312: Use of default literal is not valid in this context
+// Line: 9
+// Compiler options: -langversion:latest
+
+class C
+{
+	static void Main ()
+	{
+		foreach (var x in default) {
+		}
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8315.cs b/mcs/errors/cs8315.cs
new file mode 100644
index 00000000000..c40bf8613b4
--- /dev/null
+++ b/mcs/errors/cs8315.cs
@@ -0,0 +1,11 @@
+// CS8315: Operator `==' is ambiguous on operands `default' and `default'
+// Line: 9
+// Compiler options: -langversion:latest
+
+class C
+{
+	static void Main ()
+	{
+		bool d = default == default;
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8323.cs b/mcs/errors/cs8323.cs
new file mode 100644
index 00000000000..c6c9309ec0d
--- /dev/null
+++ b/mcs/errors/cs8323.cs
@@ -0,0 +1,15 @@
+// CS8323: Named argument `str' is used out of position but is followed by positional argument
+// Line: 9
+// Compiler options: -langversion:7.2
+
+class X
+{
+	public static void Main ()
+	{
+		Test (str: "", "");
+	}
+
+	static void Test (int arg, string str)
+	{
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8324.cs b/mcs/errors/cs8324.cs
new file mode 100644
index 00000000000..8a0be1aefb9
--- /dev/null
+++ b/mcs/errors/cs8324.cs
@@ -0,0 +1,12 @@
+// CS8324: Named argument specifications must appear after all fixed arguments have been specified in a dynamic invocation
+// Line: 10
+// Compiler options: -langversion:7.2
+
+class C
+{
+	void M ()
+	{
+		dynamic d = new object ();
+		d.M (arg: 1, "");
+	}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8343.cs b/mcs/errors/cs8343.cs
new file mode 100644
index 00000000000..b6aa8e83a09
--- /dev/null
+++ b/mcs/errors/cs8343.cs
@@ -0,0 +1,12 @@
+// CS8343: `S': ref structs cannot implement interfaces
+// Line: 7
+// Compiler options: -langversion:latest
+
+using System;
+
+public ref struct S : IDisposable
+{
+	public void Dispose ()
+	{			
+	}
+}
diff --git a/mcs/errors/cs8345-2.cs b/mcs/errors/cs8345-2.cs
new file mode 100644
index 00000000000..3f6137b1b56
--- /dev/null
+++ b/mcs/errors/cs8345-2.cs
@@ -0,0 +1,12 @@
+// CS8345: Field or auto-implemented property cannot be of type `S' unless it is an instance member of a ref struct
+// Line: 11
+// Compiler options: -langversion:latest
+
+public ref struct S
+{
+}
+
+ref struct Test
+{
+	static S field;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8345.cs b/mcs/errors/cs8345.cs
new file mode 100644
index 00000000000..0b5bd05518f
--- /dev/null
+++ b/mcs/errors/cs8345.cs
@@ -0,0 +1,12 @@
+// CS8345: Field or auto-implemented property cannot be of type `S' unless it is an instance member of a ref struct
+// Line: 11
+// Compiler options: -langversion:latest
+
+public ref struct S
+{
+}
+
+struct Test
+{
+	S field;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8346.cs b/mcs/errors/cs8346.cs
new file mode 100644
index 00000000000..58e22a2ae7f
--- /dev/null
+++ b/mcs/errors/cs8346.cs
@@ -0,0 +1,13 @@
+// CS8346: Cannot convert a stackalloc expression of type `byte' to type `System.Span<int>'
+// Line: 11
+// Compiler options: -langversion:7.2
+
+using System;
+
+class X
+{
+	public static void Main ()
+	{
+		Span<int> stackSpan = stackalloc byte[1];
+	}
+}
\ No newline at end of file
diff --git a/mcs/mcs/argument.cs b/mcs/mcs/argument.cs
index 8421b4dfbfc..5b1003dbadf 100644
--- a/mcs/mcs/argument.cs
+++ b/mcs/mcs/argument.cs
@@ -106,11 +106,6 @@ namespace Mono.CSharp
 
 		public virtual Expression CreateExpressionTree (ResolveContext rc)
 		{
-			if (Type.Kind == MemberKind.ByRef) {
-				rc.Report.Error (8153, Expr.Location, "An expression tree lambda cannot contain a call to a method, property, or indexer that returns by reference");
-				return null;
-			}
-
 			if (ArgType == AType.Default)
 				rc.Report.Error (854, Expr.Location, "An expression tree cannot contain an invocation which uses optional parameter");
 
diff --git a/mcs/mcs/assign.cs b/mcs/mcs/assign.cs
index a07c8c0ef39..596623feae4 100644
--- a/mcs/mcs/assign.cs
+++ b/mcs/mcs/assign.cs
@@ -391,9 +391,21 @@ namespace Mono.CSharp {
 			return System.Linq.Expressions.Expression.Assign (target_object, source_object);
 		}
 
-		protected virtual Expression ResolveConversions (ResolveContext ec)
+		protected virtual Expression ResolveConversions (ResolveContext rc)
 		{
-			source = Convert.ImplicitConversionRequired (ec, source, target.Type, source.Location);
+			var ttype = target.Type;
+			var stackAlloc = source as StackAlloc;
+			if (stackAlloc != null && ttype.Arity == 1 && ttype.GetDefinition () == rc.Module.PredefinedTypes.SpanGeneric.TypeSpec &&
+			    rc.Module.Compiler.Settings.Version >= LanguageVersion.V_7_2) {
+
+				var etype = ttype.TypeArguments [0];
+				var stype = ((PointerContainer)source.Type).Element;
+				if (etype == stype && stackAlloc.ResolveSpanConversion (rc, ttype)) {
+					return this;
+				}
+			}
+
+			source = Convert.ImplicitConversionRequired (rc, source, ttype, source.Location);
 			if (source == null)
 				return null;
 
diff --git a/mcs/mcs/async.cs b/mcs/mcs/async.cs
index fd6499346e8..643aed5e568 100644
--- a/mcs/mcs/async.cs
+++ b/mcs/mcs/async.cs
@@ -628,58 +628,112 @@ namespace Mono.CSharp
 
 		protected override bool DoDefineMembers ()
 		{
-			PredefinedType builder_type;
-			PredefinedMember<MethodSpec> bf;
-			PredefinedMember<MethodSpec> bs;
-			PredefinedMember<MethodSpec> sr;
-			PredefinedMember<MethodSpec> se;
-			PredefinedMember<MethodSpec> sm;
+			TypeSpec bt;
 			bool has_task_return_type = false;
-			var pred_members = Module.PredefinedMembers;
+			var istate_machine = Module.PredefinedTypes.IAsyncStateMachine;
+			MethodSpec set_statemachine;
 
-			if (return_type.Kind == MemberKind.Void) {
-				builder_type = Module.PredefinedTypes.AsyncVoidMethodBuilder;
-				bf = pred_members.AsyncVoidMethodBuilderCreate;
-				bs = pred_members.AsyncVoidMethodBuilderStart;
-				sr = pred_members.AsyncVoidMethodBuilderSetResult;
-				se = pred_members.AsyncVoidMethodBuilderSetException;
-				sm = pred_members.AsyncVoidMethodBuilderSetStateMachine;
-			} else if (return_type == Module.PredefinedTypes.Task.TypeSpec) {
-				builder_type = Module.PredefinedTypes.AsyncTaskMethodBuilder;
-				bf = pred_members.AsyncTaskMethodBuilderCreate;
-				bs = pred_members.AsyncTaskMethodBuilderStart;
-				sr = pred_members.AsyncTaskMethodBuilderSetResult;
-				se = pred_members.AsyncTaskMethodBuilderSetException;
-				sm = pred_members.AsyncTaskMethodBuilderSetStateMachine;
-				task = pred_members.AsyncTaskMethodBuilderTask.Get ();
+			if (return_type.IsCustomTaskType ()) {
+				//
+				// TODO: Would be nice to cache all this on per-type basis
+				//
+				var btypes = Compiler.BuiltinTypes;
+				bt = return_type.MemberDefinition.GetAsyncMethodBuilder ();
+				TypeSpec bt_inflated;
+				if (return_type.IsGeneric) {
+					bt_inflated = bt.MakeGenericType (Module, bt.MemberDefinition.TypeParameters);
+				} else {
+					bt_inflated = bt;
+				}
+
+				var set_result_sign = MemberFilter.Method ("SetResult", 0, ParametersCompiled.CreateFullyResolved (bt.MemberDefinition.TypeParameters), btypes.Void);
+				set_result = new PredefinedMember<MethodSpec> (Module, bt, set_result_sign).Resolve (Location);
+
+				var set_exception_sign = MemberFilter.Method ("SetException", 0, ParametersCompiled.CreateFullyResolved (btypes.Exception), btypes.Void);
+				set_exception = new PredefinedMember<MethodSpec> (Module, bt, set_exception_sign).Resolve (Location);
+
+				var builder_factory_sign = MemberFilter.Method ("Create", 0, ParametersCompiled.EmptyReadOnlyParameters, bt_inflated);
+				builder_factory = new PredefinedMember<MethodSpec> (Module, bt, builder_factory_sign).Resolve (Location);
+				if (builder_factory?.IsStatic == false)
+					throw new NotImplementedException ("report better error message");
+
+				var builder_start_sign = MemberFilter.Method ("Start", 1, new ParametersImported (
+						new [] {
+								new ParameterData (null, Parameter.Modifier.REF),
+							},
+						new [] {
+								new TypeParameterSpec (0, null, SpecialConstraint.None, Variance.None, null),
+							}, false),
+					btypes.Void);
+				builder_start = new PredefinedMember<MethodSpec> (Module, bt, builder_start_sign).Resolve (Location);
+
+				if (!istate_machine.Define ())
+					return false;
+
+				var set_statemachine_sign = MemberFilter.Method ("SetStateMachine", 0, ParametersCompiled.CreateFullyResolved (istate_machine.TypeSpec), btypes.Void);
+				set_statemachine = new PredefinedMember<MethodSpec> (Module, bt, set_statemachine_sign).Resolve (Location); ;
+
+				var task_sign = MemberFilter.Property ("Task", return_type.MemberDefinition as TypeSpec);
+				task = new PredefinedMember<PropertySpec> (Module, bt, task_sign).Resolve (Location);
+
+				if (set_result == null || set_exception == null || builder_factory == null || builder_start == null || set_statemachine == null || task == null ||
+					!Module.PredefinedTypes.INotifyCompletion.Define ()) {
+					return false;
+				}
+
+				has_task_return_type = return_type.IsGeneric;
 			} else {
-				builder_type = Module.PredefinedTypes.AsyncTaskMethodBuilderGeneric;
-				bf = pred_members.AsyncTaskMethodBuilderGenericCreate;
-				bs = pred_members.AsyncTaskMethodBuilderGenericStart;
-				sr = pred_members.AsyncTaskMethodBuilderGenericSetResult;
-				se = pred_members.AsyncTaskMethodBuilderGenericSetException;
-				sm = pred_members.AsyncTaskMethodBuilderGenericSetStateMachine;
-				task = pred_members.AsyncTaskMethodBuilderGenericTask.Get ();
-				has_task_return_type = true;
-			}
+				PredefinedType builder_type;
+				PredefinedMember<MethodSpec> bf;
+				PredefinedMember<MethodSpec> bs;
+				PredefinedMember<MethodSpec> sr;
+				PredefinedMember<MethodSpec> se;
+				PredefinedMember<MethodSpec> sm;
+				var pred_members = Module.PredefinedMembers;
+
+				if (return_type.Kind == MemberKind.Void) {
+					builder_type = Module.PredefinedTypes.AsyncVoidMethodBuilder;
+					bf = pred_members.AsyncVoidMethodBuilderCreate;
+					bs = pred_members.AsyncVoidMethodBuilderStart;
+					sr = pred_members.AsyncVoidMethodBuilderSetResult;
+					se = pred_members.AsyncVoidMethodBuilderSetException;
+					sm = pred_members.AsyncVoidMethodBuilderSetStateMachine;
+				} else if (return_type == Module.PredefinedTypes.Task.TypeSpec) {
+					builder_type = Module.PredefinedTypes.AsyncTaskMethodBuilder;
+					bf = pred_members.AsyncTaskMethodBuilderCreate;
+					bs = pred_members.AsyncTaskMethodBuilderStart;
+					sr = pred_members.AsyncTaskMethodBuilderSetResult;
+					se = pred_members.AsyncTaskMethodBuilderSetException;
+					sm = pred_members.AsyncTaskMethodBuilderSetStateMachine;
+					task = pred_members.AsyncTaskMethodBuilderTask.Get ();
+				} else {
+					builder_type = Module.PredefinedTypes.AsyncTaskMethodBuilderGeneric;
+					bf = pred_members.AsyncTaskMethodBuilderGenericCreate;
+					bs = pred_members.AsyncTaskMethodBuilderGenericStart;
+					sr = pred_members.AsyncTaskMethodBuilderGenericSetResult;
+					se = pred_members.AsyncTaskMethodBuilderGenericSetException;
+					sm = pred_members.AsyncTaskMethodBuilderGenericSetStateMachine;
+					task = pred_members.AsyncTaskMethodBuilderGenericTask.Get ();
+					has_task_return_type = true;
+				}
 
-			set_result = sr.Get ();
-			set_exception = se.Get ();
-			builder_factory = bf.Get ();
-			builder_start = bs.Get ();
+				set_result = sr.Get ();
+				set_exception = se.Get ();
+				builder_factory = bf.Get ();
+				builder_start = bs.Get ();
 
-			var istate_machine = Module.PredefinedTypes.IAsyncStateMachine;
-			var set_statemachine = sm.Get ();
-
-			if (!builder_type.Define () || !istate_machine.Define () || set_result == null || builder_factory == null ||
-				set_exception == null || set_statemachine == null || builder_start == null ||
-				!Module.PredefinedTypes.INotifyCompletion.Define ()) {
-				Report.Error (1993, Location,
-					"Cannot find compiler required types for asynchronous functions support. Are you targeting the wrong framework version?");
-				return base.DoDefineMembers ();
-			}
+				set_statemachine = sm.Get ();
+
+				if (!builder_type.Define () || !istate_machine.Define () || set_result == null || builder_factory == null ||
+					set_exception == null || set_statemachine == null || builder_start == null ||
+					!Module.PredefinedTypes.INotifyCompletion.Define ()) {
+					Report.Error (1993, Location,
+						"Cannot find compiler required types for asynchronous functions support. Are you targeting the wrong framework version?");
+					return base.DoDefineMembers ();
+				}
 
-			var bt = builder_type.TypeSpec;
+				bt = builder_type.TypeSpec;
+			}
 
 			//
 			// Inflate generic Task types
@@ -825,9 +879,26 @@ namespace Mono.CSharp
 				predefined = unsafeVersion ? pm.AsyncVoidMethodBuilderOnCompletedUnsafe : pm.AsyncVoidMethodBuilderOnCompleted;
 			} else if (return_type == Module.PredefinedTypes.Task.TypeSpec) {
 				predefined = unsafeVersion ? pm.AsyncTaskMethodBuilderOnCompletedUnsafe : pm.AsyncTaskMethodBuilderOnCompleted;
-			} else {
+			} else if (return_type.IsGenericTask) {
 				predefined = unsafeVersion ? pm.AsyncTaskMethodBuilderGenericOnCompletedUnsafe : pm.AsyncTaskMethodBuilderGenericOnCompleted;
 				has_task_return_type = true;
+			} else {
+				var parameters = new ParametersImported (
+					new [] {
+								new ParameterData (null, Parameter.Modifier.REF),
+								new ParameterData (null, Parameter.Modifier.REF)
+						},
+					new [] {
+								new TypeParameterSpec (0, null, SpecialConstraint.None, Variance.None, null),
+								new TypeParameterSpec (1, null, SpecialConstraint.None, Variance.None, null)
+					}, false);
+
+				var on_completed_sign = unsafeVersion ?
+					MemberFilter.Method ("AwaitUnsafeOnCompleted", 2, parameters, Compiler.BuiltinTypes.Void) :
+				    MemberFilter.Method ("AwaitOnCompleted", 2, parameters, Compiler.BuiltinTypes.Void);
+				
+				predefined = new PredefinedMember<MethodSpec> (Module, return_type.MemberDefinition.GetAsyncMethodBuilder (), on_completed_sign);
+				has_task_return_type = return_type.IsGeneric;
 			}
 
 			var on_completed = predefined.Resolve (Location);
@@ -887,11 +958,14 @@ namespace Mono.CSharp
 			// stateMachine.$builder.Start<{storey-type}>(ref stateMachine);
 			//
 			instance.AddressOf (ec, AddressOp.Store);
-			ec.Emit (OpCodes.Ldflda, builder_field);
+
+			bool struct_builder = builder.MemberType.IsStruct;
+
+			ec.Emit (struct_builder ? OpCodes.Ldflda : OpCodes.Ldfld, builder_field);
 			if (Task != null)
 				ec.Emit (OpCodes.Dup);
 			instance.AddressOf (ec, AddressOp.Store);
-			ec.Emit (OpCodes.Call, builder_start.MakeGenericMethod (Module, instance.Type));
+			ec.Emit (struct_builder ? OpCodes.Call : OpCodes.Callvirt, builder_start.MakeGenericMethod (Module, instance.Type));
 
 			//
 			// Emits return stateMachine.$builder.Task;
@@ -1029,4 +1103,20 @@ namespace Mono.CSharp
 			EmitAssign (ec, new NullConstant (type, loc), false, false);
 		}
 	}
+
+	static class TypeSpecAsyncExtensions
+	{
+		public static bool IsCustomTaskType (this TypeSpec type)
+		{
+			// LAMESPEC: Arity is not mentioned
+			if (type.Arity > 1)
+				return false;
+			
+			var amb = type.MemberDefinition.GetAsyncMethodBuilder ();
+			if (amb == null)
+				return false;
+
+			return amb.Arity == type.Arity;
+		}
+	}
 }
diff --git a/mcs/mcs/attribute.cs b/mcs/mcs/attribute.cs
index 3ff2d68ccb5..83d403118ad 100644
--- a/mcs/mcs/attribute.cs
+++ b/mcs/mcs/attribute.cs
@@ -789,6 +789,17 @@ namespace Mono.CSharp {
 			return ((BoolConstant) pos_args[0].Expr).Value;
 		}
 
+		public TypeSpec GetAsyncMethodBuilderValue ()
+		{
+			if (!arg_resolved)
+				Resolve ();
+
+			if (resolve_error)
+				return null;
+
+			return GetArgumentType ();
+		}
+
 		public TypeSpec GetCoClassAttributeValue ()
 		{
 			if (!arg_resolved)
@@ -1754,9 +1765,11 @@ namespace Mono.CSharp {
 
 		// New in .NET 4.7
 		public readonly PredefinedTupleElementNamesAttribute TupleElementNames;
+		public readonly PredefinedAttribute AsyncMethodBuilder;
 
 		// New in .NET 4.7.1
 		public readonly PredefinedAttribute IsReadOnly;
+		public readonly PredefinedAttribute IsByRefLike;
 
 		//
 		// Optional types which are used as types and for member lookup
@@ -1837,8 +1850,10 @@ namespace Mono.CSharp {
 			CallerLineNumberAttribute = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "CallerLineNumberAttribute");
 			CallerFilePathAttribute = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "CallerFilePathAttribute");
 
+			AsyncMethodBuilder = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "AsyncMethodBuilderAttribute");
 			TupleElementNames = new PredefinedTupleElementNamesAttribute (module, "System.Runtime.CompilerServices", "TupleElementNamesAttribute");
 			IsReadOnly = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "IsReadOnlyAttribute");
+			IsByRefLike = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "IsByRefLikeAttribute");
 
 			// TODO: Should define only attributes which are used for comparison
 			const System.Reflection.BindingFlags all_fields = System.Reflection.BindingFlags.Public |
diff --git a/mcs/mcs/class.cs b/mcs/mcs/class.cs
index 9afb32c6fe5..6b1adc297a3 100644
--- a/mcs/mcs/class.cs
+++ b/mcs/mcs/class.cs
@@ -224,6 +224,24 @@ namespace Mono.CSharp
 			}
 		}
 
+		public void CloseContainerEarlyForReflectionEmit ()
+		{
+			if (containers != null) {
+				foreach (TypeContainer tc in containers) {
+					//
+					// SRE requires due to internal checks that any field of enum type is
+					// baked. We close all enum types before closing any other types to
+					// workaround this limitation
+					//
+					if (tc.Kind == MemberKind.Enum) {
+						tc.CloseContainer ();
+					} else {
+						tc.CloseContainerEarlyForReflectionEmit ();
+					}
+				}
+			}
+		}
+
 		public virtual void CreateMetadataName (StringBuilder sb)
 		{
 			if (Parent != null && Parent.MemberName != null)
@@ -1102,6 +1120,18 @@ namespace Mono.CSharp
 				member.GenerateDocComment (builder);
 		}
 
+		public TypeSpec GetAsyncMethodBuilder ()
+		{
+			if (OptAttributes == null)
+				return null;
+
+			Attribute a = OptAttributes.Search (Module.PredefinedAttributes.AsyncMethodBuilder);
+			if (a == null)
+				return null;
+
+			return a.GetAsyncMethodBuilderValue ();
+		}
+
 		public TypeSpec GetAttributeCoClass ()
 		{
 			if (OptAttributes == null)
@@ -2171,7 +2201,7 @@ namespace Mono.CSharp
 
 		public override void Emit ()
 		{
-			if (Interfaces != null) {
+			if (Interfaces != null && (ModFlags & Modifiers.PRIVATE) == 0) {
 				foreach (var iface in Interfaces) {
 					if (iface.HasNamedTupleElement) {
 						throw new NotImplementedException ("named tuples for .interfaceimpl");
@@ -3023,7 +3053,8 @@ namespace Mono.CSharp
 			Modifiers.INTERNAL  |
 			Modifiers.UNSAFE    |
 			Modifiers.PRIVATE   |
-			Modifiers.READONLY;
+			Modifiers.READONLY  |
+			Modifiers.REF;
 
 		public Struct (TypeContainer parent, MemberName name, Modifiers mod, Attributes attrs)
 			: base (parent, name, attrs, MemberKind.Struct)
@@ -3139,6 +3170,9 @@ namespace Mono.CSharp
 			if ((ModFlags & Modifiers.READONLY) != 0)
 				Module.PredefinedAttributes.IsReadOnly.EmitAttribute (TypeBuilder);
 
+			if ((ModFlags & Modifiers.REF) != 0)
+				Module.PredefinedAttributes.IsByRefLike.EmitAttribute (TypeBuilder);
+
 			CheckStructCycles ();
 
 			base.Emit ();
@@ -3213,6 +3247,10 @@ namespace Mono.CSharp
 		protected override TypeSpec[] ResolveBaseTypes (out FullNamedExpression base_class)
 		{
 			var ifaces = base.ResolveBaseTypes (out base_class);
+			if (ifaces != null && (ModFlags & Modifiers.REF) != 0) {
+				Report.Error (8343, Location, "`{0}': ref structs cannot implement interfaces", GetSignatureForError ());
+			}
+
 			base_type = Compiler.BuiltinTypes.ValueType;
 			return ifaces;
 		}
@@ -3915,7 +3953,7 @@ namespace Mono.CSharp
 
 		protected void IsTypePermitted ()
 		{
-			if (MemberType.IsSpecialRuntimeType) {
+			if (MemberType.IsSpecialRuntimeType || MemberType.IsByRefLike) {
 				if (Parent is StateMachine) {
 					Report.Error (4012, Location,
 						"Parameters or local variables of type `{0}' cannot be declared in async methods or iterators",
@@ -3924,6 +3962,19 @@ namespace Mono.CSharp
 					Report.Error (4013, Location,
 						"Local variables of type `{0}' cannot be used inside anonymous methods, lambda expressions or query expressions",
 						MemberType.GetSignatureForError ());
+				} else if (MemberType.IsByRefLike) {
+					if ((ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) != 0)
+						return;
+
+					if ((ModFlags & Modifiers.AutoProperty) == 0 && this is Property)
+						return;
+
+					if ((ModFlags & Modifiers.STATIC) == 0 && (Parent.ModFlags & Modifiers.REF) != 0)
+						return;
+
+					Report.Error (8345, Location,
+						"Field or auto-implemented property cannot be of type `{0}' unless it is an instance member of a ref struct",
+						MemberType.GetSignatureForError ());
 				} else {
 					Report.Error (610, Location, 
 						"Field or property cannot be of type `{0}'", MemberType.GetSignatureForError ());
diff --git a/mcs/mcs/const.cs b/mcs/mcs/const.cs
index 046aec24c1b..658f15ec57a 100644
--- a/mcs/mcs/const.cs
+++ b/mcs/mcs/const.cs
@@ -206,7 +206,9 @@ namespace Mono.CSharp {
 					c = field.ConvertInitializer (rc, c);
 
 				if (c == null) {
-					if (TypeSpec.IsReferenceType (field.MemberType))
+					if (expr is DefaultLiteralExpression) {
+						// It's handled bellow in New.Constantify
+					} else if (TypeSpec.IsReferenceType (field.MemberType))
 						Error_ConstantCanBeInitializedWithNullOnly (rc, field.MemberType, expr.Location, GetSignatureForError ());
 					else if (!(expr is Constant))
 						Error_ExpressionMustBeConstant (rc, expr.Location, GetSignatureForError ());
diff --git a/mcs/mcs/convert.cs b/mcs/mcs/convert.cs
index b11477c1043..ae153fc49e8 100644
--- a/mcs/mcs/convert.cs
+++ b/mcs/mcs/convert.cs
@@ -392,6 +392,9 @@ namespace Mono.CSharp {
 				if (!TypeSpec.IsValueType (expr_type))
 					return null;
 
+				if (expr_type.IsByRefLike)
+					return null;
+
 				return expr == null ? EmptyExpression.Null : new BoxedCast (expr, target_type);
 
 			case BuiltinTypeSpec.Type.Enum:
@@ -816,7 +819,7 @@ namespace Mono.CSharp {
 			if (expr_type == target_type)
 				return true;
 
-			if (expr_type == InternalType.ThrowExpr)
+			if (expr_type == InternalType.ThrowExpr || expr_type == InternalType.DefaultType)
 				return target_type.Kind != MemberKind.InternalCompilerType;
 
 			if (target_type.IsNullableType)
@@ -1478,6 +1481,10 @@ namespace Mono.CSharp {
 				return target_type.Kind == MemberKind.InternalCompilerType ? null : EmptyCast.Create (expr, target_type);
 			}
 
+			if (expr_type == InternalType.DefaultType) {
+				return new DefaultValueExpression (new TypeExpression (target_type, expr.Location), expr.Location).Resolve (ec);
+			}
+
 			if (target_type.IsNullableType)
 				return ImplicitNulableConversion (ec, expr, target_type);
 
@@ -1967,7 +1974,7 @@ namespace Mono.CSharp {
 			// From object or dynamic to any reference type or value type (unboxing)
 			//
 			if (source_type.BuiltinType == BuiltinTypeSpec.Type.Object || source_type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
-				if (target_type.IsPointer)
+				if (target_type.IsPointer || target_type.IsByRefLike)
 					return null;
 
 				return
diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay
index 2868d2fd8f6..4d6fcb44c0d 100644
--- a/mcs/mcs/cs-parser.jay
+++ b/mcs/mcs/cs-parser.jay
@@ -169,7 +169,8 @@ namespace Mono.CSharp
 %token CONST	
 %token CONTINUE	
 %token DECIMAL	
-%token DEFAULT	
+%token DEFAULT
+%token DEFAULT_VALUE
 %token DELEGATE	
 %token DO	
 %token DOUBLE	
@@ -336,6 +337,7 @@ namespace Mono.CSharp
 %token DEFAULT_COLON
 %token OPEN_BRACKET_EXPR
 %token OPEN_PARENS_DECONSTRUCT
+%token REF_STRUCT
 
 // Make the parser go into eval mode parsing (statements and compilation units).
 %token EVAL_STATEMENT_PARSER
@@ -863,7 +865,7 @@ attribute_arguments
 		}
 		
 		Arguments args = ((Arguments) o [0]);
-		if (args.Count > 0 && !($3 is NamedArgument) && args [args.Count - 1] is NamedArgument)
+		if (lang_version < LanguageVersion.V_7_2 && args.Count > 0 && !($3 is NamedArgument) && args [args.Count - 1] is NamedArgument)
 			Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]);
 		
 		args.Add ((Argument) $3);
@@ -1015,17 +1017,34 @@ primary_constructor_body
 	  }
 	;
 
+struct_keyword
+	: STRUCT
+	  {
+		$$ = null;
+	  }
+	| REF_STRUCT
+	  {
+		if (lang_version < LanguageVersion.V_7_2) {
+			FeatureIsNotAvailable (GetLocation ($1), "ref structs");
+		}
+
+		$$ = this;
+	  }
+	;
+
 struct_declaration
 	: opt_attributes
 	  opt_modifiers
 	  opt_partial
-	  STRUCT
+	  struct_keyword
 	  type_declaration_name
 	  {
 		var mods = (Modifiers) $2;
 		if ((mods & Modifiers.READONLY) != 0 && lang_version < LanguageVersion.V_7_2) {
 			FeatureIsNotAvailable (GetLocation ($4), "readonly structs");
 		}
+		if ($4 != null)
+			mods |= Modifiers.REF;
 
 		lexer.ConstraintsParsing = true;
 		valid_param_mod = ParameterModifierType.PrimaryConstructor;
@@ -1071,7 +1090,7 @@ struct_declaration
 		}
 		$$ = pop_current_class ();
 	  }
-	| opt_attributes opt_modifiers opt_partial STRUCT error
+	| opt_attributes opt_modifiers opt_partial struct_keyword error
 	  {
 		Error_SyntaxError (yyToken);
 	  }
@@ -1384,6 +1403,18 @@ ref_member_type
 
 		$$ = new ReferenceTypeExpr ((FullNamedExpression) $3, GetLocation ($1));
 	  }
+	| REF READONLY
+	  {
+		lexer.parsing_generic_declaration = true;
+	  }
+	  type
+	  {
+		if (lang_version < LanguageVersion.V_7_2) {
+			FeatureIsNotAvailable (GetLocation ($2), "readonly references");
+		}
+
+		$$ = new ReferenceTypeExpr ((FullNamedExpression) $4, true, GetLocation ($1));
+	  }
 	;
 
 method_header
@@ -3448,6 +3479,7 @@ primary_expression
 	| anonymous_method_expression
 	| undocumented_expressions
 	| interpolated_string
+	| default_literal
 	;
 
 type_name_expression
@@ -3824,7 +3856,7 @@ argument_list
 	| argument_list COMMA argument
 	  {
 		Arguments list = (Arguments) $1;
-		if (list [list.Count - 1] is NamedArgument)
+		if (lang_version < LanguageVersion.V_7_2 && list [list.Count - 1] is NamedArgument)
 			Error_NamedArgumentExpected ((NamedArgument) list [list.Count - 1]);
 		
 		list.Add ((Argument) $3);
@@ -3969,7 +4001,7 @@ expression_list_arguments
 	| expression_list_arguments COMMA expression_list_argument
 	  {
 		Arguments args = (Arguments) $1;
-		if (args [args.Count - 1] is NamedArgument && !($3 is NamedArgument))
+		if (lang_version < LanguageVersion.V_7_2 && args [args.Count - 1] is NamedArgument && !($3 is NamedArgument))
 			Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]);
 	  
 		args.Add ((Argument) $3);
@@ -4386,7 +4418,7 @@ anonymous_method_signature
 	;
 
 default_value_expression
-	: DEFAULT open_parens_any type CLOSE_PARENS
+	: DEFAULT_VALUE open_parens_any type CLOSE_PARENS
 	  {
 		if (lang_version < LanguageVersion.ISO_2)
 			FeatureIsNotAvailable (GetLocation ($1), "default value expression");
@@ -4396,6 +4428,16 @@ default_value_expression
 	  }
 	;
 
+default_literal
+	: DEFAULT
+	  {
+		if (lang_version < LanguageVersion.V_7_1)
+			FeatureIsNotAvailable (GetLocation ($1), "default literal");
+
+		$$ = new DefaultLiteralExpression (GetLocation ($1));
+	  }
+	;
+
 unary_expression
 	: primary_expression
 	| BANG prefixed_unary_expression
@@ -4750,7 +4792,7 @@ pattern_list
 	| pattern_list COMMA pattern_argument
 	  {
 		Arguments args = (Arguments) $1;
-		if (args [args.Count - 1] is NamedArgument && !($3 is NamedArgument))
+		if (lang_version < LanguageVersion.V_7_2 && args [args.Count - 1] is NamedArgument && !($3 is NamedArgument))
 			Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]);
 
 		args.Add ((Argument) $3);
@@ -5067,17 +5109,25 @@ assignment_expression
 		$$ = new CompoundAssign (Binary.Operator.ExclusiveOr, (Expression) $1, (Expression) $3);
 		lbag.AddLocation ($$, GetLocation ($2));
 	  }
-	| OPEN_PARENS_DECONSTRUCT deconstruct_exprs CLOSE_PARENS ASSIGN expression
+	| OPEN_PARENS_DECONSTRUCT deconstruct_assignment CLOSE_PARENS ASSIGN expression
 	  {
 		if (lang_version < LanguageVersion.V_7)
 			FeatureIsNotAvailable (GetLocation ($1), "tuples");
 
-	  	var exprs = (List<Expression>) $2;
+		var exprs = (List<Expression>) $2;
+		$$ = new TupleDeconstruct (exprs, (Expression) $5, GetLocation ($4));
+	  }
+	| OPEN_PARENS_DECONSTRUCT deconstruct_declaration CLOSE_PARENS ASSIGN expression
+	  {
+		if (lang_version < LanguageVersion.V_7)
+			FeatureIsNotAvailable (GetLocation ($1), "tuples");
+
+		var exprs = (List<BlockVariable>) $2;
 		$$ = new TupleDeconstruct (exprs, (Expression) $5, GetLocation ($4));
 	  }
 	;
 
-deconstruct_exprs
+deconstruct_assignment
 	: expression COMMA expression
 	  {
 		$$ = new List<Expression> () {
@@ -5085,7 +5135,7 @@ deconstruct_exprs
 			(Expression) $3
 	  	};
 	  }
-	| deconstruct_exprs COMMA expression
+	| deconstruct_assignment COMMA expression
 	  {
 		var src = (List<Expression>) $1;
 		src.Add ((Expression) $3);
@@ -5093,6 +5143,43 @@ deconstruct_exprs
 	  }
 	;
 
+deconstruct_declaration
+	: variable_type identifier_inside_body
+	  {
+		var lt = (LocatedToken) $2;
+		var li = new LocalVariable (current_block, lt.Value, lt.Location);
+		current_block.AddLocalName (li);
+		$$ = new List<BlockVariable> (2) {
+			new BlockVariable ((FullNamedExpression) $1, li)
+		};
+	  }
+	| deconstruct_declaration COMMA variable_type identifier_inside_body
+	  {
+		var lt = (LocatedToken) $4;
+		var li = new LocalVariable (current_block, lt.Value, lt.Location);
+		current_block.AddLocalName (li);
+
+		var src = (List<BlockVariable>) $1;
+		src.Add (new BlockVariable ((FullNamedExpression) $3, li));
+		$$ = src;
+	  }
+	| deconstruct_declaration COMMA identifier_inside_body
+	  {
+		var lt = (LocatedToken) $3;
+		var li = new LocalVariable (current_block, lt.Value, lt.Location);
+
+		if (lt.Value != "_") {
+			report.Error (8184, lt.Location, "A deconstruction cannot mix declarations and expressions on the left-hand-side");
+		} else {
+			li.Type = InternalType.Discard;
+		}
+
+		var src = (List<BlockVariable>) $1;
+		src.Add (new BlockVariable (new TypeExpression (li.Type, lt.Location), li));
+		$$ = src;
+	  }
+	;
+
 lambda_parameter_list
 	: lambda_parameter
 	  {
@@ -6008,6 +6095,28 @@ block_variable_declaration
 			lbag.AddLocation ($$, GetLocation ($7));
 		}
 	  }
+	| REF READONLY variable_type identifier_inside_body
+	  {
+		if (lang_version < LanguageVersion.V_7_2) {
+			FeatureIsNotAvailable (GetLocation ($2), "readonly references");
+		}
+
+		var lt = (LocatedToken) $4;
+		var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.ByRef | LocalVariable.Flags.ReadonlyMask, lt.Location);
+		current_block.AddLocalName (li);
+		current_variable = new BlockVariable ((FullNamedExpression) $3, li);
+	  }
+	  opt_local_variable_initializer opt_variable_declarators SEMICOLON
+	  {
+		$$ = current_variable;
+		current_variable = null;
+		if ($6 != null) {
+			lbag.AddLocation ($$, PopLocation (), GetLocation ($8));
+		} else {
+			report.Error (8174, GetLocation ($3), "A declaration of a by-reference variable must have an initializer");
+			lbag.AddLocation ($$, GetLocation ($8));
+		}
+	  }
 	;
 
 opt_local_variable_initializer
@@ -7731,7 +7840,7 @@ void Warning_EmptyStatement (Location loc)
 
 void Error_NamedArgumentExpected (NamedArgument a)
 {
-	report.Error (1738, a.Location, "Named arguments must appear after the positional arguments");
+	report.Error (1738, a.Location, "Named arguments must appear after the positional arguments when using language version older than 7.2");
 }
 
 void Error_MissingInitializer (Location loc)
@@ -8255,6 +8364,7 @@ static string GetTokenName (int token)
 	case Token.CONTINUE:
 		return "continue";
 	case Token.DEFAULT:
+	case Token.DEFAULT_VALUE:
 		return "default";
 	case Token.DELEGATE:
 		return "delegate";
@@ -8334,6 +8444,7 @@ static string GetTokenName (int token)
 	case Token.STATIC:
 		return "static";
 	case Token.STRUCT:
+	case Token.REF_STRUCT:
 		return "struct";
 	case Token.SWITCH:
 		return "switch";
diff --git a/mcs/mcs/cs-tokenizer.cs b/mcs/mcs/cs-tokenizer.cs
index d6d00d31400..37edb5c1224 100644
--- a/mcs/mcs/cs-tokenizer.cs
+++ b/mcs/mcs/cs-tokenizer.cs
@@ -716,9 +716,18 @@ namespace Mono.CSharp
 					res = Token.EXTERN_ALIAS;
 				break;
 			case Token.DEFAULT:
-				if (peek_token () == Token.COLON) {
-					token ();
-					res = Token.DEFAULT_COLON;
+				switch (peek_token ()) {
+				case Token.COLON:
+					// Special case: foo == null ? default : 1;
+					if (current_token != Token.INTERR) {
+						token ();
+						res = Token.DEFAULT_COLON;
+					}
+					break;
+				case Token.OPEN_PARENS:
+				case Token.OPEN_PARENS_CAST:
+					res = Token.DEFAULT_VALUE;
+					break;
 				}
 				break;
 			case Token.WHEN:
@@ -812,10 +821,12 @@ namespace Mono.CSharp
 				PushPosition ();
 
 				next_token = token ();
-				bool ok = (next_token == Token.CLASS) ||
-					(next_token == Token.STRUCT) ||
-					(next_token == Token.INTERFACE) ||
-					(next_token == Token.VOID);
+				bool ok =
+					next_token == Token.CLASS ||
+					next_token == Token.STRUCT ||
+					next_token == Token.INTERFACE ||
+					next_token == Token.VOID ||
+					next_token == Token.REF_STRUCT;
 
 				PopPosition ();
 
@@ -903,6 +914,12 @@ namespace Mono.CSharp
 					break;
 				}
 
+				break;
+			case Token.REF:
+				if (peek_token () == Token.STRUCT) {
+					token ();
+					res = Token.REF_STRUCT;
+				}
 				break;
 			}
 
@@ -1094,6 +1111,7 @@ namespace Mono.CSharp
 						case Token.UNCHECKED:
 						case Token.UNSAFE:
 						case Token.DEFAULT:
+						case Token.DEFAULT_VALUE:
 						case Token.AWAIT:
 
 						//
@@ -1273,14 +1291,21 @@ namespace Mono.CSharp
 
 				return false;
 			case Token.OPEN_PARENS:
-				if (!parsing_generic_declaration)
-					return false;
-				
+				int parens_count = 1;
 				while (true) {
 					switch (token ()) {
 					case Token.COMMA:
 						// tuple declaration after <
-						return true;
+						if (parens_count == 1)
+							return true;
+						continue;
+					case Token.OPEN_PARENS:
+						++parens_count;
+						continue;
+					case Token.CLOSE_PARENS:
+						if (--parens_count <= 0)
+							return false;
+						continue;
 					case Token.OP_GENERICS_GT:
 					case Token.EOF:
 						return false;
@@ -1380,6 +1405,7 @@ namespace Mono.CSharp
 			case Token.NEW:
 			case Token.INTERPOLATED_STRING:
 			case Token.THROW:
+			case Token.DEFAULT_COLON:
 				next_token = Token.INTERR;
 				break;
 				
@@ -3502,6 +3528,7 @@ namespace Mono.CSharp
 						case Token.SWITCH:
 						case Token.USING:
 						case Token.DEFAULT:
+						case Token.DEFAULT_VALUE:
 						case Token.DELEGATE:
 						case Token.OP_GENERICS_GT:
 						case Token.REFVALUE:
@@ -3963,26 +3990,29 @@ namespace Mono.CSharp
 		{
 			int d;
 
-			// Save current position and parse next token.
-			PushPosition ();
-			int generic_dimension = 0;
-			if (parse_less_than (ref generic_dimension)) {
-				if (parsing_generic_declaration && (parsing_generic_declaration_doc || token () != Token.DOT)) {
-					d = Token.OP_GENERICS_LT_DECL;
-				} else {
-					if (generic_dimension > 0) {
-						val = generic_dimension;
-						DiscardPosition ();
-						return Token.GENERIC_DIMENSION;
-					}
+			if (current_token != Token.OPERATOR) {
+				// Save current position and parse next token.
+				PushPosition ();
+				int generic_dimension = 0;
+				if (parse_less_than (ref generic_dimension)) {
+					if (parsing_generic_declaration && (parsing_generic_declaration_doc || token () != Token.DOT)) {
+						d = Token.OP_GENERICS_LT_DECL;
+					} else {
+						if (generic_dimension > 0) {
+							val = generic_dimension;
+							DiscardPosition ();
+							return Token.GENERIC_DIMENSION;
+						}
 
-					d = Token.OP_GENERICS_LT;
+						d = Token.OP_GENERICS_LT;
+					}
+					PopPosition ();
+					return d;
 				}
+
 				PopPosition ();
-				return d;
 			}
 
-			PopPosition ();
 			parsing_generic_less_than = 0;
 
 			d = peek_char ();
diff --git a/mcs/mcs/delegate.cs b/mcs/mcs/delegate.cs
index 80eb7e265f1..52cee8f3455 100644
--- a/mcs/mcs/delegate.cs
+++ b/mcs/mcs/delegate.cs
@@ -188,8 +188,8 @@ namespace Mono.CSharp {
 
 			CheckProtectedModifier ();
 
-			if (Compiler.Settings.StdLib && ret_type.IsSpecialRuntimeType) {
-				Method.Error1599 (Location, ret_type, Report);
+			if (ret_type.IsSpecialRuntimeType && Compiler.Settings.StdLib) {
+				Method.Error_ReturnTypeCantBeRefAny (Location, ret_type, Report);
 				return false;
 			}
 
@@ -338,6 +338,8 @@ namespace Mono.CSharp {
 					Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder);
 				} else if (rtype.HasDynamicElement) {
 					Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder, rtype, Location);
+				} else if (rtype is ReadOnlyReferenceContainer) {
+					Module.PredefinedAttributes.IsReadOnly.EmitAttribute (CreateReturnBuilder ().Builder);
 				}
 
 				if (rtype.HasNamedTupleElement) {
@@ -603,8 +605,14 @@ namespace Mono.CSharp {
 			}
 
 			var expr = method_group.InstanceExpression;
-			if (expr != null && (expr.Type.IsGenericParameter || !TypeSpec.IsReferenceType (expr.Type)))
+			if (expr != null && (expr.Type.IsGenericParameter || !TypeSpec.IsReferenceType (expr.Type))) {
+				if (expr.Type.IsByRefLike || expr.Type.IsSpecialRuntimeType) {
+					// CSC: Should be better error code
+					Error_ConversionFailed (ec, delegate_method, null);
+				}
+
 				method_group.InstanceExpression = new BoxedCast (expr, ec.BuiltinTypes.Object);
+			}
 
 			eclass = ExprClass.Value;
 			return this;
diff --git a/mcs/mcs/dynamic.cs b/mcs/mcs/dynamic.cs
index fd4662b2fed..f8314b2f3cd 100644
--- a/mcs/mcs/dynamic.cs
+++ b/mcs/mcs/dynamic.cs
@@ -279,11 +279,19 @@ namespace Mono.CSharp
 
 		protected bool DoResolveCore (ResolveContext rc)
 		{
+			int i = 0;
 			foreach (var arg in arguments) {
 				if (arg.Type == InternalType.VarOutType) {
 					// Should be special error message about dynamic dispatch
 					rc.Report.Error (8197, arg.Expr.Location, "Cannot infer the type of implicitly-typed out variable `{0}'", ((DeclarationExpression) arg.Expr).Variable.Name);
+				} else if (arg.Type == InternalType.DefaultType) {
+					rc.Report.Error (8311, arg.Expr.Location, "Cannot use a default literal as an argument to a dynamically dispatched operation");
 				}
+
+				// Forced limitation because Microsoft.CSharp needs to catch up
+				if (i > 0 && arguments [i - 1] is NamedArgument && !(arguments [i] is NamedArgument))
+					rc.Report.Error (8324, loc, "Named argument specifications must appear after all fixed arguments have been specified in a dynamic invocation");
+				++i;
 			}
 
 			if (rc.CurrentTypeParameters != null && rc.CurrentTypeParameters[0].IsMethodTypeParameter)
diff --git a/mcs/mcs/ecore.cs b/mcs/mcs/ecore.cs
index 34ff9a30dab..20ee9e73b19 100644
--- a/mcs/mcs/ecore.cs
+++ b/mcs/mcs/ecore.cs
@@ -255,7 +255,7 @@ namespace Mono.CSharp {
 
 		public void Error_ExpressionMustBeConstant (ResolveContext rc, Location loc, string e_name)
 		{
-			rc.Report.Error (133, loc, "The expression being assigned to `{0}' must be constant", e_name);
+			rc.Report.Error (133, loc, "The expression being assigned to `{0}' must be a constant or default value", e_name);
 		}
 
 		public void Error_ConstantCanBeInitializedWithNullOnly (ResolveContext rc, TypeSpec type, Location loc, string name)
@@ -2957,6 +2957,13 @@ namespace Mono.CSharp {
 				if ((restrictions & MemberLookupRestrictions.NameOfExcluded) == 0 && Name == "nameof")
 					return new NameOf (this);
 
+				if ((restrictions & MemberLookupRestrictions.ReadAccess) == 0 && Name == "_") {
+					if (rc.Module.Compiler.Settings.Version < LanguageVersion.V_7)
+						rc.Report.FeatureIsNotAvailable (rc.Module.Compiler, loc, "discards");
+
+					return new Discard (loc).Resolve (rc);
+				}
+
 				if (errorMode) {
 					if (variable_found) {
 						rc.Report.Error (841, loc, "A local variable `{0}' cannot be used before it is declared", Name);
@@ -4029,6 +4036,13 @@ namespace Mono.CSharp {
 			return Methods.First ().GetSignatureForError ();
 		}
 
+		static MethodSpec CandidateDevirtualization (TypeSpec type, MethodSpec method)
+		{
+			// Assumes no generics get involved
+			var filter = new MemberFilter (method.Name, method.Arity, MemberKind.Method, method.Parameters, null);
+			return MemberCache.FindMember (type, filter, BindingRestriction.InstanceOnly | BindingRestriction.OverrideOnly | BindingRestriction.DeclaredOnly) as MethodSpec;
+		}
+
 		public override Expression CreateExpressionTree (ResolveContext ec)
 		{
 			if (best_candidate == null) {
@@ -4177,6 +4191,22 @@ namespace Mono.CSharp {
 						}
 
 						InstanceExpression.Resolve (ec, ResolveFlags.VariableOrValue | ResolveFlags.MethodGroup | ResolveFlags.Type);
+
+						var expr_type = InstanceExpression.Type;
+						if ((expr_type.IsByRefLike || expr_type.IsSpecialRuntimeType) && best_candidate.DeclaringType != expr_type) {
+							MethodSpec devirt = null;
+							if ((best_candidate.Modifiers & (Modifiers.VIRTUAL | Modifiers.ABSTRACT | Modifiers.OVERRIDE)) != 0) {
+								devirt = CandidateDevirtualization (expr_type, best_candidate);
+							}
+
+							if (devirt == null) {
+								// CSC: Should be better error message
+								ec.Report.Error (29, InstanceExpression.Location, "Cannot implicitly convert type `{0}' to `{1}'",
+												 InstanceExpression.Type.GetSignatureForError (), best_candidate.DeclaringType.GetSignatureForError ());
+							} else {
+								best_candidate = devirt;
+							}
+						}
 					}
 				}
 
@@ -5419,7 +5449,7 @@ namespace Mono.CSharp {
 				}
 
 				if (arg_type != parameter) {
-					if (arg_type == InternalType.VarOutType)
+					if (arg_type == InternalType.VarOutType || arg_type == InternalType.Discard)
 						return 0;
 
 					var ref_arg_type = arg_type as ReferenceContainer;
@@ -6028,6 +6058,11 @@ namespace Mono.CSharp {
 						continue;
 					}
 
+					if (arg_type == InternalType.Discard) {
+						a.Expr.Type = pt;
+						continue;
+					}
+
 					var ref_arg_type = arg_type as ReferenceContainer;
 					if (ref_arg_type != null) {
 						if (ref_arg_type.Element != pt)
@@ -6061,9 +6096,15 @@ namespace Mono.CSharp {
 						else
 							ec.Report.SymbolRelatedToPreviousError (member);
 
-						ec.Report.Error (1744, na.Location,
-							"Named argument `{0}' cannot be used for a parameter which has positional argument specified",
-							na.Name);
+						if (name_index > a_idx) {
+							ec.Report.Error (8323, na.Location,
+								"Named argument `{0}' is used out of position but is followed by positional argument",
+								na.Name);
+						} else {
+							ec.Report.Error (1744, na.Location,
+								"Named argument `{0}' cannot be used for a parameter which has positional argument specified",
+								na.Name);
+						}
 					}
 				}
 				
@@ -7350,6 +7391,9 @@ namespace Mono.CSharp {
 			if (!ResolveGetter (ec))
 				return null;
 
+			if (type.Kind == MemberKind.ByRef)
+				return ByRefDereference.Create (this).Resolve (ec);
+
 			return this;
 		}
 
@@ -7359,12 +7403,11 @@ namespace Mono.CSharp {
 				Error_NullPropagatingLValue (rc);
 
 			if (right_side == EmptyExpression.OutAccess) {
-				if (best_candidate?.MemberType.Kind == MemberKind.ByRef) {
-					if (Arguments?.ContainsEmitWithAwait () == true) {
-						rc.Report.Error (8178, loc, "`await' cannot be used in an expression containing a call to `{0}' because it returns by reference",
-							GetSignatureForError ());
-					}
+				if (OverloadResolve (rc, null) == null)
+					return null;
 
+				if (best_candidate?.MemberType.Kind == MemberKind.ByRef) {
+					getter = CandidateToBaseOverride (rc, best_candidate.Get);
 					return this;
 				}
 
@@ -7396,7 +7439,7 @@ namespace Mono.CSharp {
 
 				if (best_candidate.MemberType.Kind == MemberKind.ByRef) {
 					getter = CandidateToBaseOverride (rc, best_candidate.Get);
-					return ByRefDereference.Create(this).Resolve(rc);
+					return ByRefDereference.Create (this).Resolve (rc);
 				}
 
 				rc.Report.Error (200, loc, "Property or indexer `{0}' cannot be assigned to (it is read-only)",
diff --git a/mcs/mcs/eval.cs b/mcs/mcs/eval.cs
index 60e0c6d64a0..075697bb1df 100644
--- a/mcs/mcs/eval.cs
+++ b/mcs/mcs/eval.cs
@@ -788,6 +788,7 @@ namespace Mono.CSharp
 				return null;
 			}
 
+			module.CloseContainerEarlyForReflectionEmit ();
 			module.CloseContainer ();
 			if (host != null)
 				host.CloseContainer ();
diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs
index 732ee3ee934..518ccc8ef43 100644
--- a/mcs/mcs/expression.cs
+++ b/mcs/mcs/expression.cs
@@ -1220,6 +1220,7 @@ namespace Mono.CSharp
 				expr = expr.ResolveLValue (ec, expr);
 			} else {
 				ec.Report.Error (1059, loc, "The operand of an increment or decrement operator must be a variable, property or indexer");
+				return null;
 			}
 
 			//
@@ -1477,6 +1478,11 @@ namespace Mono.CSharp
 				return null;
 			}
 
+			if (expr.Type == InternalType.DefaultType) {
+				Error_OperatorCannotBeApplied (rc, loc, OperatorName, expr.Type);
+				return null;
+			}
+
 			return this;
 		}
 
@@ -4304,9 +4310,32 @@ namespace Mono.CSharp
 				CheckOutOfRangeComparison (ec, rc, left.Type);
 			}
 
-			if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic || right.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic)
+			var ltype = left.Type;
+			var rtype = right.Type;
+			if (ltype.BuiltinType == BuiltinTypeSpec.Type.Dynamic || rtype.BuiltinType == BuiltinTypeSpec.Type.Dynamic)
 				return DoResolveDynamic (ec);
 
+			//
+			// Only default with == and != is explicitly allowed
+			//
+			if (ltype == InternalType.DefaultType || rtype == InternalType.DefaultType) {
+				if ((Oper & Operator.EqualityMask) == 0) {
+					ec.Report.Error (8310, loc, "Operator `{0}' cannot be applied to operand `default'", OperName (Oper));
+					return null;
+				}
+
+				if (ltype == rtype) {
+					ec.Report.Error (8315, loc, "Operator `{0}' is ambiguous on operands `default' and `default'", OperName (Oper));
+					return null;
+				}
+
+				if (rtype == InternalType.DefaultType) {
+					right = new DefaultValueExpression (new TypeExpression (ltype, right.Location), right.Location).Resolve (ec);
+				} else {
+					left = new DefaultValueExpression (new TypeExpression (rtype, left.Location), left.Location).Resolve (ec);
+				}
+			}
+
 			return DoResolveCore (ec, left, right);
 		}
 
@@ -6744,10 +6773,14 @@ namespace Mono.CSharp
 					ec.Report.Error (1764, loc,
 						"Cannot use fixed variable `{0}' inside an anonymous method, lambda expression or query expression",
 						GetSignatureForError ());
-				} else if (local_info.IsByRef) {
-					ec.Report.Error (8175, loc,
-						"Cannot use by-reference variable `{0}' inside an anonymous method, lambda expression, or query expression",
-						GetSignatureForError ());
+				} else if (local_info.IsByRef || local_info.Type.IsByRefLike) {
+					if (ec.CurrentAnonymousMethod is StateMachineInitializer) {
+						// It's reported later as 4012/4013
+					} else {
+						ec.Report.Error (8175, loc,
+							"Cannot use by-reference variable `{0}' inside an anonymous method, lambda expression, or query expression",
+							GetSignatureForError ());
+					}
 				}
 
 				if (ec.IsVariableCapturingRequired) {
@@ -6783,7 +6816,9 @@ namespace Mono.CSharp
 				local_info.SetIsUsed ();
 
 			if (local_info.IsReadonly && !ec.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.UsingInitializerScope)) {
-				if (rhs == EmptyExpression.LValueMemberAccess) {
+				if (local_info.IsByRef) {
+					// OK because it cannot be reassigned
+				} else if (rhs == EmptyExpression.LValueMemberAccess) {
 					// CS1654 already reported
 				} else {
 					int code;
@@ -7175,8 +7210,7 @@ namespace Mono.CSharp
 		{
 			var sn = expr as SimpleName;
 			if (sn != null && sn.Name == "var" && sn.Arity == 0 && arguments?.Count > 1) {
-				var targets = new List<Expression> (arguments.Count);
-				var variables = new List<LocalVariable> (arguments.Count);
+				var variables = new List<BlockVariable> (arguments.Count);
 				foreach (var arg in arguments) {
 					var arg_sn = arg.Expr as SimpleName;
 					if (arg_sn == null || arg_sn.Arity != 0) {
@@ -7186,12 +7220,10 @@ namespace Mono.CSharp
 
 					var lv = new LocalVariable (rc.CurrentBlock, arg_sn.Name, arg.Expr.Location);
 					rc.CurrentBlock.AddLocalName (lv);
-					variables.Add (lv);
-
-					targets.Add (new LocalVariableReference (lv, arg_sn.Location));
+					variables.Add (new BlockVariable (new VarExpr (lv.Location), lv));
 				}
 
-				var res = new TupleDeconstruct (targets, variables, right_side, loc);
+				var res = new TupleDeconstruct (variables, right_side, loc);
 				return res.Resolve (rc);
 			}
 
@@ -7306,15 +7338,8 @@ namespace Mono.CSharp
 			
 			eclass = ExprClass.Value;
 
-			if (type.Kind == MemberKind.ByRef) {
-				if (rhs == null && arguments?.ContainsEmitWithAwait () == true) {
-					ec.Report.Error (8178, loc, "`await' cannot be used in an expression containing a call to `{0}' because it returns by reference",
-						GetSignatureForError ());
-				}
-
-				if (rhs != EmptyExpression.OutAccess)
-					return ByRefDereference.Create (this).Resolve (ec);
-			}
+			if (type.Kind == MemberKind.ByRef && rhs != EmptyExpression.OutAccess)
+				return ByRefDereference.Create (this).Resolve (ec);
 
 			return this;
 		}
@@ -9034,7 +9059,7 @@ namespace Mono.CSharp
 			if (eclass == ExprClass.Unresolved)
 				ResolveBase (ec);
 
-			if (type.IsClass || type.IsReadOnly) {
+			if (type.IsClass || (type.IsReadOnly && !ec.HasSet (ResolveContext.Options.ConstructorScope))) {
 				if (right_side == EmptyExpression.UnaryAddress)
 					ec.Report.Error (459, loc, "Cannot take the address of `this' because it is read-only");
 				else if (right_side == EmptyExpression.OutAccess)
@@ -9908,7 +9933,7 @@ namespace Mono.CSharp
 		public static bool IsValidDotExpression (TypeSpec type)
 		{
 			const MemberKind dot_kinds = MemberKind.Class | MemberKind.Struct | MemberKind.Delegate | MemberKind.Enum |
-				MemberKind.Interface | MemberKind.TypeParameter | MemberKind.ArrayType;
+				MemberKind.Interface | MemberKind.TypeParameter | MemberKind.ArrayType  | MemberKind.ByRef;
 
 			return (type.Kind & dot_kinds) != 0 || type.BuiltinType == BuiltinTypeSpec.Type.Dynamic;
 		}
@@ -11614,7 +11639,7 @@ namespace Mono.CSharp
 			}
 
 			if (single_spec != null && single_spec.Dimension > 0) {
-				if (type.IsSpecialRuntimeType) {
+				if (type.IsSpecialRuntimeType || type.IsByRefLike) {
 					ec.Module.Compiler.Report.Error (611, loc, "Array elements cannot be of type `{0}'", type.GetSignatureForError ());
 				} else if (type.IsStatic) {
 					ec.Module.Compiler.Report.SymbolRelatedToPreviousError (type);
@@ -11650,6 +11675,13 @@ namespace Mono.CSharp
 	class ReferenceTypeExpr : TypeExpr
 	{
 		FullNamedExpression element;
+		readonly bool readOnly;
+
+		public ReferenceTypeExpr (FullNamedExpression element, bool readOnly, Location loc)
+			: this (element, loc)
+		{
+			this.readOnly = readOnly;
+		}
 
 		public ReferenceTypeExpr (FullNamedExpression element, Location loc)
 		{
@@ -11664,14 +11696,17 @@ namespace Mono.CSharp
 				return null;
 
 			eclass = ExprClass.Type;
-			type = ReferenceContainer.MakeType (mc.Module, type);
+			type = readOnly ?
+				ReadOnlyReferenceContainer.MakeType (mc.Module, type) :
+				ReferenceContainer.MakeType (mc.Module, type);
 
 			return type;
 		}
 
 		public override string GetSignatureForError ()
 		{
-			return "ref " + element.GetSignatureForError ();
+			var prefix = readOnly ? "ref " : "ref readonly ";
+			return prefix + element.GetSignatureForError ();
 		}
 
 		public override object Accept (StructuralVisitor visitor)
@@ -11783,6 +11818,7 @@ namespace Mono.CSharp
 		TypeSpec otype;
 		Expression texpr;
 		Expression count;
+		MethodSpec ctor;
 		
 		public StackAlloc (Expression type, Expression count, Location l)
 		{
@@ -11852,6 +11888,11 @@ namespace Mono.CSharp
 			int size = BuiltinTypeSpec.GetSize (otype);
 
 			count.Emit (ec);
+			bool count_on_stack = false;
+			if (ctor != null && !ExpressionAnalyzer.IsInexpensiveLoad (count)) {
+				ec.Emit (OpCodes.Dup);
+				count_on_stack = true;
+			}
 
 			if (size == 0)
 				ec.Emit (OpCodes.Sizeof, otype);
@@ -11860,6 +11901,19 @@ namespace Mono.CSharp
 
 			ec.Emit (OpCodes.Mul_Ovf_Un);
 			ec.Emit (OpCodes.Localloc);
+
+			if (ctor != null) {
+				if (!count_on_stack)
+					count.Emit (ec);
+				ec.Emit (OpCodes.Newobj, ctor);
+			}
+		}
+
+		public override void Error_ValueCannotBeConverted (ResolveContext rc, TypeSpec target, bool expl)
+		{
+			var etype = ((PointerContainer)type).Element;
+			rc.Report.Error (8346, loc, "Cannot convert a stackalloc expression of type `{0}' to type `{1}'",
+			                 etype.GetSignatureForError (), target.GetSignatureForError ());
 		}
 
 		protected override void CloneTo (CloneContext clonectx, Expression t)
@@ -11873,6 +11927,16 @@ namespace Mono.CSharp
 		{
 			return visitor.Visit (this);
 		}
+
+		public bool ResolveSpanConversion (ResolveContext rc, TypeSpec spanType)
+		{
+			ctor = MemberCache.FindMember (spanType, MemberFilter.Constructor (ParametersCompiled.CreateFullyResolved (PointerContainer.MakeType (rc.Module, rc.Module.Compiler.BuiltinTypes.Void), rc.Module.Compiler.BuiltinTypes.Int)), BindingRestriction.DeclaredOnly) as MethodSpec;
+			if (ctor == null)
+				return false;
+			
+			this.type = spanType;
+			return true;
+		}
 	}
 
 	//
@@ -13093,6 +13157,12 @@ namespace Mono.CSharp
 			expr.Emit (ec);
 		}
 
+		public override Expression CreateExpressionTree (ResolveContext rc)
+		{
+			rc.Report.Error (8153, Location, "An expression tree lambda cannot contain a call to a method, property, or indexer that returns by reference");
+			return null;
+		}
+
 		public void Emit (EmitContext ec, bool leave_copy)
 		{
 			Emit (ec);
@@ -13133,6 +13203,11 @@ namespace Mono.CSharp
 
 		public override Expression DoResolveLValue (ResolveContext rc, Expression right_side)
 		{
+			if (expr.ContainsEmitWithAwait ()) {
+				rc.Report.Error (8178, loc, "`await' cannot be used in an expression containing a call to `{0}' because it returns by reference",
+					expr.GetSignatureForError ());
+			}
+
 			return DoResolve (rc);
 		}
 
@@ -13149,4 +13224,98 @@ namespace Mono.CSharp
 			return visitor.Visit (this);
 		}
 	}
+
+	class DefaultLiteralExpression : Expression
+	{
+		public DefaultLiteralExpression (Location loc)
+		{
+			this.loc = loc;
+		}
+
+		public override Expression CreateExpressionTree (ResolveContext ec)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override Expression DoResolve (ResolveContext rc)
+		{
+			type = InternalType.DefaultType;
+			eclass = ExprClass.Value;
+			return this;
+		}
+
+		public override void Emit (EmitContext ec)
+		{
+			throw new NotSupportedException ();
+		}
+	}
+
+	class Discard : Expression, IAssignMethod, IMemoryLocation
+	{
+		public Discard (Location loc)
+		{
+			this.loc = loc;
+		}
+
+		public override Expression CreateExpressionTree (ResolveContext rc)
+		{
+			rc.Report.Error (8207, loc, "An expression tree cannot contain a discard");
+			return null;
+		}
+
+		protected override Expression DoResolve (ResolveContext rc)
+		{
+			type = InternalType.Discard;
+			eclass = ExprClass.Variable;
+			return this;
+		}
+
+		public override Expression DoResolveLValue (ResolveContext rc, Expression right_side)
+		{
+			if (right_side.Type == InternalType.DefaultType) {
+				rc.Report.Error (8183, loc, "Cannot infer the type of implicitly-typed discard");
+				type = InternalType.ErrorType;
+				return this;
+			}
+
+			if (right_side.Type.Kind == MemberKind.Void) {
+				rc.Report.Error (8209, loc, "Cannot assign void to a discard");
+				type = InternalType.ErrorType;
+				return this;
+			}
+
+			if (right_side != EmptyExpression.OutAccess) {
+				type = right_side.Type;
+			}
+
+			return this;
+		}
+
+		public override void Emit (EmitContext ec)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public void Emit (EmitContext ec, bool leave_copy)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound)
+		{
+			if (leave_copy)
+				source.Emit (ec);
+			else
+				source.EmitSideEffect (ec);
+		}
+
+		public void AddressOf (EmitContext ec, AddressOp mode)
+		{
+			var temp = ec.GetTemporaryLocal (type);
+			ec.Emit (OpCodes.Ldloca, temp);
+
+			// TODO: Should free it on next statement but don't have mechanism for that yet
+			// ec.FreeTemporaryLocal (temp, type);
+		}
+	}
 }
diff --git a/mcs/mcs/generic.cs b/mcs/mcs/generic.cs
index 625cd0c773f..ec2965df63b 100644
--- a/mcs/mcs/generic.cs
+++ b/mcs/mcs/generic.cs
@@ -693,6 +693,11 @@ namespace Mono.CSharp {
 					GetSignatureForError (), mc.GetSignatureForError (), input_variance, gtype_variance, parameters);
 		}
 
+		public TypeSpec GetAsyncMethodBuilder ()
+		{
+			return null;
+		}
+
 		public TypeSpec GetAttributeCoClass ()
 		{
 			return null;
@@ -2292,7 +2297,7 @@ namespace Mono.CSharp {
 					ok = false;
 				}
 
-				if (te.IsPointer || te.IsSpecialRuntimeType) {
+				if (te.IsPointer || te.IsSpecialRuntimeType || te.IsByRefLike) {
 					ec.Module.Compiler.Report.Error (306, args[i].Location,
 						"The type `{0}' may not be used as a type argument",
 						te.GetSignatureForError ());
@@ -3102,7 +3107,7 @@ namespace Mono.CSharp {
 			//
 			// Some types cannot be used as type arguments
 			//
-			if ((bound.Type.Kind == MemberKind.Void && !voidAllowed) || bound.Type.IsPointer || bound.Type.IsSpecialRuntimeType ||
+			if ((bound.Type.Kind == MemberKind.Void && !voidAllowed) || bound.Type.IsPointer || bound.Type.IsSpecialRuntimeType || bound.Type.IsByRefLike ||
 			    bound.Type == InternalType.MethodGroup || bound.Type == InternalType.AnonymousMethod || bound.Type == InternalType.VarOutType ||
 			    bound.Type == InternalType.ThrowExpr)
 				return;
@@ -3110,6 +3115,9 @@ namespace Mono.CSharp {
 			if (bound.Type.IsTupleType && TupleLiteral.ContainsNoTypeElement (bound.Type))
 				return;
 
+			if (bound.Type == InternalType.DefaultType)
+				return;
+
 			var a = bounds [index];
 			if (a == null) {
 				a = new List<BoundInfo> (2);
diff --git a/mcs/mcs/import.cs b/mcs/mcs/import.cs
index 1cddf7c01f4..f7c4fd74b08 100644
--- a/mcs/mcs/import.cs
+++ b/mcs/mcs/import.cs
@@ -975,6 +975,10 @@ namespace Mono.CSharp
 						mod |= Modifiers.READONLY;
 					}
 
+					if (HasAttribute (CustomAttributeData.GetCustomAttributes (type), "IsByRefLikeAttribute", CompilerServicesNamespace)) {
+						mod |= Modifiers.REF;
+					}
+
 					break;
 				}
 			}
@@ -1401,6 +1405,7 @@ namespace Mono.CSharp
 			public string DefaultIndexerName;
 			public bool? CLSAttributeValue;
 			public TypeSpec CoClass;
+			public TypeSpec AsyncMethodBuilder;
 
 			static bool HasMissingType (ConstructorInfo ctor)
 			{
@@ -1522,6 +1527,20 @@ namespace Mono.CSharp
 							bag.CoClass = importer.ImportType ((MetaType) a.ConstructorArguments[0].Value);
 							continue;
 						}
+
+						if (name == "AsyncMethodBuilderAttribute") {
+							if (dt.Namespace != "System.Runtime.CompilerServices")
+								continue;
+
+							if (HasMissingType (a.Constructor))
+								continue;
+
+							if (bag == null)
+								bag = new AttributesBag ();
+
+							bag.AsyncMethodBuilder = importer.ImportType ((MetaType)a.ConstructorArguments [0].Value);
+							continue;
+						}
 					}
 				}
 
@@ -2129,6 +2148,14 @@ namespace Mono.CSharp
 			}
 		}
 
+		public TypeSpec GetAsyncMethodBuilder ()
+		{
+			if (cattrs == null)
+				ReadAttributes ();
+
+			return cattrs.AsyncMethodBuilder;
+		}
+
 		public TypeSpec GetAttributeCoClass ()
 		{
 			if (cattrs == null)
@@ -2445,6 +2472,11 @@ namespace Mono.CSharp
 
 		#endregion
 
+		public TypeSpec GetAsyncMethodBuilder ()
+		{
+			return null;
+		}
+
 		public TypeSpec GetAttributeCoClass ()
 		{
 			return null;
diff --git a/mcs/mcs/membercache.cs b/mcs/mcs/membercache.cs
index eebf71b844b..ca05d2d7afc 100644
--- a/mcs/mcs/membercache.cs
+++ b/mcs/mcs/membercache.cs
@@ -309,7 +309,6 @@ namespace Mono.CSharp {
 				//
 				if (!BuiltinTypeSpec.IsPrimitiveType (dt) || dt.BuiltinType == BuiltinTypeSpec.Type.Char) {
 					switch (dt.BuiltinType) {
-					case BuiltinTypeSpec.Type.String:
 					case BuiltinTypeSpec.Type.Delegate:
 					case BuiltinTypeSpec.Type.MulticastDelegate:
 						break;
@@ -317,6 +316,9 @@ namespace Mono.CSharp {
 						if (name == Operator.GetMetadataName (Operator.OpType.Implicit) || name == Operator.GetMetadataName (Operator.OpType.Explicit)) {
 							state |= StateFlags.HasConversionOperator;
 						} else {
+							if (dt.BuiltinType == BuiltinTypeSpec.Type.String)
+								break;
+
 							state |= StateFlags.HasUserOperator;
 						}
 
diff --git a/mcs/mcs/method.cs b/mcs/mcs/method.cs
index ccd4898e91c..1fca10dd6d0 100644
--- a/mcs/mcs/method.cs
+++ b/mcs/mcs/method.cs
@@ -701,6 +701,10 @@ namespace Mono.CSharp {
 			if (MemberType.IsStatic) {
 				Error_StaticReturnType ();
 			}
+
+			if (MemberType.IsSpecialRuntimeType && Compiler.Settings.StdLib) {
+				Error_ReturnTypeCantBeRefAny (Location, ReturnType, Report);
+			}
 		}
 
 		public override void Emit ()
@@ -716,6 +720,8 @@ namespace Mono.CSharp {
 				Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder);
 			} else if (ReturnType.HasDynamicElement) {
 				Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder, ReturnType, Location);
+			} else if (ReturnType is ReadOnlyReferenceContainer) {
+				Module.PredefinedAttributes.IsReadOnly.EmitAttribute (CreateReturnBuilder ().Builder);
 			}
 
 			if (ReturnType.HasNamedTupleElement) {
@@ -764,6 +770,11 @@ namespace Mono.CSharp {
 				GetSignatureForError ());
 		}
 
+		public static void Error_ReturnTypeCantBeRefAny (Location loc, TypeSpec t, Report Report)
+		{
+			Report.Error (1599, loc, "The return type of `{0}' is not allowed", t.GetSignatureForError ());
+		}
+
 		public bool IsPartialDefinition {
 			get {
 				return (ModFlags & Modifiers.PARTIAL) != 0 && Block == null;
@@ -1231,11 +1242,6 @@ namespace Mono.CSharp {
 					"Introducing `Finalize' method can interfere with destructor invocation. Did you intend to declare a destructor?");
 			}
 
-			if (Compiler.Settings.StdLib && ReturnType.IsSpecialRuntimeType) {
-				Error1599 (Location, ReturnType, Report);
-				return false;
-			}
-
 			if (CurrentTypeParameters == null) {
 				if (base_method != null && !IsExplicitImpl) {
 					if (parameters.Count == 1 && ParameterTypes[0].BuiltinType == BuiltinTypeSpec.Type.Object && MemberName.Name == "Equals")
@@ -1261,8 +1267,9 @@ namespace Mono.CSharp {
 				if ((ModFlags & Modifiers.ASYNC) != 0) {
 					if (ReturnType.Kind != MemberKind.Void &&
 						ReturnType != Module.PredefinedTypes.Task.TypeSpec &&
-						!ReturnType.IsGenericTask) {
-						Report.Error (1983, Location, "The return type of an async method must be void, Task, or Task<T>");
+						!ReturnType.IsGenericTask &&
+					    !ReturnType.IsCustomTaskType ()) {
+						Report.Error (1983, Location, "The return type of an async method must be void or task type");
 					}
 
 					block = (ToplevelBlock) block.ConvertToAsyncTask (this, Parent.PartialContainer, parameters, ReturnType, null, Location);
@@ -1396,11 +1403,6 @@ namespace Mono.CSharp {
 			return base.EnableOverloadChecks (overload);
 		}
 
-		public static void Error1599 (Location loc, TypeSpec t, Report Report)
-		{
-			Report.Error (1599, loc, "Method or delegate cannot return type `{0}'", t.GetSignatureForError ());
-		}
-
 		protected override bool ResolveMemberType ()
 		{
 			if (CurrentTypeParameters != null) {
@@ -2467,6 +2469,8 @@ namespace Mono.CSharp {
 				Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder);
 			} else if (ReturnType.HasDynamicElement) {
 				Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder, ReturnType, Location);
+			} else if (ReturnType is ReadOnlyReferenceContainer) {
+				Module.PredefinedAttributes.IsReadOnly.EmitAttribute (CreateReturnBuilder ().Builder);
 			}
 
 			if (ReturnType.HasNamedTupleElement) {
diff --git a/mcs/mcs/modifiers.cs b/mcs/mcs/modifiers.cs
index bfae5985a03..926ab5d1848 100644
--- a/mcs/mcs/modifiers.cs
+++ b/mcs/mcs/modifiers.cs
@@ -53,6 +53,7 @@ namespace Mono.CSharp
 		DEBUGGER_HIDDEN			= 0x400000,
 		DEBUGGER_STEP_THROUGH	= 0x800000,
 		AutoProperty			= 0x1000000,
+		REF                     = 0x2000000,
 
 		AccessibilityMask = PUBLIC | PROTECTED | INTERNAL | PRIVATE,
 		AllowedExplicitImplFlags = UNSAFE | EXTERN,
diff --git a/mcs/mcs/module.cs b/mcs/mcs/module.cs
index 00afac6c604..2293d825b36 100644
--- a/mcs/mcs/module.cs
+++ b/mcs/mcs/module.cs
@@ -265,6 +265,7 @@ namespace Mono.CSharp
 		readonly Dictionary<ArrayContainer.TypeRankPair, ArrayContainer> array_types;
 		readonly Dictionary<TypeSpec, PointerContainer> pointer_types;
 		readonly Dictionary<TypeSpec, ReferenceContainer> reference_types;
+		readonly Dictionary<TypeSpec, ReadOnlyReferenceContainer> readonly_reference_types;
 		readonly Dictionary<TypeSpec, MethodSpec> attrs_cache;
 		readonly Dictionary<TypeSpec, AwaiterDefinition> awaiters;
 		readonly Dictionary<TypeSpec, TypeInfo> type_info_cache;
@@ -301,6 +302,7 @@ namespace Mono.CSharp
 			array_types = new Dictionary<ArrayContainer.TypeRankPair, ArrayContainer> ();
 			pointer_types = new Dictionary<TypeSpec, PointerContainer> ();
 			reference_types = new Dictionary<TypeSpec, ReferenceContainer> ();
+			readonly_reference_types = new Dictionary<TypeSpec, ReadOnlyReferenceContainer> ();
 			attrs_cache = new Dictionary<TypeSpec, MethodSpec> ();
 			awaiters = new Dictionary<TypeSpec, AwaiterDefinition> ();
 			type_info_cache = new Dictionary<TypeSpec, TypeInfo> ();
@@ -427,6 +429,12 @@ namespace Mono.CSharp
 			}
 		}
 
+		internal Dictionary<TypeSpec, ReadOnlyReferenceContainer> ReadonlyReferenceTypesCache {
+			get {
+				return readonly_reference_types;
+			}
+		}
+
 		internal Dictionary<TypeSpec, TypeInfo> TypeInfoCache {
 			get {
 				return type_info_cache;
diff --git a/mcs/mcs/parameter.cs b/mcs/mcs/parameter.cs
index 2bd2a498a91..cc10eee162b 100644
--- a/mcs/mcs/parameter.cs
+++ b/mcs/mcs/parameter.cs
@@ -1447,7 +1447,7 @@ namespace Mono.CSharp {
 
 			expr = Child;
 
-			if (!(expr is Constant || expr is DefaultValueExpression || (expr is New && ((New) expr).IsGeneratedStructConstructor))) {
+			if (!(expr is Constant || expr is DefaultValueExpression || expr is DefaultLiteralExpression || (expr is New && ((New) expr).IsGeneratedStructConstructor))) {
 				if (!(expr is ErrorExpression)) {
 					rc.Report.Error (1736, Location,
 						"The expression being assigned to optional parameter `{0}' must be a constant or default value",
diff --git a/mcs/mcs/statement.cs b/mcs/mcs/statement.cs
index 58ba2795e4b..9c51128548f 100644
--- a/mcs/mcs/statement.cs
+++ b/mcs/mcs/statement.cs
@@ -1160,7 +1160,8 @@ namespace Mono.CSharp {
 				//
 				if (ec.CurrentAnonymousMethod is AsyncInitializer) {
 					var storey = (AsyncTaskStorey) ec.CurrentAnonymousMethod.Storey;
-					if (storey.ReturnType == ec.Module.PredefinedTypes.Task.TypeSpec) {
+					var s_return_type = storey.ReturnType;
+					if (s_return_type == ec.Module.PredefinedTypes.Task.TypeSpec) {
 						//
 						// Extra trick not to emit ret/leave inside awaiter body
 						//
@@ -1168,8 +1169,8 @@ namespace Mono.CSharp {
 						return true;
 					}
 
-					if (storey.ReturnType.IsGenericTask)
-						block_return_type = storey.ReturnType.TypeArguments[0];
+					if (s_return_type.IsGenericTask || (s_return_type.Arity == 1 && s_return_type.IsCustomTaskType ()))
+					    block_return_type = s_return_type.TypeArguments[0];
 				}
 
 				if (ec.CurrentIterator != null) {
@@ -1220,7 +1221,7 @@ namespace Mono.CSharp {
 							return false;
 						}
 
-						if (!async_type.IsGenericTask) {
+						if (!async_type.IsGeneric) {
 							if (this is ContextualReturn)
 								return true;
 
@@ -2368,7 +2369,12 @@ namespace Mono.CSharp {
 			if (initializer == null)
 				return null;
 
-			var c = initializer as Constant;
+			Constant c;
+			if (initializer.Type == InternalType.DefaultType)
+				c = New.Constantify (li.Type, initializer.Location);
+			else
+				c = initializer as Constant;
+
 			if (c == null) {
 				initializer.Error_ExpressionMustBeConstant (bc, initializer.Location, li.Name);
 				return null;
@@ -2407,14 +2413,14 @@ namespace Mono.CSharp {
 			AddressTaken = 1 << 2,
 			CompilerGenerated = 1 << 3,
 			Constant = 1 << 4,
-			ForeachVariable = 1 << 5,
-			FixedVariable = 1 << 6,
-			UsingVariable = 1 << 7,
+			ForeachVariable = 1 << 5 | ReadonlyMask,
+			FixedVariable = 1 << 6 | ReadonlyMask,
+			UsingVariable = 1 << 7 | ReadonlyMask,
 			IsLocked = 1 << 8,
 			SymbolFileHidden = 1 << 9,
 			ByRef = 1 << 10,
 
-			ReadonlyMask = ForeachVariable | FixedVariable | UsingVariable
+			ReadonlyMask = 1 << 20
 		}
 
 		TypeSpec type;
@@ -2534,7 +2540,7 @@ namespace Mono.CSharp {
 
 		public bool IsFixed {
 			get {
-				return (flags & Flags.FixedVariable) != 0;
+				return (flags & Flags.FixedVariable) == Flags.FixedVariable;
 			}
 			set {
 				flags = value ? flags | Flags.FixedVariable : flags & ~Flags.FixedVariable;
@@ -2672,7 +2678,7 @@ namespace Mono.CSharp {
 
 		public string GetReadOnlyContext ()
 		{
-			switch (flags & Flags.ReadonlyMask) {
+			switch (flags & (Flags.ForeachVariable | Flags.FixedVariable | Flags.UsingVariable)) {
 			case Flags.FixedVariable:
 				return "fixed variable";
 			case Flags.ForeachVariable:
@@ -8191,7 +8197,9 @@ namespace Mono.CSharp {
 				}
 
 				if (iface_candidate == null) {
-					if (expr.Type != InternalType.ErrorType) {
+					if (expr.Type == InternalType.DefaultType) {
+						rc.Report.Error (8312, loc, "Use of default literal is not valid in this context");
+					} else if (expr.Type != InternalType.ErrorType) {
 						rc.Report.Error (1579, loc,
 							"foreach statement cannot operate on variables of type `{0}' because it does not contain a definition for `{1}' or is inaccessible",
 							expr.Type.GetSignatureForError (), "GetEnumerator");
diff --git a/mcs/mcs/tuples.cs b/mcs/mcs/tuples.cs
index bb7faf734df..901efdc9541 100644
--- a/mcs/mcs/tuples.cs
+++ b/mcs/mcs/tuples.cs
@@ -432,7 +432,7 @@ namespace Mono.CSharp
 	{
 		Expression source;
 		List<Expression> targetExprs;
-		List<LocalVariable> variablesToInfer;
+		List<BlockVariable> variables;
 		Expression instance;
 
 		public TupleDeconstruct (List<Expression> targetExprs, Expression source, Location loc)
@@ -442,10 +442,11 @@ namespace Mono.CSharp
 			this.loc = loc;
 		}
 
-		public TupleDeconstruct (List<Expression> targetExprs, List<LocalVariable> variables, Expression source, Location loc)
-			: this (targetExprs, source, loc)
+		public TupleDeconstruct (List<BlockVariable> variables, Expression source, Location loc)
 		{
-			this.variablesToInfer = variables;
+			this.source = source;
+			this.variables = variables;
+			this.loc = loc;
 		}
 
 		public override Expression CreateExpressionTree (ResolveContext ec)
@@ -469,9 +470,18 @@ namespace Mono.CSharp
 			var src_type = src.Type;
 
 			if (src_type.IsTupleType) {
-				if (src_type.Arity != targetExprs.Count) {
+				int target_count;
+
+				if (targetExprs == null) {
+					target_count = variables.Count;
+					targetExprs = new List<Expression> (target_count);
+				} else {
+					target_count = targetExprs.Count;
+				}
+
+				if (src_type.Arity != target_count) {
 					rc.Report.Error (8132, loc, "Cannot deconstruct a tuple of `{0}' elements into `{1}' variables",
-						src_type.Arity.ToString (), targetExprs.Count.ToString ());
+						src_type.Arity.ToString (CultureInfo.InvariantCulture), target_count.ToString (CultureInfo.InvariantCulture));
 					return null;
 				}
 
@@ -482,27 +492,44 @@ namespace Mono.CSharp
 					instance = expr_variable.CreateReferenceExpression (rc, loc);
 				}
 
-				for (int i = 0; i < targetExprs.Count; ++i) {
+				for (int i = 0; i < target_count; ++i) {
 					var tle = src_type.TypeArguments [i];
 
-					var lv = variablesToInfer? [i];
-					if (lv != null) {
-						if (InternalType.HasNoType (tle)) {
-							rc.Report.Error (8130, Location, "Cannot infer the type of implicitly-typed deconstruction variable `{0}'", lv.Name);
-							lv.Type = InternalType.ErrorType;
+					if (variables != null) {
+						var variable = variables [i].Variable;
+
+						if (variable.Type == InternalType.Discard) {
+							variables [i] = null;
+							targetExprs.Add (EmptyExpressionStatement.Instance);
 							continue;
 						}
 
-						lv.Type = tle;
-						lv.PrepareAssignmentAnalysis ((BlockContext) rc);
-					}
+						var variable_type = variables [i].TypeExpression;
+
+						targetExprs.Add (new LocalVariableReference (variable, variable.Location));
+
+						if (variable_type is VarExpr) {
+							if (InternalType.HasNoType (tle)) {
+								rc.Report.Error (8130, Location, "Cannot infer the type of implicitly-typed deconstruction variable `{0}'", variable.Name);
+								tle = InternalType.ErrorType;
+							}
 
+							variable.Type = tle;
+						} else {
+							variable.Type = variable_type.ResolveAsType (rc);
+						}
+
+						variable.PrepareAssignmentAnalysis ((BlockContext)rc);
+					}
 
 					var element_src = tupleLiteral == null ? new MemberAccess (instance, NamedTupleSpec.GetElementPropertyName (i)) : tupleLiteral.Elements [i].Expr;
 					targetExprs [i] = new SimpleAssign (targetExprs [i], element_src).Resolve (rc);
 				}
 
 				eclass = ExprClass.Value;
+
+				// TODO: The type is same only if there is no target element conversion
+				// var res = (/*byte*/ b, /*short*/ s) = (2, 4);
 				type = src.Type;
 				return this;
 			}
@@ -527,11 +554,24 @@ namespace Mono.CSharp
 
 		public override void Emit (EmitContext ec)
 		{
-			throw new NotImplementedException ();
+			if (instance != null)
+				((ExpressionStatement)source).EmitStatement (ec);
+
+			foreach (ExpressionStatement expr in targetExprs)
+				expr.Emit (ec);
+
+			var ctor = MemberCache.FindMember (type, MemberFilter.Constructor (null), BindingRestriction.DeclaredOnly | BindingRestriction.InstanceOnly) as MethodSpec;
+			ec.Emit (OpCodes.Newobj, ctor);
 		}
 
 		public override void EmitStatement (EmitContext ec)
 		{
+			if (variables != null) {
+				foreach (var lv in variables) {
+					lv?.Variable.CreateBuilder (ec);
+				}
+			}
+			
 			if (instance != null)
 				((ExpressionStatement) source).EmitStatement (ec);
 			
@@ -549,9 +589,6 @@ namespace Mono.CSharp
 			if (leave_copy)
 				throw new NotImplementedException ();
 
-			foreach (var lv in variablesToInfer)
-				lv.CreateBuilder (ec);
-
 			EmitStatement (ec);
 		}
 
@@ -563,11 +600,11 @@ namespace Mono.CSharp
 
 		public void SetGeneratedFieldAssigned (FlowAnalysisContext fc)
 		{
-			if (variablesToInfer == null)
+			if (variables == null)
 				return;
 
-			foreach (var lv in variablesToInfer)
-				fc.SetVariableAssigned (lv.VariableInfo);
+			foreach (var lv in variables)
+				fc.SetVariableAssigned (lv.Variable.VariableInfo);
 		}
 	}
 }
\ No newline at end of file
diff --git a/mcs/mcs/typemanager.cs b/mcs/mcs/typemanager.cs
index b6aff14e1c0..7a16cda2774 100644
--- a/mcs/mcs/typemanager.cs
+++ b/mcs/mcs/typemanager.cs
@@ -242,6 +242,7 @@ namespace Mono.CSharp
 
 		// C# 7.0
 		public readonly PredefinedType[] Tuples;
+		public readonly PredefinedType SpanGeneric;
 
 		public PredefinedTypes (ModuleContainer module)
 		{
@@ -301,6 +302,8 @@ namespace Mono.CSharp
 			FormattableString = new PredefinedType (module, MemberKind.Class, "System", "FormattableString");
 			FormattableStringFactory = new PredefinedType (module, MemberKind.Class, "System.Runtime.CompilerServices", "FormattableStringFactory");
 
+			SpanGeneric = new PredefinedType (module, MemberKind.Struct, "System", "Span", 1);
+
 			//
 			// Define types which are used for comparison. It does not matter
 			// if they don't exist as no error report is needed
@@ -348,6 +351,8 @@ namespace Mono.CSharp
 				if (pt.Define ())
 					pt.TypeSpec.IsTupleType = true;
 			}
+
+			SpanGeneric.Define ();
 		}
 	}
 
@@ -430,6 +435,7 @@ namespace Mono.CSharp
 			ArrayEmpty = new PredefinedMember<MethodSpec> (module, types.Array,
 				MemberFilter.Method ("Empty", 1, ParametersCompiled.EmptyReadOnlyParameters, null));
 
+			// TODO: Must me static
 			AsyncTaskMethodBuilderCreate = new PredefinedMember<MethodSpec> (module, types.AsyncTaskMethodBuilder,
 				MemberFilter.Method ("Create", 0, ParametersCompiled.EmptyReadOnlyParameters, types.AsyncTaskMethodBuilder.TypeSpec));
 
@@ -485,6 +491,7 @@ namespace Mono.CSharp
 			AsyncTaskMethodBuilderTask = new PredefinedMember<PropertySpec> (module, types.AsyncTaskMethodBuilder,
 				MemberFilter.Property ("Task", null));
 
+			// TODO: Must me static
 			AsyncTaskMethodBuilderGenericCreate = new PredefinedMember<MethodSpec> (module, types.AsyncTaskMethodBuilderGeneric,
 				MemberFilter.Method ("Create", 0, ParametersCompiled.EmptyReadOnlyParameters, types.AsyncVoidMethodBuilder.TypeSpec));
 
@@ -542,6 +549,7 @@ namespace Mono.CSharp
 			AsyncTaskMethodBuilderGenericTask = new PredefinedMember<PropertySpec> (module, types.AsyncTaskMethodBuilderGeneric,
 				MemberFilter.Property ("Task", null));
 
+			// TODO: Must me static
 			AsyncVoidMethodBuilderCreate = new PredefinedMember<MethodSpec> (module, types.AsyncVoidMethodBuilder,
 				MemberFilter.Method ("Create", 0, ParametersCompiled.EmptyReadOnlyParameters, types.AsyncVoidMethodBuilder.TypeSpec));
 
@@ -1006,9 +1014,6 @@ namespace Mono.CSharp
 
 		public T Resolve (Location loc)
 		{
-			if (member != null)
-				return member;
-
 			if (Get () != null)
 				return member;
 
diff --git a/mcs/mcs/typespec.cs b/mcs/mcs/typespec.cs
index d14e1ead3e3..a58a0fe5178 100644
--- a/mcs/mcs/typespec.cs
+++ b/mcs/mcs/typespec.cs
@@ -225,6 +225,8 @@ namespace Mono.CSharp
 			}
 		}
 
+		public bool IsByRefLike => (modifiers & Modifiers.REF) != 0;
+
 		//
 		// Returns true for instances of System.Threading.Tasks.Task<T>
 		//
@@ -1452,6 +1454,7 @@ namespace Mono.CSharp
 		int TypeParametersCount { get; }
 		TypeParameterSpec[] TypeParameters { get; }
 
+		TypeSpec GetAsyncMethodBuilder ();
 		TypeSpec GetAttributeCoClass ();
 		string GetAttributeDefaultMember ();
 		AttributeUsageAttribute GetAttributeUsage (PredefinedAttribute pa);
@@ -1461,6 +1464,29 @@ namespace Mono.CSharp
 
 	class InternalType : TypeSpec, ITypeDefinition
 	{
+		sealed class InternalTypeAssembly : IAssemblyDefinition
+		{
+			public static readonly InternalTypeAssembly Instance = new InternalTypeAssembly ();
+
+			public string FullName => throw new NotImplementedException ();
+
+			public bool IsCLSCompliant => false;
+
+			public bool IsMissing => false;
+
+			public string Name => throw new NotImplementedException ();
+
+			public byte [] GetPublicKeyToken ()
+			{
+				throw new NotImplementedException ();
+			}
+
+			public bool IsFriendAssemblyTo (IAssemblyDefinition assembly)
+			{
+				return false;
+			}
+		}
+
 		public static readonly InternalType AnonymousMethod = new InternalType ("anonymous method");
 		public static readonly InternalType Arglist = new InternalType ("__arglist");
 		public static readonly InternalType MethodGroup = new InternalType ("method group");
@@ -1470,6 +1496,8 @@ namespace Mono.CSharp
 		public static readonly InternalType ErrorType = new InternalType ("<error>");
 		public static readonly InternalType VarOutType = new InternalType ("var out");
 		public static readonly InternalType ThrowExpr = new InternalType ("throw expression");
+		public static readonly InternalType DefaultType = new InternalType ("default");
+		public static readonly InternalType Discard = new InternalType ("discard");
 
 		readonly string name;
 
@@ -1494,7 +1522,7 @@ namespace Mono.CSharp
 
 		IAssemblyDefinition ITypeDefinition.DeclaringAssembly {
 			get {
-				throw new NotImplementedException ();
+				return InternalTypeAssembly.Instance;
 			}
 		}
 
@@ -1561,6 +1589,11 @@ namespace Mono.CSharp
 
 		#region ITypeDefinition Members
 
+		TypeSpec ITypeDefinition.GetAsyncMethodBuilder ()
+		{
+			return null;
+		}
+
 		TypeSpec ITypeDefinition.GetAttributeCoClass ()
 		{
 			return null;
@@ -1614,7 +1647,7 @@ namespace Mono.CSharp
 
 		public static bool HasNoType (TypeSpec type)
 		{
-			return type == AnonymousMethod || type == MethodGroup || type == NullLiteral || type == ThrowExpr;
+			return type == AnonymousMethod || type == MethodGroup || type == NullLiteral || type == ThrowExpr || type == DefaultType;
 		}
 	}
 
@@ -1749,6 +1782,11 @@ namespace Mono.CSharp
 			}
 		}
 
+		public TypeSpec GetAsyncMethodBuilder ()
+		{
+			return null;
+		}
+
 		public TypeSpec GetAttributeCoClass ()
 		{
 			return Element.MemberDefinition.GetAttributeCoClass ();
@@ -1996,9 +2034,10 @@ namespace Mono.CSharp
 	[System.Diagnostics.DebuggerDisplay("{DisplayDebugInfo()}")]
 	class ReferenceContainer : ElementTypeSpec
 	{
-		ReferenceContainer (TypeSpec element)
+		protected ReferenceContainer (TypeSpec element)
 			: base (MemberKind.ByRef, element, null)
 		{
+			cache = null;
 		}
 
 		public override IList<TypeSpec> Interfaces {
@@ -2039,6 +2078,39 @@ namespace Mono.CSharp
 
 			return pc;
 		}
+
+		protected override void InitializeMemberCache(bool onlyTypes)
+		{
+			cache = Element.MemberCache;
+		}
+	}
+
+	[System.Diagnostics.DebuggerDisplay ("{DisplayDebugInfo()}")]
+	class ReadOnlyReferenceContainer : ReferenceContainer
+	{
+		public ReadOnlyReferenceContainer (TypeSpec element)
+			: base (element)
+		{
+		}
+
+		string DisplayDebugInfo ()
+		{
+			return "ref readonly " + GetSignatureForError ();
+		}
+
+		public new static ReferenceContainer MakeType (ModuleContainer module, TypeSpec element)
+		{
+			if (element.Kind == MemberKind.ByRef)
+				throw new ArgumentException ();
+
+			ReadOnlyReferenceContainer pc;
+			if (!module.ReadonlyReferenceTypesCache.TryGetValue (element, out pc)) {
+				pc = new ReadOnlyReferenceContainer (element);
+				module.ReadonlyReferenceTypesCache.Add (element, pc);
+			}
+
+			return pc;
+		}
 	}
 
 	class PointerContainer : ElementTypeSpec
diff --git a/mcs/tests/gtest-409.cs b/mcs/tests/gtest-409.cs
index 8db59d7e48d..606ae3685d1 100644
--- a/mcs/tests/gtest-409.cs
+++ b/mcs/tests/gtest-409.cs
@@ -1,3 +1,4 @@
+// Compiler options: -langversion:latest
 using System;
 
 //
@@ -175,6 +176,11 @@ public class ConditionalParsing
 		var x = args ?.2f : -.2f;
 	}
 
+	void Test_23 (string args)
+	{
+		var x = args == null ? default : 1;
+	}
+
 	static void Helper<T> (T arg)
 	{
 	}
diff --git a/mcs/tests/test-948.cs b/mcs/tests/test-948.cs
new file mode 100644
index 00000000000..34b3ab9a0c4
--- /dev/null
+++ b/mcs/tests/test-948.cs
@@ -0,0 +1,16 @@
+// Compiler options: -langversion:7.2 -unsafe
+
+using System;
+
+class X
+{
+	public static void Main ()
+	{
+		Span<int> stackSpan = stackalloc int[100];
+	}
+
+	unsafe void Foo ()
+	{
+
+	}
+}
\ No newline at end of file
diff --git a/mcs/tests/test-async-94.cs b/mcs/tests/test-async-94.cs
new file mode 100644
index 00000000000..ce9a30409bb
--- /dev/null
+++ b/mcs/tests/test-async-94.cs
@@ -0,0 +1,127 @@
+using System;
+using System.Threading.Tasks;
+using System.Runtime.CompilerServices;
+
+[AsyncMethodBuilder (typeof(MyTaskMethodBuilder<>))]
+class MyTask<T>
+{
+}
+
+[AsyncMethodBuilder (typeof(MyTaskMethodBuilder))]
+class MyTask
+{
+}
+
+class MyTaskMethodBuilder
+{
+	public static MyTaskMethodBuilder Create()
+	{
+		return null;
+	}
+
+	public MyTask Task {
+		get {
+			return null;
+		}
+	}
+
+	public void SetException (Exception exception)
+	{
+
+	}
+
+	public void SetResult ()
+	{
+
+	}
+
+	public void AwaitOnCompleted<TAwaiter, TStateMachine> (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine
+	{
+
+	}
+
+	public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine> (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine
+	{
+
+	}
+
+	public void Start<TStateMachine> (ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine
+	{
+
+	}
+
+	public void SetStateMachine (IAsyncStateMachine stateMachine)
+	{
+
+	}	
+}
+
+class MyTaskMethodBuilder<T>
+{
+	public static MyTaskMethodBuilder<T> Create()
+	{
+		return null;
+	}
+
+	public MyTask<T> Task {
+		get {
+			return null;
+		}
+	}
+
+	public void SetException (Exception exception)
+	{
+
+	}
+
+	public void SetResult (T result)
+	{
+
+	}
+
+	public void AwaitOnCompleted<TAwaiter, TStateMachine> (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine
+	{
+
+	}
+
+	public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine> (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine
+	{
+
+	}
+
+	public void Start<TStateMachine> (ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine
+	{
+
+	}
+
+	public void SetStateMachine (IAsyncStateMachine stateMachine)
+	{
+
+	}
+}
+
+class X
+{
+	public async MyTask Test ()
+	{
+		await Task.Delay (1);
+	}
+
+	public async MyTask<int> Test2 ()
+	{
+		await Task.Delay (1);
+		return 2;
+	}
+
+	public async ValueTask<string> Test3 ()
+	{
+		await Task.Delay (1);
+		return "as";
+	}	
+
+	public static void Main ()
+	{
+		var x = new X ();
+		var r1 = x.Test3 ().Result;
+	}
+}
\ No newline at end of file
diff --git a/mcs/tests/test-default-01.cs b/mcs/tests/test-default-01.cs
new file mode 100644
index 00000000000..823e33c451b
--- /dev/null
+++ b/mcs/tests/test-default-01.cs
@@ -0,0 +1,52 @@
+// Compiler options: -langversion:latest
+
+static class X
+{
+	const int c1 = default;
+	const int c2 = default (int);
+
+	public static void Main ()
+	{
+		int a = default;
+		var b = (int) default;
+		const int c = default;
+		var d = new[] { 1, default };
+		dynamic e = default;
+		int f = checked (default);
+		(int a, int b) g = (1, default);
+		var h = 1 != default;
+		var i = default == M4 ();
+	}
+
+	static int M1 ()
+	{
+		return default;
+	}
+
+	static void M2 ()
+	{
+		try {
+			throw new System.Exception ();
+		} catch (System.Exception) when (default) {
+		}
+
+		if (default) {			
+		}
+	}
+
+	static void M3 (int x = default)
+	{
+	}
+
+	static System.Func<int> M4 ()
+	{
+		return () => default;
+	} 
+}
+/*
+enum E
+{
+	A = default,
+	B = default + 1
+}
+*/
\ No newline at end of file
diff --git a/mcs/tests/test-default-02.cs b/mcs/tests/test-default-02.cs
new file mode 100644
index 00000000000..0039782e5f2
--- /dev/null
+++ b/mcs/tests/test-default-02.cs
@@ -0,0 +1,33 @@
+// Compiler options: -langversion:latest
+
+class C
+{
+	static void Main()
+	{
+		M (default, 1);
+
+		M2 (default);
+		M2 (null);
+
+		var res = Test (default);
+	}
+
+
+	static void M<T> (T x, T y)
+	{
+	}
+
+	static void M2 (params object[] x)
+	{        
+	}
+
+	static byte[] Test (S<byte> x)
+	{
+		return null;
+	}
+}
+
+struct S<T>
+{
+
+}
\ No newline at end of file
diff --git a/mcs/tests/test-discards-01.cs b/mcs/tests/test-discards-01.cs
new file mode 100644
index 00000000000..54cf29779c6
--- /dev/null
+++ b/mcs/tests/test-discards-01.cs
@@ -0,0 +1,36 @@
+using System;
+
+class X
+{
+	public static void Main ()
+	{
+		string s = null;
+
+		_ = 1;
+		{
+			char _ = '4';
+		}
+
+		_ = TestValue ();
+
+		_ = _ = s;
+
+		byte k1;
+		var s1 = (k1, _) = (1, s);
+
+		Func<object> l1 = () => _ = (_, _) = (1, s);
+
+		TryGetValue (out _);
+	}
+
+	static bool TryGetValue (out int arg)
+	{
+		arg = 3;
+		return true;
+	}
+
+	static int TestValue ()
+	{
+		return 4;
+	}
+}
\ No newline at end of file
diff --git a/mcs/tests/test-named-11.cs b/mcs/tests/test-named-11.cs
new file mode 100644
index 00000000000..a01d2883b9c
--- /dev/null
+++ b/mcs/tests/test-named-11.cs
@@ -0,0 +1,13 @@
+// Compiler options: -langversion:7.2
+
+class X
+{
+	public static void Main ()
+	{
+		Test (arg: 1, "");
+	}
+
+	static void Test (int arg, string str)
+	{
+	}
+}
\ No newline at end of file
diff --git a/mcs/tests/test-readonly-02.cs b/mcs/tests/test-readonly-02.cs
new file mode 100644
index 00000000000..231b8cd8fda
--- /dev/null
+++ b/mcs/tests/test-readonly-02.cs
@@ -0,0 +1,27 @@
+// Compiler options: -langversion:latest
+using System;
+
+public delegate ref readonly int D (int x);
+
+class X
+{
+	public static void Main ()
+	{
+
+	}
+
+	Guid g;
+
+	ref readonly Guid TestMethod ()
+	{
+		return ref g;
+	}
+
+	ref readonly Guid TestProp {
+		get {
+			ref readonly var rg = ref g;
+			return ref rg;
+		}
+	}	
+
+}
\ No newline at end of file
diff --git a/mcs/tests/test-readonly-03.cs b/mcs/tests/test-readonly-03.cs
new file mode 100644
index 00000000000..14cb958b41a
--- /dev/null
+++ b/mcs/tests/test-readonly-03.cs
@@ -0,0 +1,16 @@
+// Compiler options: -langversion:latest
+using System;
+
+readonly struct S
+{
+	static S shared = new S ();
+
+	public S (int arg)
+	{
+		this = shared;
+	}
+
+	public static void Main ()
+	{
+	}
+}
\ No newline at end of file
diff --git a/mcs/tests/test-ref-07.cs b/mcs/tests/test-ref-07.cs
new file mode 100644
index 00000000000..4aa16579752
--- /dev/null
+++ b/mcs/tests/test-ref-07.cs
@@ -0,0 +1,30 @@
+// Compiler options: -langversion:latest
+
+public readonly partial ref struct Test
+{
+	public static void Main ()
+	{
+		var m = new Test ();
+		m.Method ();
+	}
+
+	Test Method ()
+	{
+		return new Test ();
+	}
+}
+
+ref struct Second
+{
+	Test field;
+}
+
+public abstract class P
+{
+	public abstract Test Span { get; }
+}
+
+public interface II
+{
+	Test Span { get; }
+}
diff --git a/mcs/tests/test-ref-08.cs b/mcs/tests/test-ref-08.cs
new file mode 100644
index 00000000000..f4ff50f4c5c
--- /dev/null
+++ b/mcs/tests/test-ref-08.cs
@@ -0,0 +1,101 @@
+using System;
+
+namespace ClassLibrary1
+{
+	public class C
+	{
+
+		class B
+		{
+			int v;
+			public ref int this[int index]
+			{
+				get
+				{
+					return ref v;
+				}
+			}
+		}
+
+
+		class Gen<T> where T : struct
+		{
+			T v;
+			public ref T this[int index]
+			{
+				get
+				{
+					return ref v;
+				}
+			}
+		}
+
+		struct Val
+		{
+		}
+
+		class BB
+		{
+			Val v;
+			public ref Val this[int index]
+			{
+				get
+				{
+					return ref v;
+				}
+			}
+		}
+
+		void MM ()
+		{
+			var bbb = new BB();
+			Val v1 = bbb[0];
+			bbb[1] = v1;
+
+			ref Val v2 = ref bbb[2];
+			bbb[2] = v2;
+		}
+
+		static int[] a = new int[1];
+		public static void Main()
+		{
+			var bb = new B();
+			int b = 1;
+			bb[0] = b;
+			a[0] = Add2(ref b, 2);
+
+			var bbb = new BB();
+			bbb[0] = new Val();
+
+			var v = new Val();
+			bbb[1] = v;
+
+			var v2 = bbb[2];
+
+			bbb[3] = v2;
+
+
+			bbb[3] = bbb[2];
+
+
+
+			var ggg = new Gen<Val>();
+			ggg[0] = new Val();
+
+			var g = new Val();
+			ggg[1] = v;
+
+			var g2 = ggg[2];
+
+			ggg[3] = v2;
+
+
+			ggg[3] = ggg[2];
+		}
+
+		public static ref int Add2(ref int a, int b)
+		{
+			return ref a;
+		}
+	}
+}
\ No newline at end of file
diff --git a/mcs/tests/test-ref-09.cs b/mcs/tests/test-ref-09.cs
new file mode 100644
index 00000000000..5d0e89e5c1a
--- /dev/null
+++ b/mcs/tests/test-ref-09.cs
@@ -0,0 +1,12 @@
+struct rigidbody { public float x; }
+
+class Program
+{
+	static rigidbody a;
+	static ref rigidbody property_returning_struct_by_ref => ref a;
+
+	static void Main()
+	{
+		System.Console.WriteLine (property_returning_struct_by_ref.x);
+	}
+}
\ No newline at end of file
diff --git a/mcs/tests/test-ref-10.cs b/mcs/tests/test-ref-10.cs
new file mode 100644
index 00000000000..88e201d3174
--- /dev/null
+++ b/mcs/tests/test-ref-10.cs
@@ -0,0 +1,24 @@
+// Compiler options: -langversion:latest
+
+using System;
+
+ref struct ValueStringBuilder
+{
+	public override string ToString ()
+	{
+		return "aaa";
+	}
+}
+
+
+class X
+{
+	public static int Main ()
+	{
+		var s = new ValueStringBuilder ();
+		if (s.ToString () != "aaa")
+			return 1;
+
+		return 0;
+	}
+}
\ No newline at end of file
diff --git a/mcs/tests/test-tuple-07.cs b/mcs/tests/test-tuple-07.cs
new file mode 100644
index 00000000000..cc7ce5837ce
--- /dev/null
+++ b/mcs/tests/test-tuple-07.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+
+// Parser tests
+
+class ParserTest
+{
+	IEnumerable<(Object vertex, int distance)> Test ()
+	{
+		return null;
+	}
+
+	public static void Main ()
+	{		
+	}
+}
\ No newline at end of file
diff --git a/mcs/tests/test-tuple-09.cs b/mcs/tests/test-tuple-09.cs
new file mode 100644
index 00000000000..3f15cae6cf1
--- /dev/null
+++ b/mcs/tests/test-tuple-09.cs
@@ -0,0 +1,19 @@
+using System;
+
+class TupleDeconstructionDeclaration
+{
+	public static int Main ()
+	{
+		(string s, long l) = GetValues ();
+		(var vs, var vl) = GetValues ();
+		(object o, var vl2) = GetValues ();
+		(string ds, _) = GetValues ();
+
+		return 0;
+	}
+
+	static (string, long) GetValues ()
+	{
+		return ("a", 3);
+	}
+}
\ No newline at end of file
diff --git a/mcs/tests/ver-il-net_4_x.xml b/mcs/tests/ver-il-net_4_x.xml
index c2c98123305..4dbc7042a8a 100644
--- a/mcs/tests/ver-il-net_4_x.xml
+++ b/mcs/tests/ver-il-net_4_x.xml
@@ -14659,6 +14659,9 @@
       <method name="Void Test_22(Boolean)" attrs="129">
         <size>24</size>
       </method>
+      <method name="Void Test_23(System.String)" attrs="129">
+        <size>16</size>
+      </method>
     </type>
   </test>
   <test name="gtest-410.cs">
@@ -52808,6 +52811,19 @@
       </method>
     </type>
   </test>
+  <test name="test-948.cs">
+    <type name="X">
+      <method name="Void Main()" attrs="150">
+        <size>16</size>
+      </method>
+      <method name="Void Foo()" attrs="129">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-95.cs">
     <type name="X">
       <method name="Int32 Main()" attrs="150">
@@ -66893,6 +66909,117 @@
       </method>
     </type>
   </test>
+  <test name="test-async-94.cs">
+    <type name="MyTask`1[T]">
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyTask">
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyTaskMethodBuilder">
+      <method name="MyTaskMethodBuilder Create()" attrs="150">
+        <size>10</size>
+      </method>
+      <method name="MyTask get_Task()" attrs="2182">
+        <size>10</size>
+      </method>
+      <method name="Void SetException(System.Exception)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void SetResult()" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void AwaitOnCompleted[TAwaiter,TStateMachine](TAwaiter ByRef, TStateMachine ByRef)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void AwaitUnsafeOnCompleted[TAwaiter,TStateMachine](TAwaiter ByRef, TStateMachine ByRef)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void Start[TStateMachine](TStateMachine ByRef)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyTaskMethodBuilder`1[T]">
+      <method name="MyTaskMethodBuilder`1[T] Create()" attrs="150">
+        <size>10</size>
+      </method>
+      <method name="MyTask`1[T] get_Task()" attrs="2182">
+        <size>10</size>
+      </method>
+      <method name="Void SetException(System.Exception)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void SetResult(T)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void AwaitOnCompleted[TAwaiter,TStateMachine](TAwaiter ByRef, TStateMachine ByRef)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void AwaitUnsafeOnCompleted[TAwaiter,TStateMachine](TAwaiter ByRef, TStateMachine ByRef)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void Start[TStateMachine](TStateMachine ByRef)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="MyTask Test()" attrs="134">
+        <size>33</size>
+      </method>
+      <method name="MyTask`1[System.Int32] Test2()" attrs="134">
+        <size>33</size>
+      </method>
+      <method name="System.Threading.Tasks.ValueTask`1[System.String] Test3()" attrs="134">
+        <size>33</size>
+      </method>
+      <method name="Void Main()" attrs="150">
+        <size>23</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__async0">
+      <method name="Void MoveNext()" attrs="486">
+        <size>157</size>
+      </method>
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test2&gt;c__async1">
+      <method name="Void MoveNext()" attrs="486">
+        <size>165</size>
+      </method>
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test3&gt;c__async2">
+      <method name="Void MoveNext()" attrs="486">
+        <size>169</size>
+      </method>
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
   <test name="test-cls-00.cs">
     <type name="CLSCLass_6">
       <method name="Void add_Disposed(Delegate)" attrs="2182">
@@ -68527,6 +68654,47 @@
       </method>
     </type>
   </test>
+  <test name="test-default-01.cs">
+    <type name="X">
+      <method name="Void Main()" attrs="150">
+        <size>53</size>
+      </method>
+      <method name="Int32 M1()" attrs="145">
+        <size>10</size>
+      </method>
+      <method name="Void M2()" attrs="145">
+        <size>31</size>
+      </method>
+      <method name="Void M3(Int32)" attrs="145">
+        <size>2</size>
+      </method>
+      <method name="System.Func`1[System.Int32] M4()" attrs="145">
+        <size>38</size>
+      </method>
+      <method name="Int32 &lt;M4&gt;m__0()" attrs="145">
+        <size>9</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-default-02.cs">
+    <type name="C">
+      <method name="Void Main()" attrs="145">
+        <size>36</size>
+      </method>
+      <method name="Void M[T](T, T)" attrs="145">
+        <size>2</size>
+      </method>
+      <method name="Void M2(System.Object[])" attrs="145">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+      <method name="Byte[] Test(S`1[System.Byte])" attrs="145">
+        <size>10</size>
+      </method>
+    </type>
+  </test>
   <test name="test-dictinit-01.cs">
     <type name="Program">
       <method name="Int32 Main()" attrs="145">
@@ -68610,6 +68778,30 @@
       </method>
     </type>
   </test>
+  <test name="test-discards-01.cs">
+    <type name="X">
+      <method name="Void Main()" attrs="150">
+        <size>63</size>
+      </method>
+      <method name="Boolean TryGetValue(Int32 ByRef)" attrs="145">
+        <size>13</size>
+      </method>
+      <method name="Int32 TestValue()" attrs="145">
+        <size>10</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="System.Object &lt;&gt;m__0()" attrs="131">
+        <size>25</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-ex-filter-01.cs">
     <type name="X">
       <method name="Int32 Main()" attrs="150">
@@ -70689,6 +70881,19 @@
       </method>
     </type>
   </test>
+  <test name="test-named-11.cs">
+    <type name="X">
+      <method name="Void Main()" attrs="150">
+        <size>13</size>
+      </method>
+      <method name="Void Test(Int32, System.String)" attrs="145">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-nameof-01.cs">
     <type name="X">
       <method name="Int32 Main()" attrs="150">
@@ -72778,6 +72983,49 @@
       </method>
     </type>
   </test>
+  <test name="test-readonly-02.cs">
+    <type name="D">
+      <method name="Int32&amp; Invoke(Int32)" attrs="454">
+        <size>0</size>
+      </method>
+      <method name="System.IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)" attrs="454">
+        <size>0</size>
+      </method>
+      <method name="Int32&amp; EndInvoke(System.IAsyncResult)" attrs="454">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)" attrs="6278">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void Main()" attrs="150">
+        <size>2</size>
+      </method>
+      <method name="System.Guid&amp; TestMethod()" attrs="129">
+        <size>15</size>
+      </method>
+      <method name="System.Guid&amp; get_TestProp()" attrs="2177">
+        <size>17</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-readonly-03.cs">
+    <type name="S">
+      <method name="Void Main()" attrs="150">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor(Int32)" attrs="6278">
+        <size>13</size>
+      </method>
+      <method name="Void .cctor()" attrs="6289">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
   <test name="test-ref-01.cs">
     <type name="X">
       <method name="Void Main()" attrs="150">
@@ -72906,6 +73154,95 @@
       </method>
     </type>
   </test>
+  <test name="test-ref-07.cs">
+    <type name="Test">
+      <method name="Void Main()" attrs="150">
+        <size>18</size>
+      </method>
+      <method name="Test Method()" attrs="129">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="P">
+      <method name="Test get_Span()" attrs="3526">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()" attrs="6276">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-ref-08.cs">
+    <type name="ClassLibrary1.C">
+      <method name="Void MM()" attrs="129">
+        <size>60</size>
+      </method>
+      <method name="Void Main()" attrs="150">
+        <size>245</size>
+      </method>
+      <method name="Int32&amp; Add2(Int32 ByRef, Int32)" attrs="150">
+        <size>10</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()" attrs="6289">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="ClassLibrary1.C+B">
+      <method name="Int32&amp; get_Item(Int32)" attrs="2182">
+        <size>15</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ClassLibrary1.C+Gen`1[T]">
+      <method name="T&amp; get_Item(Int32)" attrs="2182">
+        <size>15</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ClassLibrary1.C+BB">
+      <method name="Val&amp; get_Item(Int32)" attrs="2182">
+        <size>15</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-ref-09.cs">
+    <type name="Program">
+      <method name="rigidbody&amp; get_property_returning_struct_by_ref()" attrs="2193">
+        <size>13</size>
+      </method>
+      <method name="Void Main()" attrs="145">
+        <size>17</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-ref-10.cs">
+    <type name="ValueStringBuilder">
+      <method name="System.String ToString()" attrs="198">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Int32 Main()" attrs="150">
+        <size>47</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-static-using-01.cs">
     <type name="A.B.X">
       <method name="Int32 Test()" attrs="150">
@@ -73374,6 +73711,56 @@
       </method>
     </type>
   </test>
+  <test name="test-tuple-07.cs">
+    <type name="ParserTest">
+      <method name="System.Collections.Generic.IEnumerable`1[System.ValueTuple`2[System.Object,System.Int32]] Test()" attrs="129">
+        <size>10</size>
+      </method>
+      <method name="Void Main()" attrs="150">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-tuple-08.cs">
+    <type name="X">
+      <method name="Void Main()" attrs="150">
+        <size>19</size>
+      </method>
+      <method name="System.Threading.Tasks.Task Test()" attrs="129">
+        <size>41</size>
+      </method>
+      <method name="System.Threading.Tasks.Task`1[System.ValueTuple`2[System.Int32,System.Int32]] Waiting()" attrs="129">
+        <size>21</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__async0">
+      <method name="Void MoveNext()" attrs="486">
+        <size>212</size>
+      </method>
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-tuple-09.cs">
+    <type name="TupleDeconstructionDeclaration">
+      <method name="Int32 Main()" attrs="150">
+        <size>99</size>
+      </method>
+      <method name="System.ValueTuple`2[System.String,System.Int64] GetValues()" attrs="145">
+        <size>21</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-var-01.cs">
     <type name="Test">
       <method name="Int32 Main()" attrs="150">

debug log:

solving 41dfed7df7 ...
found 41dfed7df7 in https://yhetil.org/guix-patches/iMoekcfwEfCp2uLTWzr-P2_OVyzTF-420AoXae5W6GK2kP5NvueOXBRzAIJBRN2U0c7Sl0HUzUy8eKWNuTs2uaiapCUkJUo5Ng9ahfsfGZ8=@proton.me/

applying [1/1] https://yhetil.org/guix-patches/iMoekcfwEfCp2uLTWzr-P2_OVyzTF-420AoXae5W6GK2kP5NvueOXBRzAIJBRN2U0c7Sl0HUzUy8eKWNuTs2uaiapCUkJUo5Ng9ahfsfGZ8=@proton.me/
diff --git a/gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch b/gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch
new file mode 100644
index 0000000000..41dfed7df7

1:31: space before tab in indent.
 		{
1:32: space before tab in indent.
 			Evaluator.Run ("public class TestClass { private TestEnum _te; public string Get() { return _te.ToString(); } } public enum TestEnum { First, Second }");
1:33: space before tab in indent.
 		}
1:46: space before tab in indent.
 	}
1:148: trailing whitespace.
+	}	
Checking patch gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch...
Applied patch gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch cleanly.
warning: squelched 934 whitespace errors
warning: 939 lines add whitespace errors.

index at:
100644 41dfed7df7fbc05a120dce00892a62f81c97a325	gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).