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

Extending Object leads to confusion #323

Closed
Schahen opened this issue Jul 3, 2020 · 1 comment
Closed

Extending Object leads to confusion #323

Schahen opened this issue Jul 3, 2020 · 1 comment
Labels
ir-target causes problems with IR compilation
Milestone

Comments

@Schahen
Copy link
Contributor

Schahen commented Jul 3, 2020

Following code:

declare class Some extends Object {

}
import tsstdlib.Object

external open class Some : Object {
    override fun hasOwnProperty(v: String): Boolean
    override fun hasOwnProperty(v: Number): Boolean
    override fun hasOwnProperty(v: Any): Boolean
    override fun propertyIsEnumerable(v: String): Boolean
    override fun propertyIsEnumerable(v: Number): Boolean
    override fun propertyIsEnumerable(v: Any): Boolean
}

Which is wrong on many levels - we are not supposed to extend the typescript Object, we are explicitly to extend Object (Any in our case) at all .

@Schahen Schahen added the ir-target causes problems with IR compilation label Jul 3, 2020
@Schahen Schahen added this to the 0.5.5 milestone Jul 3, 2020
@Schahen
Copy link
Contributor Author

Schahen commented Jul 3, 2020

@Schahen Schahen closed this as completed in 8085959 Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ir-target causes problems with IR compilation
Projects
None yet
Development

No branches or pull requests

1 participant