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

Conditional checking in defaults and add bodies #87

Open
pbroadbery opened this issue Oct 23, 2013 · 1 comment · Fixed by #90
Open

Conditional checking in defaults and add bodies #87

pbroadbery opened this issue Oct 23, 2013 · 1 comment · Fixed by #90

Comments

@pbroadbery
Copy link
Member

Currently, the following code compiles. It shouldn't for the reasons indicated.

#include "foamlib"

ZZZ(A: with): Category == 
 with {
  if A has BasicType then
     foo: () -> ();
  default {
     if A has BasicType then {
        foo(): () == never
    }
  }
}
X: with == add;

QQQ(T: with): ZZZ X == add;

zzz(): () == {
   import from QQQ X;
   foo() -- this should be an error, as X is not a BasicType
}

zzz();

MMM(T: with): Category == with { if T has BasicType then { x: () -> () } }

--- PPP does not export 'x' in all cases where T has BasicType.  Thus it 
-- should fail
PPP(T: with): MMM T with == add { if T has Logic then { x(): () == never; }}
This was referenced Oct 28, 2013
@pippijn pippijn reopened this Nov 20, 2013
@pippijn
Copy link
Collaborator

pippijn commented Nov 20, 2013

@pbroadbery using "fix" with the ticket number anywhere in the commit text closes the ticket, even if it says "doesn't fix #ticket". So, I reopened it.

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

Successfully merging a pull request may close this issue.

2 participants