-
Notifications
You must be signed in to change notification settings - Fork 1
Newtype for decimal fails to build #5
Copy link
Copy link
Open
Description
This fails to build
using newtype;
Id foo = new(5);
Console.WriteLine(foo);
[newtype<decimal>]
public readonly partial struct Id;with the following message
/home/lasse-edslev/csharp/Playground/NewType.Generator/newtype.generator.AliasGenerator/Id.g.cs(121,56): error CS0191: A readonly field cannot be assigned to (except in a constructor or init-only setter of the type in which the field is defined or a variable initializer) [/home/lasse-edslev/csharp/Playground/Playground.csproj]
/home/lasse-edslev/csharp/Playground/NewType.Generator/newtype.generator.AliasGenerator/Id.g.cs(124,56): error CS0191: A readonly field cannot be assigned to (except in a constructor or init-only setter of the type in which the field is defined or a variable initializer) [/home/lasse-edslev/csharp/Playground/Playground.csproj]It works if I use double
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels