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

Warning for using Unduckable classes as return types #139

Open
eyhlin opened this issue Feb 23, 2016 · 0 comments
Open

Warning for using Unduckable classes as return types #139

eyhlin opened this issue Feb 23, 2016 · 0 comments
Milestone

Comments

@eyhlin
Copy link
Contributor

eyhlin commented Feb 23, 2016

Classes without a 0 argument constructor or a default constructor are unduckable.
Public procedures that return such classes will be generated as blocked procedures, but the user may be unaware of it.
An improvement will be to let the compiler to provide warning messages when such public procedure are declared.

Example code:

package test;
public class BooleanC {
    private boolean v;
    public BooleanC(boolean v) { this.v = v; }
    public boolean value() { return v; }
}
package test;
@Capsule 
public class Test{
    public Boolean proc(){ return new BooleanC(true);}
}

The public procedure proc() in Test will be a blocking procedure.

@dwtj dwtj added this to the v0.2.3 milestone Mar 29, 2017
@jlmaddox jlmaddox modified the milestones: v0.2.3, v0.3 Jan 24, 2018
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

3 participants