As per closed issue #741
I'm seeing this again with V 0.1.25 a2838ae
import os
//fn main()
//{
// some vars
homepath := os.getenv("HOME")
configpath := "$homepath/.ssb/scutty.cfg"
println(configpath)
//}
```
v run tester.v
tester.v:7:41: cannot interpolate this value
5| // some vars
6| homepath := os.getenv("HOME")
7| configpath := "$homepath/.ssb/scutty.cfg"
^
8| println(configpath)
9| //}
Wrap it in a main function and it works again:
```V
import os
fn main()
{
// some vars
homepath := os.getenv("HOME")
configpath := "$homepath/.ssb/scutty.cfg"
println(configpath)
}
v run tester.v
/Users/madra/.ssb/scutty.cfg
Yes it's the notorious no fn main bug
It'll be fixed for good in the new parser this month.
Works fine on the latest V.
Most helpful comment
Yes it's the notorious no fn main bug
It'll be fixed for good in the new parser this month.