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

Add static check for capsule cores being passed out of capsule cores #172

Open
dwtj opened this issue Feb 18, 2017 · 2 comments
Open

Add static check for capsule cores being passed out of capsule cores #172

dwtj opened this issue Feb 18, 2017 · 2 comments

Comments

@dwtj
Copy link
Collaborator

dwtj commented Feb 18, 2017

It is an error for a method of a capsule core:

  • pass or return an instance of a capsule core (esp. itself) to another method or procedure.
  • pass or return an instance of a capsule to another method or to

Unfortunately, method calls are done at the expression-level, and all expressions are opaque to a fully-portable annotation processor. Therefore, implementing this feature by inspecting the AST of all capsule cores cannot be done in a portable way.

We could check all methods being compiled to make sure that none of them are passing/returning a core type or a capsule type. (I think that it is not too restrictive to assume that pure Java code should not be allowed to pass/return capsule and capsule core types.)

@ddmills
Copy link
Collaborator

ddmills commented Feb 19, 2017

On a side note - renaming Template to Core is a great improvement! 👍

@dwtj
Copy link
Collaborator Author

dwtj commented Feb 20, 2017

Concerning "Template" -> "Core": Thanks, I agree.

We are still trying to think about a better name for what were signature templates and were renamed to signature cores. (We renamed signature templates because it was way easier to do the find-and-replace on both capsules and signatures). Core doesn't make as much sense to me for signatures, since they don't really hold anything. In some sense, they describe the "outside edge" of a capsule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants