File tree 1 file changed +7
-3
lines changed
library/src/scalaShadowing
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -198,16 +198,20 @@ object language {
198
198
199
199
import languageFeature .experimental ._
200
200
201
- /** Where enabled, macro definitions are allowed. Macro implementations and
202
- * macro applications are unaffected; they can be used anywhere.
201
+ /** Where enabled, Scala 2 macro definitions are allowed. Scala 2 macro implementations and
202
+ * macro applications are unaffected; they can be used anywhere. A Scala 2 macro definition
203
+ * must be accompanied by a Scala 3 macro definition with the same signature.
203
204
*
204
- * '''Why introduce the feature?''' Macros promise to make the language more regular,
205
+ * '''Why introduce the feature?''' Scala 2 macros promise to make the language more regular,
205
206
* replacing ad-hoc language constructs with a general powerful abstraction
206
207
* capability that can express them. Macros are also a more disciplined and
207
208
* powerful replacement for compiler plugins.
208
209
*
209
210
* '''Why control it?''' For their very power, macros can lead to code that is hard
210
211
* to debug and understand.
212
+ *
213
+ * This is not required by Scala 3 macros as `inline` controls the basic generative macros.
214
+ * More add-hoc macros must contain the import of reflection in thier code, making this import redundant.
211
215
*/
212
216
implicit lazy val macros : macros = languageFeature.experimental.macros
213
217
You can’t perform that action at this time.
0 commit comments