summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2013-08-12 11:31:55 -0700
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2013-08-12 11:31:55 -0700
commite5c99b1b754e14e7a445b1585c9f195c853fb7df (patch)
treea6c713920ab0171d6ca550bf48201b04c5298938 /test
parente7876d5c41bbea0ee4679815edb5dc1ecef4c6a9 (diff)
parent466b7d29f1c70018aea965961e830f50cf0facd4 (diff)
downloadscala-e5c99b1b754e14e7a445b1585c9f195c853fb7df.tar.gz
scala-e5c99b1b754e14e7a445b1585c9f195c853fb7df.tar.bz2
scala-e5c99b1b754e14e7a445b1585c9f195c853fb7df.zip
Merge pull request #2797 from paulp/pr/erasure-n-squared
Fix N^2 spot in erasure.
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/erasure-nsquared.scala35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/files/pos/erasure-nsquared.scala b/test/files/pos/erasure-nsquared.scala
new file mode 100644
index 0000000000..b0e30ade58
--- /dev/null
+++ b/test/files/pos/erasure-nsquared.scala
@@ -0,0 +1,35 @@
+trait BigCast {
+ def bar(x: Int): AnyRef = (
+ null
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ .asInstanceOf[List[AnyRef]].head
+ )
+}