You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method bidiFactory has return type Option[ BufferBidiFactory ], so there is no further generics involved other than having the option. Without virtpatmat it compiles fine, with virtpatmat the following warning is emitted:
[warn] /Users/hhrutz/Documents/devel/ScalaAudioFile/src/main/scala/de/sciss/synth/io/AudioFile.scala:188: non variable type-argument de.sciss.synth.io.BufferBidiFactory in typeSome[de.sciss.synth.io.BufferBidiFactory] is unchecked since it is eliminated by erasure
[warn] caseSome( bbf ) =>
[warn] ^
@SethTisue said (edited on May 23, 2012 1:45:46 PM UTC):
this is reproducible on current master with very simple code:
~/scala % dists/latest/bin/scala -unchecked
Welcome to Scala version 2.10.0-20120424-191812-996f96fb3f
scala> Option(3) match { case Some(n) => n; case None => 0 }
<console>:8: warning: non variable type-argument Int in type Some[Int] is unchecked since it is eliminated by erasure
Option(3) match { case Some(n) => n; case None => 0 }
^
res0: Int = 3
@adriaanm said:
fixed by moving patmat to its own phase (the spurious warnings arose from emitted isInstanceOf's, where the unchecked bits are not relied upon)
When switching from Scala 2.9.1 to 2.10.0-M2 with virtpatmatch enabled, a wrong type erasure warning is emitted in this class: https://github.com/Sciss/ScalaAudioFile/blob/scala-2.10.0-M2-test/src/main/scala/de/sciss/synth/io/AudioFile.scala . The code is as follows:
Method
bidiFactory
has return typeOption[ BufferBidiFactory ]
, so there is no further generics involved other than having the option. Without virtpatmat it compiles fine, with virtpatmat the following warning is emitted:Clearly the extractor should work without any erasure warnings. To reproduce clone the following project/branch https://github.com/Sciss/ScalaAudioFile/tree/scala-2.10.0-M2-test and run
sbt compile
(use the nightly sbt from http://repo.typesafe.com/typesafe/ivy-snapshots/org.scala-tools.sbt/sbt-launch/0.11.3-20120130-052105/ )The text was updated successfully, but these errors were encountered: