From f76306b77fdc5b028d900141a40b8c98354641a9 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 7 Aug 2012 12:22:10 +0200 Subject: SI-6040 error on unauthorized extension Dynamic authorization is easy to get: `import language.dynamics` --- test/files/neg/t6040.check | 7 +++++++ test/files/neg/t6040.scala | 1 + test/files/pos/t6040.scala | 3 +++ test/files/run/applydynamic_sip.flags | 1 + test/files/run/t4536.flags | 1 + test/files/run/t5040.flags | 1 + 6 files changed, 14 insertions(+) create mode 100644 test/files/neg/t6040.check create mode 100644 test/files/neg/t6040.scala create mode 100644 test/files/pos/t6040.scala create mode 100644 test/files/run/applydynamic_sip.flags create mode 100644 test/files/run/t4536.flags create mode 100644 test/files/run/t5040.flags (limited to 'test/files') diff --git a/test/files/neg/t6040.check b/test/files/neg/t6040.check new file mode 100644 index 0000000000..f44a81c471 --- /dev/null +++ b/test/files/neg/t6040.check @@ -0,0 +1,7 @@ +error: extension of type scala.Dynamic needs to be enabled +by making the implicit value language.dynamics visible. +This can be achieved by adding the import clause 'import language.dynamics' +or by setting the compiler option -language:dynamics. +See the Scala docs for value scala.language.dynamics for a discussion +why the feature needs to be explicitly enabled. +one error found diff --git a/test/files/neg/t6040.scala b/test/files/neg/t6040.scala new file mode 100644 index 0000000000..b8f7dab7a4 --- /dev/null +++ b/test/files/neg/t6040.scala @@ -0,0 +1 @@ +class X extends Dynamic \ No newline at end of file diff --git a/test/files/pos/t6040.scala b/test/files/pos/t6040.scala new file mode 100644 index 0000000000..9c00ecd8e1 --- /dev/null +++ b/test/files/pos/t6040.scala @@ -0,0 +1,3 @@ +import language.dynamics + +class X extends Dynamic \ No newline at end of file diff --git a/test/files/run/applydynamic_sip.flags b/test/files/run/applydynamic_sip.flags new file mode 100644 index 0000000000..1141f97507 --- /dev/null +++ b/test/files/run/applydynamic_sip.flags @@ -0,0 +1 @@ +-language:dynamics diff --git a/test/files/run/t4536.flags b/test/files/run/t4536.flags new file mode 100644 index 0000000000..1141f97507 --- /dev/null +++ b/test/files/run/t4536.flags @@ -0,0 +1 @@ +-language:dynamics diff --git a/test/files/run/t5040.flags b/test/files/run/t5040.flags new file mode 100644 index 0000000000..1141f97507 --- /dev/null +++ b/test/files/run/t5040.flags @@ -0,0 +1 @@ +-language:dynamics -- cgit v1.2.3