D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20176 - std.container.rbtree does not work at compile time
Summary: std.container.rbtree does not work at compile time
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-28 05:38 UTC by Walter Bright
Modified: 2020-11-09 15:14 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 Walter Bright 2019-08-28 05:38:24 UTC
The following code:

    import std.format, std.stdio;

    class X {
	mixin(members());
    }

    string members() {
	import std.container.rbtree;
   	auto rbt = redBlackTree(3, 1, 4, 2, 5);
	int x = rbt.front;
	return format("int y = %s;\n", x);
    }

fails to work at compile time with the message "cannot cast ... to ... at compile time".
Comment 1 Nathan S. 2020-11-09 15:14:29 UTC
This was fixed at some point between the time this report was filed and v2.091.0.