Skip to content

Use numericCast() to get the correct type when creating a dispatch_bl… #444

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

Conversation

ktopley-apple
Copy link
Contributor

…ock_flags_t.

rdar://problem/44957560

@ktopley-apple
Copy link
Contributor Author

@swift-ci please test

1 similar comment
@ktopley-apple
Copy link
Contributor Author

@swift-ci please test

@gottesmm
Copy link
Contributor

gottesmm commented Feb 8, 2019

@ktopley-apple swift-ci is down now. Check ci.swift.org.

@jrose-apple
Copy link
Contributor

*sigh* Sure, I guess.

@ktopley-apple
Copy link
Contributor Author

@ktopley-apple swift-ci is down now. Check ci.swift.org.

Thanks. I was wondering what the delay was.

@ktopley-apple
Copy link
Contributor Author

sigh Sure, I guess.

I wish there were a better way. So far, we haven't been able to find one.

@ktopley-apple
Copy link
Contributor Author

@swift-ci please test

@shahmishal
Copy link
Member

@ktopley-apple sorry CI is offline right now.

@ktopley-apple
Copy link
Contributor Author

@ktopley-apple sorry CI is offline right now.

@ktopley-apple sorry CI is offline right now.

It went down again? Any ETA for return?

@shahmishal
Copy link
Member

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Oh, thanks for cleaning this up! I learnt about numericCast afterwards. This is much nicer :-)

@shahmishal
Copy link
Member

It's back online

@ktopley-apple ktopley-apple merged commit ff3bf51 into swiftlang:master Feb 11, 2019
@compnerd
Copy link
Member

compnerd commented Feb 12, 2019

Hmm, actually, this is interesting, I am seeing a failure with this change:
https://dev.azure.com/compnerd/windows-swift/_build/results?buildId=303

swift-corelibs-libdispatch/src/swift/Block.swift:43:39: error: global function 'numericCast' requires that 'dispatch_block_flags_t' conform to 'BinaryInteger'
                let flags: dispatch_block_flags_t = numericCast(flags.rawValue)
                                                     ^

@compnerd
Copy link
Member

I really don't understand how this is broken. flags (aka dispatch_flags_t) is a fixed sized enumeration. The rawValue is going to be UInt32 on Windows, which should conform to BinaryInteger ...

@ktopley-apple
Copy link
Contributor Author

ktopley-apple commented Feb 12, 2019 via email

@compnerd
Copy link
Member

Unfortunately, Swift CI doesn't build for Windows just yet. I've been working on the Foundation bring up for Windows recently, so I am definitely starting to exercise the paths that were not being fully exercised previously.

@compnerd
Copy link
Member

I think I get why this fails on Windows, #445 should fix that

rokhinip pushed a commit that referenced this pull request Nov 5, 2021
…spatch-block-flags

Use numericCast() to get the correct type when creating a dispatch_bl…

Signed-off-by: Kim Topley <[email protected]>
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.

5 participants