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
//>usingscala"3.3.1"//>usingoptions-Wnonunit-statement-WerrorclassContextobjectFoo {
defrun(program: Context?=>String):Unit=???
}
defbar(usingContext):String=???@main defrun=Foo.run:
bar
bar
Output - givens not available, no linting warn:
Compiling project (Scala 3.3.1, JVM)
[error] ./Foo.scala:13:6
[error] No given instance of type Context was found for parameter x$1 of method bar
[error] bar
[error] ^
[error] ./Foo.scala:14:6
[error] No given instance of type Context was found for parameter x$1 of method bar
[error] bar
[error] ^
Error compiling project (Scala 3.3.1, JVM)
Removing -Werror causes the givens to be available again, and unused warn is reported:
Compiling project (Scala 3.3.1, JVM)
[warn] ./Foo.scala:13:3
[warn] unused value of type String
[warn] bar
[warn] ^^^
Compiled project (Scala 3.3.1, JVM)
szymon-rd
changed the title
Adding -Werror to -Wnonunit-statement can cause givens to not be available anymre
Adding -Werror to -Wnonunit-statement can cause givens to not be available anymore
Oct 2, 2023
szymon-rd
changed the title
Adding -Werror to -Wnonunit-statement can cause givens to not be available anymore
Adding -Werror to -Wnonunit-statement can cause givens not to be available anymore
Oct 2, 2023
Compiler version
3.3.1
Minimized code
Output - givens not available, no linting warn:
Removing
-Werror
causes the givens to be available again, and unused warn is reported:Reported in VirtusLab/besom#200
Expectation
Givens should be available, and linting error should be reported.
The text was updated successfully, but these errors were encountered: