diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-04-12 01:59:46 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-04-12 02:04:14 +0200 |
commit | 814cf34fb00f9ccb001249f4b3445ebc4f9942c9 (patch) | |
tree | 24dd54da571d27f10b0c482a6e08932c318fd7b2 /test/files/neg/macro-keyword | |
parent | db3056f11730da19e4e56f09f12e300bda62f57c (diff) | |
download | scala-814cf34fb00f9ccb001249f4b3445ebc4f9942c9.tar.gz scala-814cf34fb00f9ccb001249f4b3445ebc4f9942c9.tar.bz2 scala-814cf34fb00f9ccb001249f4b3445ebc4f9942c9.zip |
Next generation of macros
Implements SIP 16: Self-cleaning macros: http://bit.ly/wjjXTZ
Features:
* Macro defs
* Reification
* Type tags
* Manifests aliased to type tags
* Extended reflection API
* Several hundred tests
* 1111 changed files
Not yet implemented:
* Reification of refined types
* Expr.value splicing
* Named and default macro expansions
* Intricacies of interaction between macros and implicits
* Emission of debug information for macros (compliant with JSR-45)
Dedicated to Yuri Alekseyevich Gagarin
Diffstat (limited to 'test/files/neg/macro-keyword')
13 files changed, 42 insertions, 0 deletions
diff --git a/test/files/neg/macro-keyword/Macros_Bind_12.scala b/test/files/neg/macro-keyword/Macros_Bind_12.scala new file mode 100644 index 0000000000..a3b1553348 --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Bind_12.scala @@ -0,0 +1,6 @@ +object Test12 { + val Some(macro) = Some(42) + macro match { + case macro => println(macro) + } +}
\ No newline at end of file diff --git a/test/files/neg/macro-keyword/Macros_Class_4.scala b/test/files/neg/macro-keyword/Macros_Class_4.scala new file mode 100644 index 0000000000..8635d1f4f6 --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Class_4.scala @@ -0,0 +1,3 @@ +package test4 + +class macro diff --git a/test/files/neg/macro-keyword/Macros_Class_5.scala b/test/files/neg/macro-keyword/Macros_Class_5.scala new file mode 100644 index 0000000000..af24a489d0 --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Class_5.scala @@ -0,0 +1,3 @@ +object Test5 { + class macro +} diff --git a/test/files/neg/macro-keyword/Macros_Def_13.scala b/test/files/neg/macro-keyword/Macros_Def_13.scala new file mode 100644 index 0000000000..f4e25bfdfc --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Def_13.scala @@ -0,0 +1,3 @@ +object Test13 { + def macro = 2 +}
\ No newline at end of file diff --git a/test/files/neg/macro-keyword/Macros_Object_6.scala b/test/files/neg/macro-keyword/Macros_Object_6.scala new file mode 100644 index 0000000000..66eb494e6b --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Object_6.scala @@ -0,0 +1,3 @@ +package test6 + +object macro diff --git a/test/files/neg/macro-keyword/Macros_Object_7.scala b/test/files/neg/macro-keyword/Macros_Object_7.scala new file mode 100644 index 0000000000..6f5b9ceacd --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Object_7.scala @@ -0,0 +1,3 @@ +object Test7 { + object macro +} diff --git a/test/files/neg/macro-keyword/Macros_Package_10.scala b/test/files/neg/macro-keyword/Macros_Package_10.scala new file mode 100644 index 0000000000..52d3fbabf6 --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Package_10.scala @@ -0,0 +1,3 @@ +package macro + +package macro.bar
\ No newline at end of file diff --git a/test/files/neg/macro-keyword/Macros_Package_11.scala b/test/files/neg/macro-keyword/Macros_Package_11.scala new file mode 100644 index 0000000000..a68ebd935f --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Package_11.scala @@ -0,0 +1,3 @@ +package foo + +package macro.foo diff --git a/test/files/neg/macro-keyword/Macros_Trait_8.scala b/test/files/neg/macro-keyword/Macros_Trait_8.scala new file mode 100644 index 0000000000..e32d4c1385 --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Trait_8.scala @@ -0,0 +1,3 @@ +package test8 + +trait macro diff --git a/test/files/neg/macro-keyword/Macros_Trait_9.scala b/test/files/neg/macro-keyword/Macros_Trait_9.scala new file mode 100644 index 0000000000..243a54abe6 --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Trait_9.scala @@ -0,0 +1,3 @@ +object Test9 { + trait macro +} diff --git a/test/files/neg/macro-keyword/Macros_Type_3.scala b/test/files/neg/macro-keyword/Macros_Type_3.scala new file mode 100644 index 0000000000..30e523bcaf --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Type_3.scala @@ -0,0 +1,3 @@ +object Test3 { + type macro = Int +}
\ No newline at end of file diff --git a/test/files/neg/macro-keyword/Macros_Val_1.scala b/test/files/neg/macro-keyword/Macros_Val_1.scala new file mode 100644 index 0000000000..96f57acb30 --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Val_1.scala @@ -0,0 +1,3 @@ +object Test1 { + val macro = ??? +}
\ No newline at end of file diff --git a/test/files/neg/macro-keyword/Macros_Var_2.scala b/test/files/neg/macro-keyword/Macros_Var_2.scala new file mode 100644 index 0000000000..a79dda6dc2 --- /dev/null +++ b/test/files/neg/macro-keyword/Macros_Var_2.scala @@ -0,0 +1,3 @@ +object Test2 { + var macro = ??? +}
\ No newline at end of file |