diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-05 14:59:26 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-11 17:01:33 +0200 |
commit | d852c9b8b4f261bff3bd32127f70378225bb6831 (patch) | |
tree | d6c4c466c40ffa3e886100d3c43f803272a5bddd /test/files/pos/t5777.scala | |
parent | 12e1a9a5826e6b76687d65520929f41c9498777b (diff) | |
download | scala-d852c9b8b4f261bff3bd32127f70378225bb6831.tar.gz scala-d852c9b8b4f261bff3bd32127f70378225bb6831.tar.bz2 scala-d852c9b8b4f261bff3bd32127f70378225bb6831.zip |
SI-6022 model type-test-implication better
we use subtyping as a model for implication between instanceof tests
i.e., when S <:< T we assume x.isInstanceOf[S] implies x.isInstanceOf[T]
unfortunately this is not true in general.
SI-6022 expects instanceOfTpImplies(ProductClass.tpe, AnyRefClass.tpe), but
ProductClass.tpe <:< AnyRefClass.tpe does not hold because Product extends Any
however, if x.isInstanceOf[Product] holds, so does x.isInstanceOf[AnyRef],
and that's all we care about when modeling type tests
Diffstat (limited to 'test/files/pos/t5777.scala')
0 files changed, 0 insertions, 0 deletions