unstably allow constants to refer to statics and read from immutable statics
This commit is contained in:
parent
5f40394baa
commit
4e77e368eb
50 changed files with 548 additions and 530 deletions
|
@ -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;
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue