Opened 5 years ago
Last modified 13 months ago
#227 new defect
Interpretation of assertions with struct declaration — at Initial Version
| Reported by: | f37yu | Owned by: | |
|---|---|---|---|
| Priority: | major | Component: | cfa-cc |
| Version: | 1.0 | Keywords: | |
| Cc: |
Description
Currently, assertion parameters placed on a struct declaration is interpreted as assertion on special operators (ctor/dtor/assign), which means they might be elided or forcefully bypassed.
Some test results:
forall (otype T | {void foo(T);})
struct S {
T t;
};
S(int) s1; // error: cannot satisfy assertion for ?{}
S(int) s2 = {0}; // error: cannot satisfy assertion for ?{}
S(int) s3 @= {0}; // ok ...?
forall (otype T | {void foo(T);})
struct U {
T * t;
};
U(int) u1; // ok ...?
Note:
See TracTickets
for help on using tickets.