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

Eliminate some compiler warnings in generated code #321

merged 5 commits into from May 6, 2015


None yet
2 participants

liff commented May 6, 2015

Eliminates the following compiler warnings in the generated scalaxb.scala:

Adapted arguments
[warn] ... scalaxb.scala:566: Adapting argument list by creating a 3-tuple: this may not be what you want.
[warn]         signature: Some.apply[A](x: A): Some[A]
[warn]   given arguments: record.namespace, record.key, record.value
[warn]  after adaptation: Some((record.namespace, record.key, record.value): (Option[String], Option[String], A))
[warn]     Some(record.namespace, record.key, record.value)
Shadowed and unused type parameters
[warn] scalaxb.scala:710: type parameter A defined in method parse shadows type A defined in trait ElemNameParser. You may want to rename your type parameter, or possibly remove it.
[warn]   def parse[A](p: Parser[A], in: Seq[scala.xml.Node]): ParseResult[A] =
Postfix operators
[warn] scalaxb.scala:219: postfix operator orNull should be enabled
[warn] by making the implicit value scala.language.postfixOps visible.
[warn] This can be achieved by adding the import clause 'import scala.language.postfixOps'
[warn] or by setting the compiler option -language:postfixOps.
[warn] See the Scala docs for value scala.language.postfixOps for a discussion
[warn] why the feature should be explicitly enabled.
[warn]           Right(new QName(namespace orNull, localPart))
View bounds
[warn] scalaxb.scala:635: View bounds are deprecated. Use an implicit parameter instead.
[warn] Example: Instead of `def f[A <% Int](a: A)` use `def f[A](a: A)(implicit ev: A => Int)`.
[warn]   implicit class ParserExt[+T, P <% Parser[T]](current: P) {

This comment has been minimized.

Show comment
Hide comment

eed3si9n May 6, 2015


Awesome! Thanks for this.


eed3si9n commented May 6, 2015

Awesome! Thanks for this.

eed3si9n added a commit that referenced this pull request May 6, 2015

Merge pull request #321 from liff/topic/eliminate-compiler-warnings
Eliminate some compiler warnings in generated code

@eed3si9n eed3si9n merged commit 0f695b6 into eed3si9n:master May 6, 2015

eed3si9n added a commit that referenced this pull request Jul 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment