D DMD32 v2.091.0 compiler currently reacts to "import std;" directive in a strange way.

Правка en1, от ssvb, 2021-04-30 04:44:30

DMD compiler is expected to support import std; directive starting from version v2.086.0, as documented in its changelog. This may be very useful for competitive programming because just a single line of code can provide access to the whole standard library. Similar to how just a single line #include <bits/stdc++.h> is often used in C++ solutions instead of multiple include directives.

But something seems to be wrong with the D compiler used by the codeforces platform, as can be checked via https://codeforces.com/problemset/customtest

This code gets stuck:

import std;
void main() { printf("hello\n"); }

OUTPUT:

Replacing import std; with import std.stdio; helps:

import std.stdio;
void main() { printf("hello\n"); }

OUTPUT:

MikeMirzayanov, could you please check what's wrong? Thanks!

PS. I would also appreciate if my solution 114610491 submitted during Educational Codeforces Round 108 (Rated for Div. 2) could be re-judged after fixing the compiler. But that's not super important in the grand scheme of things.

Теги dmd, dlang, compiler, bug

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ssvb 2021-04-30 04:44:30 1456 Initial revision (published)