| 1 |
// error test: using member var in static initialization |
| 2 |
// #2024-static-init |
| 3 |
|
| 4 |
// a class |
| 5 |
class Foo |
| 6 |
{ |
| 7 |
// member variable |
| 8 |
1 => int n; |
| 9 |
2 => int m; |
| 10 |
|
| 11 |
// ERROR using member variable to initialize |
| 12 |
n + m => static int THE_NUM; |
| 13 |
} |
| 14 |
|