SharpLab icon indicating copy to clipboard operation
SharpLab copied to clipboard

roles/extensions branch is not working

Open aetos382 opened this issue 1 year ago • 5 comments

When I select the Roles/Extensions branch, I get a message that says connection lost, reconnecting... and the screen goes grey and doesn't come back.

When I look at the browser console, a 404 is returned for requests to the following URL. Could this be the cause?

https://slpublic.azureedge.net/cache/main/sl-b-dotnet-features-roles/a98330204b5d6e806f3b69ff241752d9d1c9ddc6c4e65c17f203dd3c69c92be1.json

aetos382 avatar Jun 03 '24 07:06 aetos382

Thanks for reporting! This one might be a bit tricky -- I'll take a look when I have a moment, but can't promise it will be soon.

ashmind avatar Jun 05 '24 09:06 ashmind

I'm dying to know if this is valid C# 13:


using System;

Console.WriteLine(15.inch + 2.cm * 15.mm);

implicit extension TestUnits for int {
    public double mm => (double) this;
    public double inch => (double) this * (double) 25.4;
    public double cm => (double) this * (double) 10;
}

Absolute game changer for fans of units.

Ciantic avatar Jun 05 '24 22:06 Ciantic

any progress on this?

BarionLP avatar Jun 14 '24 09:06 BarionLP

Want extension... 😞

wherewhere avatar Jun 26 '24 10:06 wherewhere

+1 interest feedback.

ceztko avatar Jun 26 '24 10:06 ceztko

Since the extensions have been merged into the main branch, I will close this issue, hoping that we will be able to try them on the main branch in the future.

aetos382 avatar Apr 11 '25 03:04 aetos382

But main branch is also broken...

wherewhere avatar Apr 11 '25 04:04 wherewhere

That is sad, but it is a separate issue. Leaving this issue open will not help to resolve the problem.

aetos382 avatar Apr 14 '25 01:04 aetos382

That is sad, but it is a separate issue. Leaving this issue open will not help to resolve the problem.

I think that only the maintainer should make such considerations. You opened the issue and the problem you verified is still present, without the maintainer telling you if e.g. a problem was solved and another problem emerged. There is currently no reason to close it.

ceztko avatar Apr 14 '25 08:04 ceztko

@Cianti

I'm dying to know if this is valid C# 13:

using System;

Console.WriteLine(15.inch + 2.cm * 15.mm);

implicit extension TestUnits for int { public double mm => (double) this; public double inch => (double) this * (double) 25.4; public double cm => (double) this * (double) 10; }

Absolute game changer for fans of units.

FYI: This compiles!

var val = 100;

Console.WriteLine(val.mm); // Outputs: 1

public static class UnitExtensions
{
    extension(int val)
    {
        public int mm => 1;
    }
}

TwentyFourMinutes avatar Apr 17 '25 06:04 TwentyFourMinutes