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

Add global prop to context #448

Closed
wants to merge 1 commit into from
Closed

Conversation

Joeoh
Copy link
Contributor

@Joeoh Joeoh commented May 29, 2020

Changes to mark context as global when created

@Joeoh Joeoh requested a review from hs-lsong May 29, 2020 18:46
@Joeoh Joeoh mentioned this pull request May 29, 2020
@hs-lsong
Copy link
Collaborator

Since global context has no parent, is this redundant to checking parent == null?

Copy link
Contributor

@boulter boulter left a comment

Choose a reason for hiding this comment

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

Could you add a test?

this(null, null, null, false);
}

public Context(boolean global) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this constructor necessary? I think you could just use one of the others and pass in nulls. I find it confusing when a method with one parameter could be take two types of arguments.

@Joeoh
Copy link
Contributor Author

Joeoh commented Jun 2, 2020

Going to close this out and just check the parent's parent to determine global instead here: #449

@Joeoh Joeoh closed this Jun 2, 2020
@Joeoh Joeoh deleted the global-context-mark-global branch June 2, 2020 12:31
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