You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I would like to work on this issue. From what I understand the SignatureTest.scala file, it is linked to the TranslatableSignaturesTestCases.scala file which allows to call different scala files such as extensionParams.scala which contains examples of extension methods to test. So, is it enough to add new examples in this file (or another one), or do we need to modify the SignatureTest.scala file?
@Dedelweiss I think that SignatureTest.scala will have to be modified to add checking for extension signatures. In TranslatableSignaturesTestCases.scala there already should exist more than enough tests for extension methods. The problem is that for those tests only the def part is tested to be present in generated scaladoc sites which allowed for bugs like #16647 to slip through. (where only the extension (...) part was wrongly generated)
In this PR, I added new tests examples for extensions's signatures.
To do that I did multiple changement :
### SignatureTest
- Added Extension for expected and actual signatures
- There needs to be a unique name for each signature, but extensions
don't have one like defs. So for now I have the signature itself as a
title (can change if better idea)
- Added "extensions" for member to test
### ExtensionParam
- I changed the extensions so that they are all unique and test
different cases.
### TranslatableSignaturesTestCases
- Added a filterNot for ExtensionMethodSignature class. Too many
duplicate extensions, it creates an error and I think it's not mandatory
to test the extensions on this file too.
Fixes: #17108
Scaladoc should test signatures of
extension
s just like it's done fordef
s. This way we can prevent issues like #16647The appropriate file for this is most likely:
https://github.com/lampepfl/dotty/blob/main/scaladoc/test/dotty/tools/scaladoc/signatures/SignatureTest.scala
The text was updated successfully, but these errors were encountered: