"...cannot be interpreted at compile time" I can't find the source of the error!
jfondren
julian.fondren at gmail.com
Fri Aug 20 02:51:16 UTC 2021
On Friday, 20 August 2021 at 02:30:53 UTC, Pablo De Nápoli wrote:
> Any idea of which could be the cause of trouble or on how to
> get more specific diagnosis?
With no extra arguments I get a "compile time context created
here" addendum. Does that not show up for you or does the line
not make sense still?
It might also be new. This is with v2.097.1
```
example.d(6): Error: `atoi` cannot be interpreted at compile
time, because it has no available source code
example.d(12): compile time context created here
example.d(13): Error: no property `val` for type `void`
```
From this code:
```d
extern (C) int atoi(const(char)* nptr);
class N {
int val;
this() {
val = atoi("2");
}
}
void main() {
import std.stdio : writeln;
enum n = new N(); // line 12
writeln(n.val);
}
```
More information about the Digitalmars-d-learn
mailing list