diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t5031.check | 5 | ||||
-rw-r--r-- | test/files/neg/t5031/Id.scala | 4 | ||||
-rw-r--r-- | test/files/neg/t5031/package.scala | 3 | ||||
-rw-r--r-- | test/files/pos/t5031/Id.scala | 4 | ||||
-rw-r--r-- | test/files/pos/t5031/package.scala | 3 | ||||
-rw-r--r-- | test/files/pos/t5031_2.scala | 7 |
6 files changed, 26 insertions, 0 deletions
diff --git a/test/files/neg/t5031.check b/test/files/neg/t5031.check new file mode 100644 index 0000000000..8983d8daf9 --- /dev/null +++ b/test/files/neg/t5031.check @@ -0,0 +1,5 @@ +Id.scala:3: error: Companions 'class Test' and 'object Test' must be defined in same file: + Found in t5031/package.scala and t5031/Id.scala +object Test + ^ +one error found diff --git a/test/files/neg/t5031/Id.scala b/test/files/neg/t5031/Id.scala new file mode 100644 index 0000000000..2f0db002d2 --- /dev/null +++ b/test/files/neg/t5031/Id.scala @@ -0,0 +1,4 @@ +package t5031 + +object Test + diff --git a/test/files/neg/t5031/package.scala b/test/files/neg/t5031/package.scala new file mode 100644 index 0000000000..17b63220be --- /dev/null +++ b/test/files/neg/t5031/package.scala @@ -0,0 +1,3 @@ +package object t5031 { + class Test +} diff --git a/test/files/pos/t5031/Id.scala b/test/files/pos/t5031/Id.scala new file mode 100644 index 0000000000..7bc3ebd348 --- /dev/null +++ b/test/files/pos/t5031/Id.scala @@ -0,0 +1,4 @@ +package t5031 + +object ID + diff --git a/test/files/pos/t5031/package.scala b/test/files/pos/t5031/package.scala new file mode 100644 index 0000000000..c02e69db8e --- /dev/null +++ b/test/files/pos/t5031/package.scala @@ -0,0 +1,3 @@ +package object t5031 { + type ID = Int +} diff --git a/test/files/pos/t5031_2.scala b/test/files/pos/t5031_2.scala new file mode 100644 index 0000000000..ded3e82301 --- /dev/null +++ b/test/files/pos/t5031_2.scala @@ -0,0 +1,7 @@ +package object t5031 { + class ID +} + +package t5031 { + object ID +} |