Comments (2)
Yes that is indeed illegal... thanks for finding that, I'll make it be a pretty error message. If you didn't want to use OOP, then the idiomatic way would be to make 'left' and 'right' pointers to Expression.
You can decide how you want to allocate and deallocate the memory for those expressions, but for an AST you probably just want to use a BumpAllocator instance which is pretty much the fastest possible allocation, and no need for deleting the individual Expression instances since the memory will all be recovered when the single BumpAllocator instance is destroyed - and since the enum won't require any per-instance destructors. You'll find that this technique is quite a lot faster than a Rust enum with Box values.
from beef.
Fixed in 9d1b85c, will be in 0.42.2.
from beef.
Related Issues (20)
- Comptime fatal error HOT 1
- Fatal error when using Dictionary initializer where value is a Tuple
- Wrong `write-past-end error` when using append fields
- Silent IDE crash during comptime
- Incorrect "out parameter must be assigned" error
- [BUG?] Method reference doesn't know/respect parent generic constrains
- Dangling error when typing delegate type
- IDE crashes with Fatal Error
- No overload found for function
- O0 + LTO causes a ton of linking errors
- O2 generates broken code HOT 2
- Calling consteval through a pointer causes linking error
- Comptime debugging steps over loops
- Compiler.Mixin inside Comptime method crashes the compiler
- Comptime emit view's combobox doesn't show up for generic methods
- MethodMatcher access violation crash
- "Unintuitive" autocomplete behavior
- Reformat Document mangles code when there's a mismatched curly bracket HOT 1
- Issues with the new LLVM 18 update HOT 3
- Cursor does not advance correctly when text is replaced
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 beef.