Skip to content

[WIP][Sema][stdlib] Remove _getBuiltinLogicValue #21285

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

Closed
wants to merge 1 commit into from

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Dec 13, 2018

This removes the _getBuiltinLogicValue() intrinsic function from Bool and instead accesses the Bool._value property directly. Currently the property is internal, but I noticed that the integer and floating point types backing value is public, so I thought it might be better to access the property than keep this function in the stdlib API.

I labeled this WIP because there are at least 5 known tests failing that I can't seem to reason about:

  • SILGen/opaque_ownership.swift
  • refactoring/CollaseNestedIf
  • refactoring/ConvertToTernaryExpr
  • refactoring/ExpandTernaryExpr
  • stmt/statements.swift

One thing I've noticed in the bottom 4 is that any boolean stmt condition is cutting off the last expression in refactoring/fixits. E.g. instead of where 1 != 100, the fixit suggests: where 1 !=. Which is slightly confusing as my change doesn't touch refactoring/fixits. 😕

cc: @slavapestov and some standard library folk: @airspeedswift

update api-digester

add implicit comment
@Azoy Azoy closed this Dec 20, 2018
@Azoy Azoy deleted the remove-_getBuiltinLogicValue branch December 23, 2018 21:48
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.

1 participant