Skip to content
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

Compilation Errors in DMD2.104.0 onward #102

Closed
vnayar opened this issue Jun 14, 2024 · 0 comments · Fixed by #103
Closed

Compilation Errors in DMD2.104.0 onward #102

vnayar opened this issue Jun 14, 2024 · 0 comments · Fixed by #103

Comments

@vnayar
Copy link

vnayar commented Jun 14, 2024

Starting with dmd-2.104.0, and at least in dmd-2.105.0, but not dmd-2.103.1, fluent-asserts no longer compiles. The problem appears to originate from using the concatenate operator ~ on types string and const(dstring), expecting an implicit conversion. The changelog does not appear to document such a change: https://dlang.org/changelog/2.104.0.html

(dmd-2.104.0) fluent-asserts$ dub test
             Generating test runner configuration 'fluent-asserts-test-unittest' for 'unittest' (library).
    Starting Performing "unittest" build using /home/vnayar/dlang/dmd-2.104.0/linux/bin64/dmd for x86_64.
  Up-to-date ddmp 0.0.1-0.dev.3: target for configuration [library] is up to date.
  Up-to-date either 1.1.3: target for configuration [unittest] is up to date.
  Up-to-date libdparse 0.20.0: target for configuration [library] is up to date.
    Building fluent-asserts 1.0.0+commit.2.gb6c6bc1: building configuration [fluent-asserts-test-unittest]
source/fluentasserts/core/message.d(184,27): Error: constructor `fluentasserts.core.message.Message.this(Type type, string text)` is not callable using argument types `(Type, dstring)`
source/fluentasserts/core/message.d(184,27):        cannot pass argument `diff.text` of type `dstring` to parameter `string text`
source/fluentasserts/core/message.d(188,27): Error: constructor `fluentasserts.core.message.Message.this(Type type, string text)` is not callable using argument types `(Type, dstring)`
source/fluentasserts/core/message.d(188,27):        cannot pass argument `diff.text` of type `dstring` to parameter `string text`
source/fluentasserts/core/message.d(192,27): Error: constructor `fluentasserts.core.message.Message.this(Type type, string text)` is not callable using argument types `(Type, dstring)`
source/fluentasserts/core/message.d(192,27):        cannot pass argument `diff.text` of type `dstring` to parameter `string text`
source/fluentasserts/core/results.d(303,18): Error: incompatible types for `(diffBegin ~ diffDelete) ~ (d.text)`: `string` and `const(dstring)`
source/fluentasserts/core/results.d(305,18): Error: incompatible types for `(diffBegin ~ diffInsert) ~ (d.text)`: `string` and `const(dstring)`
source/fluentasserts/core/results.d(307,18): Error: cannot implicitly convert expression `d.text` of type `const(dstring)` to `string`
source/fluentasserts/core/results.d(321,24): Error: function `fluentasserts.core.results.ResultPrinter.primary(string)` is not callable using argument types `(dstring)`
source/fluentasserts/core/results.d(321,24):        cannot pass argument `diff.text` of type `dstring` to parameter `string`
source/fluentasserts/core/results.d(325,31): Error: function `fluentasserts.core.results.ResultPrinter.successReverse(string)` is not callable using argument types `(dstring)`
source/fluentasserts/core/results.d(325,31):        cannot pass argument `diff.text` of type `dstring` to parameter `string`
source/fluentasserts/core/results.d(329,30): Error: function `fluentasserts.core.results.ResultPrinter.dangerReverse(string)` is not callable using argument types `(dstring)`
source/fluentasserts/core/results.d(329,30):        cannot pass argument `diff.text` of type `dstring` to parameter `string`
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 a pull request may close this issue.

1 participant