Skip to content
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

No coverage generated for AnyVal subclass constructors #52

Open
nightkr opened this issue Jun 27, 2013 · 0 comments
Open

No coverage generated for AnyVal subclass constructors #52

nightkr opened this issue Jun 27, 2013 · 0 comments

Comments

@nightkr
Copy link

nightkr commented Jun 27, 2013

I have a class that looks like this:

package object pimps {
    implicit class AtomicReferencePimps[T](val ar: AtomicReference[T]) {
        def transform(f: T => T) {
            var oldV: Option[T] = None
            var newV: Option[T] = None
            do {
                oldV = Some(ar.get)
                newV = Some(f(oldV.get))
            } while(!ar.compareAndSet(oldV.get, newV.get))
        }
    }
}

However, even though I use the class in one of the tests, scct still reports no coverage on the contructor ((val ar: AtomicReference[T])). Making it a regular class (removing the AnyVal subclassing) fixes this issue.

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

1 participant