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

define Dsl as public #2706

Merged
merged 3 commits into from Apr 20, 2022
Merged

define Dsl as public #2706

merged 3 commits into from Apr 20, 2022

Conversation

i-walker
Copy link
Member

@i-walker i-walker commented Apr 20, 2022

fixes when expression with Resource:
currently

when(val x: Resource<Int> = myResource()) {
  is Bind<*,*> -> ...
  is Allocate -> ...
  is Defer -> ...
  is Dsl -> ... // error bc this is internal
  else -> ... // only work around
}

after this PR, the when expression is exhaustive and there is no need to use else:

when(val x: Resource<Int> = myResource()) {
  is Bind<*,*> -> ...
  is Allocate -> ...
  is Defer -> ...
  is Dsl -> 
}

@i-walker i-walker merged commit ed24185 into main Apr 20, 2022
@i-walker i-walker deleted the is-public-dsl branch April 20, 2022 13:51
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.

None yet

3 participants