Comments (4)
It looks like this only happens if the result of Foo.pre_initialize
isn't assigned to a variable (which is the correct usage)
from crystal.
Actually, this happens to the plain .allocate
as well even before .pre_initialize
was introduced: https://play.crystal-lang.org/#/r/giol
from crystal.
Oh, I missed that #pre_initialize
returned the reference already.
It might be interesting to understand what's happening, but that was my misuse. I'll close.
from crystal.
But this is still an error in the compiler. Even if the code is invalid, the compiler should give a reasonable error description, not fail with an arbitrary and meaningless codegen error.
If the result of #pre_initialize
and .allocate
is not assigned to a variable, the compiler should complain about that.
from crystal.
Related Issues (20)
- Some `IO::FileDescriptor` methods are implemented in `Crystal::System::File`
- Linking against the debug MSVC runtime libraries
- Permission denied opening `libiconv.dll` HOT 1
- Another codegen error involving instance variables with `Iterator` type
- SIGBUS on AArch64 when `Proc` returns large extern struct by value
- Unable to run interpreter after building HOT 2
- Using `lld-link` as a linker HOT 1
- Interpreter bug when `require "http/server"` HOT 1
- Can't instantiate a UNIXSocket instance in the interpreter HOT 2
- Some `#[]?(Range)` methods can still raise `IndexError`
- Interpreter hits Invalid memory access (after Error: BUG: no target defs) HOT 1
- Multiplication of Int64 and Int32 may result in Int32 (risking overflows at runtime) HOT 4
- Huge `JSON::ParseException` HOT 5
- `Number#humanize` and `Int#humanize_bytes` should separate number and unit by a space HOT 1
- Regression: Interrupted system call in CI HOT 6
- Is an html strip-tags method a worth stdlib addition? HOT 7
- Unwinding is slow on WSL HOT 8
- add something like ruby un.rb or cmake -E for cross platform scripts HOT 3
- regression: XPath swallows errors and raises opaque `error in [...] expression` instead HOT 1
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 crystal.