Skip to content

Commit 510c6ba

Browse files
Apply suggestions from code review
1 parent 2cf2b28 commit 510c6ba

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2888,11 +2888,12 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
28882888
def Transparent: Flags = dotc.core.Flags.Transparent
28892889

28902890
// Keep: aligned with Quotes's `newMethod` doc
2891-
private[QuotesImpl] def validMethodFlags: Flags = Private | Protected | Override | Deferred | Final | Method | Implicit | Given | Local | AbsOverride | Synthetic | Artifact | ExtensionMethod | Exported | Erased | Infix | Invisible | JavaStatic
2891+
private[QuotesImpl] def validMethodFlags: Flags = Private | Protected | Override | Deferred | Final | Method | Implicit | Given | Local | AbsOverride | JavaStatic | Synthetic | Artifact // Flags that could be allowed: Synthetic | ExtensionMethod | Exported | Erased | Infix | Invisible
28922892
// Keep: aligned with Quotes's `newVal` doc
2893-
private[QuotesImpl] def validValFlags: Flags = Private | Protected | Override | Deferred | Final | Param | Implicit | Lazy | Mutable | Local | ParamAccessor | Module | Package | Case | CaseAccessor | Given | Enum | AbsOverride | Synthetic | Artifact | Erased | Invisible | JavaStatic
2893+
private[QuotesImpl] def validValFlags: Flags = Private | Protected | Override | Deferred | Final | Param | Implicit | Lazy | Mutable | Local | ParamAccessor | Module | Package | Case | CaseAccessor | Given | Enum | AbsOverride | JavaStatic | Synthetic | Artifact // Flags that could be added: Synthetic | Erased | Invisible
2894+
28942895
// Keep: aligned with Quotes's `newBind` doc
2895-
private[QuotesImpl] def validBindFlags: Flags = Case | Implicit | Given | Erased
2896+
private[QuotesImpl] def validBindFlags: Flags = Case // Flags that could be allowed: Implicit | Given | Erased
28962897
end Flags
28972898

28982899
given FlagsMethods: FlagsMethods with

library/src/scala/quoted/Quotes.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3785,7 +3785,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
37853785
* @param parent The owner of the method
37863786
* @param name The name of the method
37873787
* @param tpe The type of the method (MethodType, PolyType, ByNameType)
3788-
* @param flags extra flags to with which the symbol should be constructed. `Method` flag will be added. Can be `Private | Protected | Override | Deferred | Final | Method | Implicit | Given | Local | AbsOverride | Synthetic | Artifact | ExtensionMethod | Exported | Erased | Infix | Invisible | JavaStatic`
3788+
* @param flags extra flags to with which the symbol should be constructed. `Method` flag will be added. Can be `Private | Protected | Override | Deferred | Final | Method | Implicit | Given | Local | JavaStatic | Synthetic | Artifact`
37893789
* @param privateWithin the symbol within which this new method symbol should be private. May be noSymbol.
37903790
*/
37913791
// Keep: `flags` doc aligned with QuotesImpl's `validMethodFlags`
@@ -3802,7 +3802,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
38023802
* @param parent The owner of the val/var/lazy val
38033803
* @param name The name of the val/var/lazy val
38043804
* @param tpe The type of the val/var/lazy val
3805-
* @param flags extra flags to with which the symbol should be constructed. Can be `Private | Protected | Override | Deferred | Final | Param | Implicit | Lazy | Mutable | Local | ParamAccessor | Module | Package | Case | CaseAccessor | Given | Enum | AbsOverride | Synthetic | Artifact | Erased | Invisible | JavaStatic`
3805+
* @param flags extra flags to with which the symbol should be constructed. Can be `Private | Protected | Override | Deferred | Final | Param | Implicit | Lazy | Mutable | Local | ParamAccessor | Module | Package | Case | CaseAccessor | Given | Enum | JavaStatic | Synthetic | Artifact`
38063806
* @param privateWithin the symbol within which this new method symbol should be private. May be noSymbol.
38073807
* @note As a macro can only splice code into the point at which it is expanded, all generated symbols must be
38083808
* direct or indirect children of the reflection context's owner.
@@ -3818,7 +3818,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
38183818
*
38193819
* @param parent The owner of the binding
38203820
* @param name The name of the binding
3821-
* @param flags extra flags to with which the symbol should be constructed. `Case` flag will be added. Can be `Case | Implicit | Given | Erased`
3821+
* @param flags extra flags to with which the symbol should be constructed. `Case` flag will be added. Can be `Case`
38223822
* @param tpe The type of the binding
38233823
* @note As a macro can only splice code into the point at which it is expanded, all generated symbols must be
38243824
* direct or indirect children of the reflection context's owner.

0 commit comments

Comments
 (0)