Class Test
Const t As Integer = 1 << 4
End Class
Sub main()
Const t as Integer = 1 << 4
Print t
End Sub
Doesn’t compile with the following error
test.bui:2:0: error: Const ‘t’ in class ‘Test’ initializer must be a literal or constant-arithmetic expression — use a zero-argument Function instead if the value can’t be folded at compile time
If I comment out that line in the class declaration, it compiles.
Seems to be something relating to this loop here that has somehow changed since last time in Bouy.
It lives one round at least in it but crashes then for unknown reason
Private Sub OpenImage(f as FileSystemItem, name as String)
// We look a few times upwards to see where the image is
var maxTries = 10
while not f.Child(name).Exists
maxTries -= 1
f = f.Parent
if maxTries = 0 then
exit while
end if
wend
It actually works if I build…
And then run the build.
I guess buoy is running the debugs somewhere else again
66 seems to be putting runs in Builds → Run at same place as the example projects while 68 is back to putting it somewhere in temp folders as far as I can see so I am back to having no viable way of deploying example projects.
It’s possible. There were a lot of changes recently although the unit tests came back green. Please put that crash and the example code in a big report and I’ll get it looked at.
I dont know excatly what crashes, I guess its calling Parent on something that it may not.
But ultimately the problem is that Running apps have been moved back to temp folders. So I am back to not being able to deploy advanced example projects that have external needs.
All in all then running debugs in temp folders is just terrible. For example at my work there nothing at all would run in such place, its ISO certified security environment and nothing at all will run except in pre-approved Git folder. I litterally could not create hello world application in Visual Studio and run it anywhere outside of that pre-approved location.
So your not doing your future customers any favors by running debug versions in such place.
Shouldn’t Array.Count(t.t) return 100 instead of 0 ? With Array.resizeTo(t, 10, 10, 1), it returns 100.
Class testPublic
Property t As Array Of Integer, 3
Public Sub Constructor()
Array.resizeTo(t, 10, 10, 0)
End Sub
End Class
Sub Main()
Dim t As test
t = New test
Print Array.Count(t.t)
End Sub