summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/test/scala/forge/CacherTests.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/src/test/scala/forge/CacherTests.scala b/core/src/test/scala/forge/CacherTests.scala
index d77287ac..11ecdfce 100644
--- a/core/src/test/scala/forge/CacherTests.scala
+++ b/core/src/test/scala/forge/CacherTests.scala
@@ -83,6 +83,21 @@ object CacherTests extends TestSuite{
}""")
assert(err.msg == expectedMsg)
}
+ 'neg2 - {
+
+ val expectedMsg =
+ "Target#apply() call cannot use `value x` defined within the T{...} block"
+ val err = compileError("""{
+ val a = T{ 1 }
+ val arr = Array(a)
+ val b = {
+ T{
+ arr.map{x => x()}
+ }
+ }
+ }""")
+ assert(err.msg == expectedMsg)
+ }
}
}
}