diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-17 11:56:14 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-26 22:54:10 -0700 |
commit | f922f367d58b3ba6bbb4cb0864ce82c5cd6f7966 (patch) | |
tree | 18a9cf588cd9e6dbe0a3815258f4dede2af3c772 /test/files/pos/sammy_scope.scala | |
parent | 040c0434d456dd75a174147d8a0c4cab37266ba6 (diff) | |
download | scala-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/pos/sammy_scope.scala')
-rw-r--r-- | test/files/pos/sammy_scope.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/pos/sammy_scope.scala b/test/files/pos/sammy_scope.scala index 8f1fe7058e..9d35501a47 100644 --- a/test/files/pos/sammy_scope.scala +++ b/test/files/pos/sammy_scope.scala @@ -1,8 +1,8 @@ // test synthesizeSAMFunction: scope hygiene -abstract class SamFun[T1, R] { self => +trait SamFun[T1, R] { self => def apply(v1: T1): R // this should type check, as the apply ref is equivalent to self.apply // it shouldn't resolve to the sam's apply that's synthesized (that wouldn't type check, hence the pos test) def compose[A](g: SamFun[A, T1]): SamFun[A, R] = { x => apply(g(x)) } -}
\ No newline at end of file +} |