-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
Describe the bug
Usage of the library triggers compiler warnings when setting -Xlint.
To Reproduce
Compiling code like (based on readme examples)
package test
import json._
object Test {
case class UserId(value: String) extends AnyVal
implicit val userIdSchema: json.Schema[UserId] = Json.schema[UserId].toDefinition("userId")
}
with -Xlint and `-Wconf:any:warning-verbose" results in warnings like
[warn] /home/eejbyfeldt/Downloads/hYlrLUvZTGO09M01f2EN7A/src/main/scala/main.scala:7:63: Implicit resolves to enclosing value userIdSchema
[warn] Applicable -Wconf / @nowarn filters for this warning: msg=<part of the message>, cat=w-flag-self-implicit, site=test.Test.userIdSchema
[warn] implicit val userIdSchema: json.Schema[UserId] = Json.schema[UserId].toDefinition("userId")
[warn] ^
[warn] one warning found
Expected behavior
Basic usage of library should compile without warnings.
Actual results
Compiler warnings.
Versions:
- jsonschema version 0.7.11
- scala version 2.13.12
Additional context
Add any other context about the problem here.