diff options
author | Paul Phillips <paulp@improving.org> | 2012-08-21 07:15:27 +0200 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-09-01 10:02:22 -0700 |
commit | d9c0cb6165bd60d79bdf764291c417c86623b042 (patch) | |
tree | 7b9db194590ae8d884d4cafc2e12f923b4d893ba /test | |
parent | 6b87cdcd7bd6d1932e87e6bf8dc6029d6461a488 (diff) | |
download | scala-d9c0cb6165bd60d79bdf764291c417c86623b042.tar.gz scala-d9c0cb6165bd60d79bdf764291c417c86623b042.tar.bz2 scala-d9c0cb6165bd60d79bdf764291c417c86623b042.zip |
Suppressed 'possible cause' mis-warning.
I have seen this warning a bunch of times and it has not yet
been close to right.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/buildmanager/t2650_3/t2650_3.check | 1 | ||||
-rw-r--r-- | test/files/buildmanager/t2650_4/t2650_4.check | 1 | ||||
-rw-r--r-- | test/files/neg/not-possible-cause.check | 10 | ||||
-rw-r--r-- | test/files/neg/not-possible-cause.scala | 3 |
4 files changed, 13 insertions, 2 deletions
diff --git a/test/files/buildmanager/t2650_3/t2650_3.check b/test/files/buildmanager/t2650_3/t2650_3.check index c109800d9c..5c6326d59f 100644 --- a/test/files/buildmanager/t2650_3/t2650_3.check +++ b/test/files/buildmanager/t2650_3/t2650_3.check @@ -10,6 +10,5 @@ B.scala:2: error: type mismatch; found : a.T (which expands to) Long required: Int - possible cause: missing arguments for method or constructor def x(a: A): Int = a.x ^ diff --git a/test/files/buildmanager/t2650_4/t2650_4.check b/test/files/buildmanager/t2650_4/t2650_4.check index 89536776bd..a4aeaddfbb 100644 --- a/test/files/buildmanager/t2650_4/t2650_4.check +++ b/test/files/buildmanager/t2650_4/t2650_4.check @@ -10,6 +10,5 @@ B.scala:2: error: type mismatch; found : a.T2 (which expands to) Long required: Int - possible cause: missing arguments for method or constructor def x(a: A): Int = a.x ^ diff --git a/test/files/neg/not-possible-cause.check b/test/files/neg/not-possible-cause.check new file mode 100644 index 0000000000..9111cd0d3d --- /dev/null +++ b/test/files/neg/not-possible-cause.check @@ -0,0 +1,10 @@ +not-possible-cause.scala:2: error: type mismatch; + found : a.type (with underlying type A) + required: AnyRef +Note that implicit conversions are not applicable because they are ambiguous: + both method any2stringfmt in object Predef of type (x: Any)scala.runtime.StringFormat + and method any2stringadd in object Predef of type (x: Any)scala.runtime.StringAdd + are possible conversion functions from a.type to AnyRef + def foo[A <: Product](a: A) { type X = a.type } + ^ +one error found diff --git a/test/files/neg/not-possible-cause.scala b/test/files/neg/not-possible-cause.scala new file mode 100644 index 0000000000..83ec24dec8 --- /dev/null +++ b/test/files/neg/not-possible-cause.scala @@ -0,0 +1,3 @@ +object Foo { + def foo[A <: Product](a: A) { type X = a.type } +} |