diff options
author | Som Snytt <som.snytt@gmail.com> | 2016-05-16 16:24:50 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2016-05-16 21:08:44 -0700 |
commit | 73ca44be579e5100706d174f18025fc4487e9cb9 (patch) | |
tree | c68b732b86ac053419d859b8cb107b24bac4586b /test/files/run/t4625.script | |
parent | b3f8332cf399cd15067c879c8297c25598045883 (diff) | |
download | scala-73ca44be579e5100706d174f18025fc4487e9cb9.tar.gz scala-73ca44be579e5100706d174f18025fc4487e9cb9.tar.bz2 scala-73ca44be579e5100706d174f18025fc4487e9cb9.zip |
SI-4625 Recognize App in script
Cheap name test: if the script object extends "App",
take it for a main-bearing parent.
Note that if `-Xscript` is not `Main`, the default,
then the source is taken as a snippet and there is
no attempt to locate an existing `main` method.
Diffstat (limited to 'test/files/run/t4625.script')
-rw-r--r-- | test/files/run/t4625.script | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/files/run/t4625.script b/test/files/run/t4625.script new file mode 100644 index 0000000000..600ceacbb6 --- /dev/null +++ b/test/files/run/t4625.script @@ -0,0 +1,5 @@ + +object Main extends Runnable with App { + def run() = println("Test ran.") + run() +} |