-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Added checking of casting initialization
- Loading branch information
Showing
8 changed files
with
52 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package casting | ||
|
||
import ( | ||
"factory/casting/nested" | ||
) | ||
|
||
func ToNestedMyInt() { | ||
_ = nested.MyInt(1) // want `Use factory for nested.MyInt` | ||
} | ||
|
||
type Struct struct { | ||
Field int | ||
} | ||
|
||
func ToNestedStrut() { | ||
l := Struct{ | ||
Field: 1, | ||
} | ||
|
||
_ = nested.Struct(l) // want `Use factory for nested.Struct` | ||
} | ||
|
||
func ToLocal() { | ||
n := nested.NewStruct() | ||
|
||
_ = Struct(n) | ||
} |
2 changes: 2 additions & 0 deletions
2
...ry/unimplemented/casting/nested/nested.go → ...data/src/factory/casting/nested/nested.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package nested | ||
|
||
type MyInt int | ||
|
||
type Struct struct { | ||
Field int | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.