-
Notifications
You must be signed in to change notification settings - Fork 735
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
Integrate function semtype into jBallerina type engine #42622
base: nutcracker
Are you sure you want to change the base?
Integrate function semtype into jBallerina type engine #42622
Conversation
* Make Env part of the type * Make modification of param type list explicit
8f507dd
to
e8ae63a
Compare
586c49d
to
5c5e48d
Compare
When we have a cyclic intersection we first create the member types then create the intersection type. Only after this we fill in the member types, and we have no way of detecting this has happen and reset the semtype calculation.
5c5e48d
to
95bee5d
Compare
@@ -59,6 +59,15 @@ private static boolean functionPathIsEmpty(Context cx, SemType params, Conjuncti | |||
FunctionAtomicType t = cx.functionAtomType(neg.atom); | |||
SemType t0 = t.paramType(); | |||
SemType t1 = t.retType(); | |||
if (t.isGeneric()) { | |||
// TODO: this is not correct. Ideally we should either resolve generic function calls to concrete |
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.
Created #42700 to track this
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
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.
LGTM. Added a minor suggestion.
return defineInner(env, atomicType); | ||
} | ||
|
||
private SemType defineInner(Env env, FunctionAtomicType atomicType) { |
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.
If I am not mistaken we are using xxxInner()
methods to indicate that the return semtype is a cellInner()
value. i.e. return semtype is a ty
inside a cell. To avoid any possible confusion, how about calling this defineInternal()
?
private SemType defineInner(Env env, FunctionAtomicType atomicType) { | |
private SemType defineInternal(Env env, FunctionAtomicType atomicType) { |
Purpose
$subject
Depends on #42511
Fixes #42512
Approach
Samples
Remarks
Check List