dmd icon indicating copy to clipboard operation
dmd copied to clipboard

Fix Issue 9146 - Errors in gagged forward reference declarations are …

Open RazvanN7 opened this issue 3 years ago • 3 comments

…detected too late.

RazvanN7 avatar Sep 14 '22 12:09 RazvanN7

Thanks for your pull request and interest in making D better, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
9146 normal Errors in gagged forward reference declarations are detected too late.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#14433"

dlang-bot avatar Sep 14 '22 12:09 dlang-bot

Test 'fail_compilation/testscopestatic.d' failed: 
(...)
diff:
----
-fail_compilation/testscopestatic.d(15): Error: variable `testscopestatic.foo.p` cannot be `scope` and `static`
-fail_compilation/testscopestatic.d(16): Error: variable `testscopestatic.foo.b` cannot be `scope` and `extern`
+fail_compilation/testscopestatic.d(15): Error: variable `testscopestatic.foo.p` cannot be `scope` and `static alias`
+fail_compilation/testscopestatic.d(16): Error: variable `testscopestatic.foo.b` cannot be `scope` and `extern shared`
 fail_compilation/testscopestatic.d(17): Error: variable `testscopestatic.foo.c` cannot be `scope` and `__gshared`
 fail_compilation/testscopestatic.d(21): Error: variable `testscopestatic.foo.S.x` field cannot be `scope`

Only on Linux_32 and FreeBSD_32 for some reason

dkorpel avatar Sep 14 '22 12:09 dkorpel

Only on Linux_32 and FreeBSD_32 for some reason

Hmm, at a first glance it doesn't look related :-?

RazvanN7 avatar Sep 14 '22 13:09 RazvanN7

I'm inclined to think that this has merely exposed a bug, rather than provoke it. I have no idea why the linux and freebsd 32 versions fail and I am not able to reproduce this with -m32 on my machine.

RazvanN7 avatar Sep 23 '22 08:09 RazvanN7