Skip to content

Resolve conflicts of var-properties with different types#338

Open
trilis wants to merge 8 commits into
masterfrom
var-to-val
Open

Resolve conflicts of var-properties with different types#338
trilis wants to merge 8 commits into
masterfrom
var-to-val

Conversation

@trilis

@trilis trilis commented Jul 23, 2020

Copy link
Copy Markdown
Contributor

No description provided.

@Schahen Schahen left a comment

Copy link
Copy Markdown
Contributor

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

@Schahen Schahen left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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