Skip to content

Add init test #20356

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

Merged
merged 4 commits into from
May 9, 2024
Merged

Add init test #20356

merged 4 commits into from
May 9, 2024

Conversation

liufengyun
Copy link
Contributor

Add init test

@liufengyun liufengyun requested a review from olhotak May 7, 2024 17:05
@@ -4,7 +4,7 @@ object A {
}
object B {
val f: Int = g()
def g(): Int = f // error
def g(): Int = f // warn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this file be in tests/init-global/warn instead of just tests/warn?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out that we already have it here: https://github.com/scala/scala3/blob/main/tests/init-global/warn/TypeCast.scala

So we can simply remove the duplicate file.

val names = Set("bla")
val help = "bla"

val opts = List(OptMinSuccess) // warn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting Warnings found on incorrect row numbers when compiling tests/init-global/warn/ScalaCheck.scala when I run the test. The warning is on line 16, then has a trace that ends on 21.

@liufengyun liufengyun force-pushed the fliu/add-init-test branch from cab415f to 67c68b8 Compare May 9, 2024 04:38
Copy link
Contributor

@olhotak olhotak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liufengyun liufengyun merged commit 4bd3369 into scala:main May 9, 2024
19 checks passed
@liufengyun liufengyun deleted the fliu/add-init-test branch May 9, 2024 20:08
@Kordyjan Kordyjan added this to the 3.5.1 milestone Jul 3, 2024
liufengyun added a commit that referenced this pull request Oct 8, 2024
Add Color.scala to black list

The test added in #20356 seems to break `test_scala2_library_tasty`, due
to a [problem](scala/bug#13009) in Scala 2
library.

[test_scala2_library_tasty]
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.

3 participants