summaryrefslogtreecommitdiff
path: root/test/files/neg/sammy_restrictions.check
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2016-03-17 11:56:14 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2016-03-26 22:54:10 -0700
commitf922f367d58b3ba6bbb4cb0864ce82c5cd6f7966 (patch)
tree18a9cf588cd9e6dbe0a3815258f4dede2af3c772 /test/files/neg/sammy_restrictions.check
parent040c0434d456dd75a174147d8a0c4cab37266ba6 (diff)
downloadscala-f922f367d58b3ba6bbb4cb0864ce82c5cd6f7966.tar.gz
scala-f922f367d58b3ba6bbb4cb0864ce82c5cd6f7966.tar.bz2
scala-f922f367d58b3ba6bbb4cb0864ce82c5cd6f7966.zip
Additional SAM restrictions identified by Jason
Also test roundtripping serialization of a lambda that targets a SAM that's not FunctionN (it should make no difference).
Diffstat (limited to 'test/files/neg/sammy_restrictions.check')
-rw-r--r--test/files/neg/sammy_restrictions.check55
1 files changed, 23 insertions, 32 deletions
diff --git a/test/files/neg/sammy_restrictions.check b/test/files/neg/sammy_restrictions.check
index 0276f3a067..5fd2c858c2 100644
--- a/test/files/neg/sammy_restrictions.check
+++ b/test/files/neg/sammy_restrictions.check
@@ -1,46 +1,37 @@
-sammy_restrictions.scala:31: error: type mismatch;
+sammy_restrictions.scala:37: error: type mismatch;
found : () => Int
required: NoAbstract
- (() => 0) : NoAbstract
+ (() => 0) : NoAbstract // error expected
^
-sammy_restrictions.scala:32: error: type mismatch;
- found : Int => Int
- required: TwoAbstract
- ((x: Int) => 0): TwoAbstract
- ^
-sammy_restrictions.scala:35: error: type mismatch;
- found : Int => Int
- required: NoEmptyConstructor
- ((x: Int) => 0): NoEmptyConstructor
- ^
-sammy_restrictions.scala:37: error: type mismatch;
- found : Int => Int
- required: OneEmptySecondaryConstructor
- ((x: Int) => 0): OneEmptySecondaryConstructor // derived class must have an empty *primary* to call.
- ^
sammy_restrictions.scala:38: error: type mismatch;
found : Int => Int
- required: MultipleConstructorLists
- ((x: Int) => 0): MultipleConstructorLists
+ required: TwoAbstract
+ ((x: Int) => 0): TwoAbstract // error expected
^
-sammy_restrictions.scala:39: error: type mismatch;
+sammy_restrictions.scala:41: error: type mismatch;
found : Int => Int
required: MultipleMethodLists
- ((x: Int) => 0): MultipleMethodLists
+ ((x: Int) => 0): MultipleMethodLists // error expected
^
-sammy_restrictions.scala:40: error: type mismatch;
- found : Int => Int
- required: ImplicitConstructorParam
- ((x: Int) => 0): ImplicitConstructorParam
- ^
-sammy_restrictions.scala:41: error: type mismatch;
+sammy_restrictions.scala:42: error: type mismatch;
found : Int => Int
required: ImplicitMethodParam
- ((x: Int) => 0): ImplicitMethodParam
+ ((x: Int) => 0): ImplicitMethodParam // error expected
^
-sammy_restrictions.scala:44: error: type mismatch;
+sammy_restrictions.scala:45: error: type mismatch;
found : Int => Int
required: PolyMethod
- ((x: Int) => 0): PolyMethod
- ^
-9 errors found
+ ((x: Int) => 0): PolyMethod // error expected
+ ^
+sammy_restrictions.scala:47: error: missing parameter type
+ (x => x + 1): NotAnInterface[Int, Int] // error expected (not an interface)
+ ^
+sammy_restrictions.scala:48: error: type mismatch;
+ found : String => Int
+ required: A[Object,Int]
+ ((x: String) => 1): A[Object, Int] // error expected (type mismatch)
+ ^
+sammy_restrictions.scala:51: error: missing parameter type
+ n.app(1)(x => List(x)) // error expected: n.F is not a SAM type (it does not have a no-arg ctor since it has an outer pointer)
+ ^
+8 errors found