Comments (3)
If I'm not mistaken, the static attribute can only be applied to variables, not to compile time definitions.
The following should work:
package pkg
main :: proc() {
@(static) var := 1
}
from odin.
@(static)
only works on VARIABLES, not compile time constants.
from odin.
Actually fixed with commit 8768893.
I'd expect an error message stating that applying
@(static)
to a constant inside a proc is neither supported, nor required.
from odin.
Related Issues (20)
- core:flags package tries to change permissions of input files defined via os.Handle type HOT 1
- [DOC ISSUE] `intrinsics.wasm_memory_atomic_wait32` and `wasm_memory_atomic_notify_32`
- log performs unnecessary allocations when logger is nil_logger or default_logger
- Prebuilt odin won't run on MacOS 10.13.6 HOT 19
- bug: `expr != nullptr` in a wrong instantiation of a map HOT 4
- `or_else` with diverging procedures behaviour inconsistency HOT 1
- [Odin Test] Ignore ANSI escape codes for non tty outputs HOT 3
- Self-referencing #type proc() declaration crashes compiler in debug mode HOT 4
- add compiler switch to disable the silent implicit dynamic allocation from m[k] = v to a zero length map HOT 9
- type -> any assignment triggers wrong error message HOT 1
- warn when using flag style bitset elements
- Misnamed LLVM lib on linux in 2024-08 release HOT 1
- Codegen issue when using auto_cast
- `wgpu` `sdl2` example gives error on `linux` `x11`
- `os2.temp_allocator_fini` does not free thread local allocators HOT 3
- Mutating arrays when passing by value HOT 1
- constant declaration of a struct with a `using` statement on a field produces buildtime or runtime crash or wrong field value
- Illegal declaration cycle introduced by where clause
- Comparison of inline transmuted `[16]u8` to `u128` under address sanitize results in segfault
- Compile Error When Using core:mem.make_dynamic_array_len
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odin.