mita
mita copied to clipboard
Global variables are not in setup scopes
The following code can not resolve addr
:
package test;
import platforms.xdk110;
let addr = "localhost";
setup endpoint: WLAN {
psk = addr;
ssid = addr;
}
While in this case it might not be hugely useful to define addr
outside the setup, in other cases it might be, for example when doing arithmetic with register addresses for I2C.
@32leaves:
We should allow only constants whose values we can infer using the StaticValueInferrer
.