diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2016-02-01 14:13:23 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2016-02-01 14:13:23 +1000 |
commit | cc6fea6d30609b8879db1ecdbc288e4cdaa5b8d4 (patch) | |
tree | d2ebba9717ab1c172968f776c76eee827e62fbad /test | |
parent | d796f2c3a19a01cb4f08ca951014931b7d47b9bc (diff) | |
parent | 0f088022aac31f8ce9f174490c45f481db2faae9 (diff) | |
download | scala-cc6fea6d30609b8879db1ecdbc288e4cdaa5b8d4.tar.gz scala-cc6fea6d30609b8879db1ecdbc288e4cdaa5b8d4.tar.bz2 scala-cc6fea6d30609b8879db1ecdbc288e4cdaa5b8d4.zip |
Merge pull request #4927 from szeiger/issue/9572
SI-9572 Check for illegal tuple sizes in the parser
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t9572.check | 7 | ||||
-rw-r--r-- | test/files/neg/t9572.scala | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/t9572.check b/test/files/neg/t9572.check new file mode 100644 index 0000000000..b95bd015cf --- /dev/null +++ b/test/files/neg/t9572.check @@ -0,0 +1,7 @@ +t9572.scala:3: error: too many elements for tuple: 23, allowed: 22 + val term23 = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23) + ^ +t9572.scala:5: error: too many elements for tuple: 23, allowed: 22 + val type23: (Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int) = null + ^ +two errors found diff --git a/test/files/neg/t9572.scala b/test/files/neg/t9572.scala new file mode 100644 index 0000000000..32b2db320e --- /dev/null +++ b/test/files/neg/t9572.scala @@ -0,0 +1,6 @@ +class T9572 { + val term22 = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22) + val term23 = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23) + val type22: (Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int) = null + val type23: (Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int) = null +} |