Skip to content

Swift: Fix the Windows build #1675

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

Merged
merged 1 commit into from
Aug 18, 2020

Conversation

compnerd
Copy link
Member

The implicit conversion from nullptr_t to bool is not permitted on Windows.

lldb\source\Plugins\Language\Swift\SwiftUnsafeTypes.cpp(316,12): error: cannot initialize return object of type 'bool' with an rvalue of type 'nullptr_t'
    return nullptr;
           ^~~~~~~

Explicit return a false instead.

The implicit conversion from `nullptr_t` to `bool` is not permitted on Windows.

```
lldb\source\Plugins\Language\Swift\SwiftUnsafeTypes.cpp(316,12): error: cannot initialize return object of type 'bool' with an rvalue of type 'nullptr_t'
    return nullptr;
           ^~~~~~~
```

Explicit return a `false` instead.
@compnerd
Copy link
Member Author

@compnerd compnerd merged commit 4314ffc into swift/master-rebranch Aug 18, 2020
@compnerd compnerd deleted the compnerd-return-type-mismatch branch August 18, 2020 20:44
@adrian-prantl
Copy link

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.

3 participants