| 1 |
// EXPECTEDFAIL Test: Non-separable het lead/lag expressions are not supported |
| 2 |
// |
| 3 |
// This test verifies that the preprocessor correctly rejects non-separable |
| 4 |
// expressions that combine leads with lagged states in model(heterogeneity=...) blocks. |
| 5 |
// |
| 6 |
// Example: log(k(-1) + c(+1)) - the log() makes it non-separable |
| 7 |
// |
| 8 |
// Expected result: Preprocessor error with message about non-separable expression |
| 9 |
|
| 10 |
heterogeneity_dimension households; |
| 11 |
|
| 12 |
var(heterogeneity=households) c k; |
| 13 |
varexo(heterogeneity=households) e; |
| 14 |
var r; |
| 15 |
parameters beta; |
| 16 |
|
| 17 |
beta = 0.99; |
| 18 |
|
| 19 |
model(heterogeneity=households); |
| 20 |
// Non-separable term combining lead and lagged state |
| 21 |
log(k(-1) + c(+1)) - c; |
| 22 |
k - e; |
| 23 |
end; |
| 24 |
|
| 25 |
model; |
| 26 |
r - 0.04; |
| 27 |
end; |