microsoft / microsoft/Power-Fx

FormulaType.Build doesn't return optionset

Open
#2,342 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.4k
Forks
358
Avg merge
10h 34m
Merged PRs (30d)
3

Description

FormulaType.Build maps OptionSet --> RecordType.
This loses the OS type information.

https://github.com/microsoft/Power-Fx/blob/4b650d96dd12229edba82cbc1976d71be4791e8b/src/libraries/Microsoft.PowerFx.Core/Public/Types/FormulaType.cs#L170

It should treat as an option set.

Related - builtin enums (like Color) get treated as an unsupported type.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/libraries/Microsoft.PowerFx.Core/Public/Types/FormulaType.cs around line 170 and inspect how FormulaType.Build maps OptionSet and builtin enums. Verify the current behavior and identify the existing type representations used for option sets and enums. Done means OptionSet retains its option-set type information and builtin enums such as Color are no longer treated as unsupported types.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.