-
Notifications
You must be signed in to change notification settings - Fork 842
[RFC FS-1017] Allow all inferrable SRTP constraints to be written in signatures #1278
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
Conversation
|
RFC PR at fsharp/fslang-design#103. |
src/fsharp/TypeChecker.fs
Outdated
| let tys,tpenv = List.mapFold (TcTypeAndRecover cenv newOk CheckCxs ItemOccurence.UseInType env) tpenv synTypes | ||
| #endif | ||
| let tys = List.map mkTyparTy tps | ||
| //let tys = List.map mkTyparTy tps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should be deleted.
|
other than commented out code looks fine to me. |
|
I've updated this PR with a fix for #1306 |
|
Transient AppVeyor failure (unrelated to PR). AppVeyor have changed their hardware recenty which may explain a change in test timings for non-deterministic tests. There is either a bug lurking or an unstable test |
This implements RFC FS--1017. A niggling language issue reported by @drvink quite a long time ago.
Basically it allows statically resolved member constraints to include a type - rather than a type parameter - in the list of items by which the constraint can be solved.
This both fixes a "hole" where soome types could be inferred and printed, but not written in signatures, and also increases the utility of the statically-resolved-type-parameter (SRTP) mechanism.
The implementation is very straight-forward.