unstably allow constants to refer to statics and read from immutable statics

This commit is contained in:
Ralf Jung 2024-01-05 12:18:11 +01:00
parent 5f40394baa
commit 4e77e368eb
50 changed files with 548 additions and 530 deletions

View file

@ -1,9 +1,11 @@
#### Note: this error code is no longer emitted by the compiler
Static and const variables can refer to other const variables. But a const
variable cannot refer to a static variable.
Erroneous code example:
```compile_fail,E0013
```compile_fail,E0658
static X: i32 = 42;
const Y: i32 = X;
```