-
Notifications
You must be signed in to change notification settings - Fork 21
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
std.exception.assumeUnique ddox has weird example errors #204
Comments
My first though was the There seems to be more to it though - * $(RUNNABLE_EXAMPLE
* ----
* string letters() pure
* {
* char[] result = new char['z' - 'a' + 1];
* foreach (i, ref e; result)
* {
* e = cast(char)('a' + i);
* }
* return result;
* }
* ----
* ) Example working: $(RUNNABLE_EXAMPLE
--------------------
//Revert to a default value upon an error:
assert("x".to!int().ifThrown(0) == 0);
--------------------
)
I can't get ddox to compile (running into https://issues.dlang.org/show_bug.cgi?id=17508), so figuring out the root cause is kinda hard. Hope this will be helpful to someone. |
Hm... it's possible to use the d auto tester to check some theories. We can create a PR that adds |
Did you try to build it with mscoff? |
The problem is that DDox throws away newline when processing macros. We can workaround this directly at dlang.org: dlang/dlang.org#2364 |
Hard to explain, I'm not sure what's happening, but the examples seem to be incorrectly parsed:
https://dlang.org/library/std/exception/assume_unique.html
The text was updated successfully, but these errors were encountered: