Skip to content

Commit

Permalink
Convert tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
gzuidhof committed Sep 28, 2024
1 parent b12fce8 commit 7fd8185
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions tygo/testdata/fixtures/generic.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ fallback_type: "unknown"
```go
// Comment for UnionType
type UnionType interface {
// Comment for fields are possible
uint64 | string | *bool // comment after
// Comment for fields are possible
uint64 | string | *bool // comment after

// Comment for a method
SomeMethod() string
// Comment for a method
SomeMethod() string
}

type Derived interface {
~int | string // Line comment
~int | string // Line comment
}

type Any interface {
string | any
string | any
}

type Empty interface{}
Expand Down Expand Up @@ -58,30 +58,30 @@ fallback_type: "unknown"
```go

type ValAndPtr[V any, PT *V, Unused ~uint64] struct {
Val V
// Comment for ptr field
Ptr PT // ptr line comment
Val V
// Comment for ptr field
Ptr PT // ptr line comment
}

type ABCD[A, B string, C UnionType, D int64 | bool] struct {
A A `json:"a"`
B B `json:"b"`
C C `json:"c"`
D D `json:"d"`
A A `json:"a"`
B B `json:"b"`
C C `json:"c"`
D D `json:"d"`
}

type Foo[A string | uint64, B *A] struct {
Bar A
Boo B
Bar A
Boo B
}

type WithFooGenericTypeArg[A Foo[string, *string]] struct {
SomeField A `json:"some_field"`
SomeField A `json:"some_field"`
}

// Should not be output as it's a function
func (f Foo[int, Derived]) DoSomething() {
panic("something")
panic("something")
}
```

Expand Down Expand Up @@ -112,7 +112,7 @@ export interface WithFooGenericTypeArg<A extends Foo<string, string | undefined>

```go
type Single[S string | uint] struct {
Field S
Field S
}

type SingleSpecific = Single[string]
Expand Down

0 comments on commit 7fd8185

Please sign in to comment.