-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Internal improvements to subtyping and substitution #146
Internal improvements to subtyping and substitution #146
Conversation
- Change subtyping to use single state structure (rather than generic structures) - Change substitution to use single immutable object for arguments - Changes to accomodate the above - `* extends * ? `, `infer U` and distributive extends - Add `never` #136 + or folding - Other WIP stuff
Wondering whether to make events flatten and reuse them more (instead of state and
Also on the topic of events: should have an option to record all set and variable events for usage in extra diagnostics |
Still to do
Done
|
For mapped types: could
However |
- Change Property::Dependent to Property::ConditionallyExists and fix the reading on conditional spread - Template literal subtyping - Prototype checking during calling new function - Add back apply_events_unknown (still a little bit broken) + debug_effects - Fix internal function could throw call
- Object.keys etc - Use of variables after unknown loops now uses closure semantics - Subtyping supports type key things - Calling returns application result - More unknown conditional application things (don't think it works ATM) - Clippy fixes - Move broken :(
- Tests broke because notify tried to print a getter
Managed to squeeze some new features in here, bringing the passing tests to 235! |
- Throw event wasn't being removed :( so added quick fix
This is weird. But we move error:
┌─ demo.ts:414:7
│
410 │ function getA<T extends { a: strinthread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/source-map-0.15.0/src/filesystem.rs:141:24:
index out of bounds: the len is 2 but the index is 18446744073709551615
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
g }>(p: T) {
│ ---- Parameter has type T
·
414 │ getA({ a: 2 })
│ |
* extends * ?
,infer U
and distributive extendsnever
never
type lookup - "Cannot find type never" #136 + or foldingget_fact_by_type
into the only place it is used:get_property_unbound
this
object creation as an event (move logic internal to function calling)Func.prototype.x
thing