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

Class Id #54

Closed
kdy1 opened this issue Jun 22, 2021 · 1 comment
Closed

Class Id #54

kdy1 opened this issue Jun 22, 2021 · 1 comment

Comments

@kdy1
Copy link
Member

kdy1 commented Jun 22, 2021

derivedClassTransitivity.ts:

// subclassing is not transitive when you can remove required parameters and add optional parameters

class C {
    foo(x: number) { }
}

class D extends C {
    foo() { } // ok to drop parameters
}

class E extends D {
    foo(x?: string) { } // ok to add optional parameters
}

var c: C;
var d: D;
var e: E;
c = e;
var r = c.foo(1);
var r2 = e.foo('');

We need logic to compare private properties.

We should store the id of declaring class in properties, because properties from multiple class can be mixed.

@kdy1
Copy link
Member Author

kdy1 commented Jun 23, 2021

Resolved issue by comparing spans.

@kdy1 kdy1 closed this as completed Jun 23, 2021
@kdy1 kdy1 added this to the 1. Correctness milestone Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant