Skip to content

Resolve conflicts of var-properties with different types #338

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

trilis
Copy link
Contributor

@trilis trilis commented Jul 23, 2020

No description provided.

Copy link
Contributor

@Schahen Schahen left a comment

Choose a reason for hiding this comment

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

Let's discuss and move forward. I'm totally pro merging this and my goal for today is to move forward with all PR accumulated throughout previous wee as fast as possible.

@trilis trilis linked an issue Aug 4, 2020 that may be closed by this pull request
Copy link
Contributor

@Schahen Schahen left a comment

Choose a reason for hiding this comment

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

Still requesting changes - it's getting better but still some work to do before ending up in master )


val propertiesInImmediateParents = properties.filter { first ->
properties.none { second ->
inheritanceContext.isDescendant(second.ownerModel, first.ownerModel)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should collect actual parent instead collecting all parents and then filtering out this way ) (check out ModelContext::getParents)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What about this case?

interface A {
  x: number
}

interface B : A {
}

interface C : B {
  x: number
}

I still want to get x from A in this case, that's why I can't use something like ModelContext::getParents. So I believe I'm right in this place -- the name can be misleading though, can you suggest what change it to?

@trilis trilis requested a review from Schahen August 5, 2020 03:15
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.

Narrowed down property causes compilation failure
2 participants