New issue
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
linkonce-templates bugs #4579
Comments
1.37.0-beta1 ldmd2 -betterC test1.d -I. -linkonce-templates test1.d import test2;
@nogc nothrow:
enum ARR = idupArray!();
extern(C) int main(int argc, char** argv){
return 0;
}
test2.d module test2;
struct Column {
@nogc nothrow:
int id;
}
auto idupArray()(){
if (!__ctfe)
return null;
Column[2] _arr;
return _arr[0..1].idup;
} import/core/internal/array/duplication.d(39): Error: appending to array in `res ~= cast(immutable(Column))e` requires the GC which is not available with -betterC remove |
Thx for the nice test case. This ultimately boils down to ldc/runtime/druntime/src/core/internal/array/duplication.d Lines 15 to 21 in 3c21924
|
linkonce-templates can not use with betterC code
The text was updated successfully, but these errors were encountered: