D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7887 - [CTFE] can't assign to returned reference
Summary: [CTFE] can't assign to returned reference
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: CTFE, ice, pull
: 9375 (view as issue list)
Depends on:
Blocks:
 
Reported: 2012-04-10 18:54 UTC by Nils
Modified: 2014-04-21 08:15 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nils 2012-04-10 18:54:14 UTC
$ cat test.d
ref int ref_(ref int x) {
        return x;
}
void f() {
        int x;
        ref_(x) = 42;
}
static assert({f(); return true;}());

$ dmd -c -o- test.d
test.d(6): Error: CTFE internal error: unsupported assignment ref_(x) = 42
Comment 2 github-bugzilla 2014-04-12 19:55:08 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/def0b86fde62b04a66b04b62e279d4d05aa82c4c
fix Issue 7887 - [CTFE] can't assign to returned reference

https://github.com/D-Programming-Language/dmd/commit/ab5a767da55b932bc5859f395970b680016b6154
Merge pull request #3449 from 9rnsr/fix7887

Issue 7887 - [CTFE] can't assign to returned reference
Comment 3 Kenji Hara 2014-04-21 08:15:47 UTC
*** Issue 9375 has been marked as a duplicate of this issue. ***