unoplatform / Uno.CodeGen

A set of source generators for equality, immutability, ...
Other
90 stars 11 forks source link

IList's `Default` doesn't use the default #127

Open ndrwrbgs opened 4 years ago

ndrwrbgs commented 4 years ago

I'm submitting a...

Bug report (I searched for similar issues and did not find one)

Current behavior

        [EqualityComparerOptions(CollectionMode = CollectionComparerMode.Default)]
        public IList<string> InOrderRules { get; }

vs.

        [EqualityComparerOptions]
        public IList<string> InOrderRules { get; }

do not generate the same code (e.g. 'Default' is not the default)

Expected behavior

They use SortedCollectionEqualityComparer for both

Minimal reproduction of the problem with instructions

I can make a project if you wish, but I'm imagining for this issue it's not necessary ;) Problem is that Default = 0 and Unsorted = 0 on the enum.

Environment

Nuget Package: Uno.CodeGen

Package Version(s): 1.32.0

Affected platform(s):
- [ ] iOS
- [ ] Android
- [ ] WebAssembly
- [x] Windows
- [ ] Build tasks

Visual Studio
- [ ] 2017 (version: )
- [ ] 2017 Preview (version: )
- [ ] for Mac (version: )
- [x] 2019

Relevant plugins
- [ ] Resharper (version: )