Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions tests/neg/i18632.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- [E176] Potential Issue Warning: tests/neg/i18632.scala:12:2 ---------------------------------------------------------
12 | bar // warn
| ^^^
| unused value of type String
No warnings can be incurred under -Werror (or -Xfatal-warnings)
14 changes: 14 additions & 0 deletions tests/neg/i18632.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//> using options -Wnonunit-statement -Werror

class Context

object Foo {
def run(program: Context ?=> String): Unit = ???
}

def bar(using Context): String = ???

@main def run = Foo.run:
bar // warn
bar
// nopos-error: No warnings can be incurred under -Werror (or -Xfatal-warnings)