-
-
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
Improvements to properties + intrinsic types #157
Conversation
- Replace `todo!` under /synthesis for fixes or unimplemented error
- As well as `has` and `delete` operations
- Added Object.defineProperty & Object.getOwnPropertyDescriptor - Added sorting for properties - Changed undefined and null types
259 🎉 Going to remove some WIP things (operator checks, failing events, Before merging
|
- Added Not type + disjoint calculation - Improvements and fixes to mapped lookup - Added non null assertion operator (currently only works on conditionals) - Merged SpecialObject::ClassConstructor into regular SpecialObject::function - Added `name` field to function (+ the edge cases) - Add stats collector & `chronometer` to CLI
269 🎉 failures:
specification::collections::array_map
specification::forward_inference::computed_generics_from_collection
specification::staging::calling_type::array_slice_matching_pattern
specification::staging::calling_type::properties_on_big_or
specification::staging::calling_type::regexp_patterns
specification::staging::exceptions_and_try_catch_finally::throw_through_internal_callback
specification::staging::extras::exclusive
specification::staging::mapped_types::as_rewrite
specification::staging::mapped_types::negated_optionality
specification::staging::mapped_types::negated_readonly
specification::staging::mapped_types::optional
specification::staging::mapped_types::specialisation
test result: FAILED. 269 passed; 12 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.05s Hopefully can fix |
For mapped types: the last thing to fix is subtyping based on the mapped type being on the left. The problem to solve is indexing a type based on a type key. This sort of works ATM for For more complex types: There exists Aside: this is duplicate of lookup generics get_key_on...? Will come back to this maybe with default generics, or covariant lookup. Ahh its all really complicated and making this PR take a long time. But when it is done :chefskiss: Once that works then will have the proper foundations for |
Getting there on mapped types checking (access is 90% done). The real problem is indexing the RHS type (right_ty) with a mapped generic. Lots of complex behaviour there which isn't easily implemented by my general process which is just to start on it and find out. But as it turns out there have been a few problems to my initial attempts:
Need to break the pen and paper for this one 🤔
|
- Fixed some subtyping logic for the last part of mapped types - Fixed some constant functions for Object.defineProperty - Rearranged some of the internal structures - Changed the way function calling diagnostics flows through functions - Changed the way `this` is handled by getters and setters
…er-improvements-036
- Fix class generics being leaked - Rearranged to keep generics in their own environment - Moved suggestions to be in a label, added standalone test and suggestions for imports - Change `exports` to use internal `Map` structure
- Add proxies (get, set and subtyping) - Remove definitions.rs and reusing hoisting - Change stages (allows recursive aliases) - Interface extends on own type - Structure generic has own type - Remove external maps for the above two - Split Setter and property initialisation - More
- Class type properties being overridden - BasedOnKey right key and filter separation
- Clippy fixes - Fixes to usages of array push - Class object creation with closures
- Fix to perf action - staging -> specification - temp fix for list (hmm)
- Hopeful fix for split in perf&size - Change spaces to tabs in specification
300 passing 🎉
Replace
todo!
under /synthesis for fixes or unimplemented error (for Add fuzz targetchecker/fuzz/check_project_naive
#152)Under option (
true
by default): iffor (let i = 0; ...)
or similar where the initialiser is number like. Assumei
has constraint of number (assigning to any other type is not an advisable pattern). Assuming this constraint would skip work that will be done when Inferred generic (poly type) constraints #35 is added!Added TSC intrinsic string types
TSC
Uppercase
,Lowercase
intrinsic string typesAdded TSC
NoInfer
Ezno
CaseInsenstive
Added some WIP Ezno intrinsic number types
Added some WIP
Not
type andExclusive
typeAdded new slice subtyping mechanism
Have got the mapped property key of mapped types partially working.
GenericChain::Mapped
Have got
delete
checking inpop
synthesis, so removing for nowin
is handled a bit better across functionsUnderstanding break works
SetVariables
where it is in the scope up during applicationDelete as effect
Object.defineProperty
andObject.getOwnPropertyDescriptor
(constant functions)PropertyValue::Configured
a.push
but oh wellSorting for numerical properties
Sorting for later assignments (removed old weird
.reverse
thing)Proxy
get
andset
forProxy
Proxy
(probably doesn't work in more general cases)Added
Object.assign
Added
configurable
checks (change + delete)Array.prototype.map
Register as effect
Merge definition hoisting into regular hoisting
Cyclic alias (+ improved cycle detection and checking here)