Skip to content

Remove front-end dependency from dmd.errors - #23770

Merged
thewilsonator merged 1 commit into
dlang:masterfrom
ibuclaw:error_forward_ref
Sep 3, 2026
Merged

Remove front-end dependency from dmd.errors#23770
thewilsonator merged 1 commit into
dlang:masterfrom
ibuclaw:error_forward_ref

Conversation

@ibuclaw

@ibuclaw ibuclaw commented Sep 2, 2026

Copy link
Copy Markdown
Member

One of #23757 #23758 #23759 introduced forward reference regression when compiling dmd one module at a time.

Remove the problematic import to break the cycle.

dmd/errors.d:227:1: error: enum dmd.errors.Classification is forward referenced when looking for 'error'
  227 | enum Classification : Color
      | ^
dmd/dtemplate.d:924:70: error: no property 'error' for type 'Classification'. Did you mean 'Classification.error' ?
  924 |     extern(D) final void printInstantiationTrace(Classification cl = Classification.error,
      |                                                                      ^
dmd/dtemplate.d:1130:27: error: function dmd.dtemplate.TemplateMixin.kind does not override any function
 1130 |     override const(char)* kind() const
      |                           ^
dmd/dtemplate.d:1135:19: error: function dmd.dtemplate.TemplateMixin.accept does not override any function
 1135 |     override void accept(Visitor v)
      |                   ^

One of dlang#23757 dlang#23758 dlang#23759 introduced forward reference regression when
compiling dmd one module at a time.

Remove the problematic import to break the cycle.

```
dmd/errors.d:227:1: error: enum dmd.errors.Classification is forward referenced when looking for 'error'
  227 | enum Classification : Color
      | ^
dmd/dtemplate.d:924:70: error: no property 'error' for type 'Classification'. Did you mean 'Classification.error' ?
  924 |     extern(D) final void printInstantiationTrace(Classification cl = Classification.error,
      |                                                                      ^
dmd/dtemplate.d:1130:27: error: function dmd.dtemplate.TemplateMixin.kind does not override any function
 1130 |     override const(char)* kind() const
      |                           ^
dmd/dtemplate.d:1135:19: error: function dmd.dtemplate.TemplateMixin.accept does not override any function
 1135 |     override void accept(Visitor v)
      |                   ^
```
@thewilsonator
thewilsonator merged commit f8b11d3 into dlang:master Sep 3, 2026
39 of 42 checks passed
@ibuclaw
ibuclaw deleted the error_forward_ref branch September 3, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants