Skip to content

@unchecked annotations are not carried over to instrumented code #32

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

Closed
RichardBradley opened this issue Apr 15, 2014 · 3 comments
Closed

Comments

@RichardBradley
Copy link
Contributor

(Low priority)

Code which has partial match functions which are annotated with @unchecked will raise a false compiler warning when instrumented with scoverage.

For example:

object PartialMatchObject {
  def partialMatchExample(s: Option[String]): Unit = {
    (s: @unchecked) match {
      case Some(str) => println(str)
    }
  }
}

The above code will give a "match may not be exhaustive" false compiler warning on sbt scoverage:compile (it will not give a compiler warning when compiled normally).

@sksamuel
Copy link
Member

I reckon the annotation is not being copied by the plugin transformation phase. Now I have a way of debugging directly inside intellij should be easy to fix.

@sksamuel
Copy link
Member

BTW I don't have your email address so:

Do you think that SBT is

  1. A well thought out simple to easy build tool
  2. A complete piece of shit

?

@RichardBradley
Copy link
Contributor Author

It’s definitely not the first.
The second is a bit vague. It has serious problems that are probably insurmountable.
I've sent you an email with my thoughts.

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

No branches or pull requests

2 participants