Skip to content

Commit a44086c

Browse files
committed
Update extension method syntax
1 parent ed2f633 commit a44086c

File tree

14 files changed

+53
-48
lines changed

14 files changed

+53
-48
lines changed
Submodule shapeless added at 63c5e0a

tasty/src/dotty/tools/tasty/experimental/bridge/AnnotationOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ trait AnnotationOps extends Core with
1313

1414
def unapply(annot: Annotation)(given Context): Option[Symbol] = internal.Annotation_Child_unapply(annot)
1515

16-
given AnnotationOps: (annot: Annotation) with
16+
given AnnotationOps: (annot: Annotation) extended with
1717
def tree(given Context): tpd.Tree = internal.Annotation_tree(annot)
1818
def symbol(given Context): Symbol = internal.Annotation_symbol(annot)

tasty/src/dotty/tools/tasty/experimental/bridge/CommentOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import reflect.ClassTag
44

55
trait CommentOps extends Core with
66

7-
given CommentOps: (comment: Comment) with
7+
given CommentOps: (comment: Comment) extended with
88
def raw: String = internal.Comment_raw(comment)
99
def span: Span = internal.Comment_span(comment)

tasty/src/dotty/tools/tasty/experimental/bridge/ConstantOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ trait ConstantOps extends Core with
2121
final val EnumTag = internal.Constants_EnumTag
2222
end Constants
2323

24-
given ConstantOps: (c: Constant) with
24+
given ConstantOps: (c: Constant) extended with
2525
def tag: Int = internal.Constant_tag(c)
2626
def intValue: Int = internal.Constant_intValue(c)
2727
def booleanValue: Boolean = internal.Constant_booleanValue(c)

tasty/src/dotty/tools/tasty/experimental/bridge/ContextOps.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import java.nio.file.Path
55

66
trait ContextOps extends Core with
77

8-
given ContextOps: (ctx: Context) with
8+
given ContextOps: (ctx: Context) extended with
99
def log(msg: => String, sourcePos: SourcePosition): Unit = internal.Context_log(ctx, msg, sourcePos)
1010
def source: SourceFile = internal.Context_source(ctx)
1111
def docCtx: Option[ContextDocstrings] = internal.Context_docCtx(ctx)
1212
def withOwner(owner: Symbol): Context = internal.Context_withOwner(ctx, owner)
1313
def withSource(source: SourceFile): Context = internal.Context_withSource(ctx, source)
1414

15-
given ContextDocstringsOps: (ctx: ContextDocstrings) with
15+
given ContextDocstringsOps: (ctx: ContextDocstrings) extended with
1616
def docstring(sym: Symbol): Option[Comment] = internal.ContextDocstrings_docstring(ctx, sym)

tasty/src/dotty/tools/tasty/experimental/bridge/FlagOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ trait FlagOps extends Core with
4343
val Open: Flag = internal.Flags_Open
4444
end Flags
4545

46-
given FlagSetOps: (flags: FlagSet)
46+
given FlagSetOps: (flags: FlagSet) extended with
4747
def is(flag: Flag): Boolean = internal.FlagSet_is(flags, flag)
4848
def is(flag: Flag, butNot: FlagSet): Boolean = internal.FlagSet_is(flags, flag, butNot)
4949
def &~(flag: Flag): FlagSet = internal.FlagSet_&~(flags, flag)

tasty/src/dotty/tools/tasty/experimental/bridge/NameOps.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ trait NameOps extends Core with
3535
def unapply(name: DerivedName): Option[(TermName, Int)] = internal.OuterSelectName_unapply(name)
3636

3737

38-
given NameOps: (name: Name) with
38+
given NameOps: (name: Name) extended with
3939
def toTermName: TermName = internal.Name_toTermName(name)
4040
def isEmpty: Boolean = internal.Name_isEmpty(name)
4141
def isTypeName: Boolean = internal.Name_isTypeName(name)
4242
def isTermName: Boolean = !name.isTypeName
4343

44-
given TermNameOps: (name: TermName) with
44+
given TermNameOps: (name: TermName) extended with
4545
def tag: Int = internal.TermName_tag(name)
4646

47-
given SimpleNameOps: (name: SimpleName) with
47+
given SimpleNameOps: (name: SimpleName) extended with
4848
def toUTF8: Array[Byte] = internal.SimpleName_toUTF8(name)

tasty/src/dotty/tools/tasty/experimental/bridge/PositionOps.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ import reflect.ClassTag
44

55
trait PositionOps extends Core with
66

7-
given PositionedOps: (positioned: Positioned) with
7+
given PositionedOps: (positioned: Positioned) extended with
88

99
/** True if x's position shouldn't be reconstructed automatically from its initial span
1010
*/
1111
def alwaysNeedsPos: Boolean = internal.Positioned_alwaysNeedsPos(positioned)
1212

13-
given SourcePositionOps: (pos: SourcePosition) with
13+
given SourcePositionOps: (pos: SourcePosition) extended with
1414
def line: Int = internal.SourcePosition_line(pos)
1515

1616
object Span with
1717
val empty: Span = internal.Span_empty
1818
val noSpan: Span = internal.Span_noSpan
1919

20-
given SpanOps: (span: Span) with
20+
given SpanOps: (span: Span) extended with
2121
def coords: Long = internal.Span_coords(span)
2222
def isSynthetic: Boolean = internal.Span_isSynthetic(span)
2323
def toSynthetic: Span = internal.Span_toSynthetic(span)

tasty/src/dotty/tools/tasty/experimental/bridge/SignatureOps.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ trait SignatureOps extends Core with
1414

1515
def unapply(signature: Signature): (List[ParamSig], TypeName) = internal.Signature_unapply(signature)
1616

17-
given ParamSigOps: (paramSig: ParamSig) with
17+
given ParamSigOps: (paramSig: ParamSig) extended with
1818
def fold[A](onInt: Int => A, onTypeName: TypeName => A): A = internal.Signature_ParamSig_fold(paramSig)(onInt, onTypeName)
1919
def foldInt(onInt: IntToInt, onTypeName: ToInt[TypeName]): Int = internal.Signature_ParamSig_foldInt(paramSig)(onInt, onTypeName)
2020

2121
end Signature
2222

23-
given SignatureOps: (signature: Signature) with
23+
given SignatureOps: (signature: Signature) extended with
2424
def isNotAMethod: Boolean = internal.Signature_isNotAMethod(signature)

tasty/src/dotty/tools/tasty/experimental/bridge/SourceFileOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ trait SourceFileOps extends Core with
77
object SourceFile with
88
val noSource: SourceFile = internal.SourceFile_noSource
99

10-
given SourceFileOps: (source: SourceFile) with
10+
given SourceFileOps: (source: SourceFile) extended with
1111
def path: String = internal.SourceFile_path(source)
1212
def exists: Boolean = internal.SourceFile_exists(source)

0 commit comments

Comments
 (0)