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

Do not write a | if it's a single case DU with a visibility modifier. #948

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

deviousasti
Copy link
Member

Fixes #889

@deviousasti
Copy link
Member Author

Test failing is this:

A total of 1 test files matched the specified pattern.
  X issue 382 [40ms]
  Error Message:
     Expected string length 201 but was 199. Strings differ at index 184.
  Expected: "...\n\n#if FABLE_COMPILER\n    private\n#endif\n    | Code of string\n"
  But was:  "...\n\n#if FABLE_COMPILER\n    private\n#endif\n    Code of string\n"

Should the test be fixed?

@nojaf
Copy link
Contributor

nojaf commented Jul 6, 2020

Hey @deviousasti, sorry for the late response, it is ok to update the test in this case.

@deviousasti deviousasti force-pushed the master branch 2 times, most recently from c7d9077 to b12df12 Compare July 6, 2020 20:02
Copy link
Contributor

@nojaf nojaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please cover the additional trivia scenarios as well.
Let me know if you need a hint ;)

src/Fantomas.Tests/CompilerDirectivesTests.fs Outdated Show resolved Hide resolved
Refactor testing for trivia before union fields. Add test to check single DU case.
@nojaf nojaf merged commit 28ed449 into fsprojects:master Jul 7, 2020
@nojaf
Copy link
Contributor

nojaf commented Jul 7, 2020

Thanks!

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

Successfully merging this pull request may close these issues.

Leading | in single-case union type with access modifier
2 participants