0

在我通过 SBT 插件开始使用 Scala 2.10 的准引号后,我收到如下警告:

[warn] embeddedFile--QuasiquoteCompat.scala@e97d744663044acca2f60c8e99547f14:320: Adapting argument list by inserting (): leaky (Object-receiving) target makes this especially dangerous.
[warn]         signature: ConstantExtractor.apply(value: Any): Constants.this.Constant
[warn]   given arguments: <none>
[warn]  after adaptation: ConstantExtractor((): Unit)
[warn]               DefDef(NoMods, newTermName("$init$"), List(), List(List()), TypeTree(), u.Block(lvdefs, Literal(Constant())))))
[warn]                                                                                                                       ^
[warn] embeddedFile--QuasiquoteCompat.scala@e97d744663044acca2f60c8e99547f14:329: Adapting argument list by inserting (): leaky (Object-receiving) target makes this especially dangerous.
[warn]         signature: ConstantExtractor.apply(value: Any): Constants.this.Constant
[warn]   given arguments: <none>
[warn]  after adaptation: ConstantExtractor((): Unit)
[warn]               DefDef(constrMods, nme.CONSTRUCTOR, List(), vparamss1, TypeTree(), u.Block(lvdefs ::: List(superCall), Literal(Constant())))))
[warn]                                                                                                                                      ^

如何解释这些警告?

我究竟做错了什么?

我能对他们做些什么?

4

1 回答 1

1

这在天堂的 2.10.3-RC1 版本中已修复。如果您需要使用 2.10.2,请告诉我,我将发布 2.10.2 的更新版本。

于 2013-09-09T20:31:51.000 回答