Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 9 Preview 2 #88

Open
ufcpp opened this issue Mar 13, 2024 · 5 comments
Open

.NET 9 Preview 2 #88

ufcpp opened this issue Mar 13, 2024 · 5 comments

Comments

@ufcpp
Copy link
Collaborator

ufcpp commented Mar 13, 2024

配信URL: https://www.youtube.com/watch?v=Bzvlkj8-Ms8

core 9217 差分がわかりにくいと怒られ中。
API Diff: core 9220

まあでもそんなに差分なく。
#85 の続きやると思う。

https://twitter.com/ufcpp/status/1767785556992487600 インターセプターの相対パス対応は入ってた。

@ufcpp-live
Copy link
Owner

「左から順に」の保証のためにすごい量の stloc, ldloc が入る。

image

@ufcpp-live
Copy link
Owner

// これも可能性として将来できるようになるかもしれない。
Action<ref int> a = ref x => { };

@ufcpp-live
Copy link
Owner

A<in int> a; // この in は ref readonly の in。

delegate void A<in T>(T x); // この in は反変の in。

@ufcpp-live
Copy link
Owner

M(new { Name = "" }, (ref var x) => { }); // 匿名型 ref 引数書く手段今までなかった。
M(new { Name = "" }, (ref x) => { }); // 今後こう書けるはず。

static void M<T>(T x, RefAction<T> a) { }

delegate void RefAction<T>(ref T arg);

@ufcpp-live
Copy link
Owner

using System.Collections;

MyLongLongNameClaaaaaaaaaaaas x = new();

// ここに MyLongLongNameClaaaaaaaaaaaas 書きたくなああああああああああい。
M<int, MyLongLongNameClaaaaaaaaaaaas>(x);
M<string, MyLongLongNameClaaaaaaaaaaaas>(x);

// こう書かせて。
M<int, _>(x);
M<string, _>(x);

static void M<T, TE>(TE x)
    where TE : IEnumerable<T>
{
}

class MyLongLongNameClaaaaaaaaaaaas
    : IEnumerable<int>,
    IEnumerable<string>
{
    public IEnumerator<int> GetEnumerator()
    {
        throw new NotImplementedException();
    }

    IEnumerator IEnumerable.GetEnumerator()
    {
        throw new NotImplementedException();
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants