File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
docs/docs/reference/metaprogramming Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -602,12 +602,12 @@ val b: String = defaultOf("string")
602
602
```
603
603
604
604
### Defining a macro and using it in a single project
605
- It is possible to define macros and use them in the same project as the implementation of
606
- the macros does not depend on code in the file where it used. It might still depend
607
- on types and quoted code that refers to the use-site file.
605
+ It is possible to define macros and use them in the same project as long as the implementation
606
+ of the macros does not have run-time dependencies on code in the file where it is used.
607
+ It might still have compile-time dependencies on types and quoted code that refers to the use-site file.
608
608
609
- To provide this functionality Dotty provides a transparent compilation mode were files that
610
- expand try to expand a macro but fail because the macro has not been compiled yet are suspended.
609
+ To provide this functionality Dotty provides a transparent compilation mode where files that
610
+ try to expand a macro but fail because the macro has not been compiled yet are suspended.
611
611
If there are any suspended files when the compilation ends, the compiler will automatically restart
612
612
compilation of the suspended files using the output of the previous (partial) compilation as macro classpath.
613
613
In case all files are suspended due to cyclic dependencies the compilation will fail with an error.
You can’t perform that action at this time.
0 commit comments