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

DllImport not detected when using additional attribute #574

Closed
theimowski opened this issue Nov 27, 2019 · 0 comments
Closed

DllImport not detected when using additional attribute #574

theimowski opened this issue Nov 27, 2019 · 0 comments

Comments

@theimowski
Copy link
Member

Issue created from fantomas-ui

When adding MarshalAs attribute to denote marshalling for return value, Fantomas fails to recognise that there's a DllImport above

Code

[<DllImport("userenv.dll", SetLastError = true)>]
[<MarshalAs(UnmanagedType.Bool)>]
extern bool DestroyEnvironmentBlock(IntPtr lpEnvironment)

Result

[<DllImport("userenv.dll", SetLastError = true)>]
[<MarshalAs(UnmanagedType.Bool)>]
let DestroyEnvironmentBlock lpEnvironment: IntPtr: bool = failwith "extern was not given a DllImport attribute"

Options

Fantomas 3.0.0

Name Value
IndentOnTryWith false
IndentSpaceNum 4
KeepNewlineAfter false
PageWidth 120
ReorderOpenDeclaration false
SemicolonAtEndOfLine false
SpaceAfterComma true
SpaceAfterSemicolon true
SpaceAroundDelimiter true
SpaceBeforeArgument true
SpaceBeforeColon false
StrictMode false
theimowski added a commit to theimowski/fantomas that referenced this issue Nov 28, 2019
@nojaf nojaf closed this as completed in af27ece Nov 28, 2019
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

No branches or pull requests

1 participant