Skip to content

Fix #4674: Add regression test #4711

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 2 commits into from
Jul 16, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/neg-custom-args/fatal-warnings/i4674.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
object Testi4674 {
def T(x: String) = {
x.foreach {
case 's' => println("s")
case c: Char => println(c) // error
Copy link
Contributor

@allanrenucci allanrenucci Jun 23, 2018

Choose a reason for hiding this comment

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

Can you write // error: type test always succeed instead. Otherwise we don't know what the error is without running the test

}
}
T("test")
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not needed. I would remove it. We try to keep tests as small as possible

}