We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is an example in some code I've been writing:
UnsafeArray.ooc
UnsafeArray: cover template <T> { data: T* length: Int init: func@ (=length) { data = gc_malloc(T size * length) } operator [] (i: Int) -> T { data[i] } operator@ []= (i: Int, t: T) -> T { data[i] = t } }
Bitmap.ooc
import ../UnsafeArray RgbColor: cover { r, g, b: UInt8 init: func@ (=r, =g, =b) } Bitmap: class { width, height: Int data: UnsafeArray<RgbColor> pixelCount ::= width * height /* ... */ }
This piece of code generates invalid C code because the generated template instance does not have access to RgbColor's declaration.
Rock should automatically deduce what additional imports are needed and add them to the template type's module.
The text was updated successfully, but these errors were encountered:
Temporary fix is obviously adding imports manually (e.g. import Bitmap in this example)
Sorry, something went wrong.
No branches or pull requests
Here is an example in some code I've been writing:
UnsafeArray.ooc
Bitmap.ooc
This piece of code generates invalid C code because the generated template instance does not have access to RgbColor's declaration.
Rock should automatically deduce what additional imports are needed and add them to the template type's module.
The text was updated successfully, but these errors were encountered: