Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
7fa1e87d
Commit
7fa1e87d
authored
Jun 25, 2016
by
Tim Hockin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify convertible check - same type is OK
This is to clarify the code. No actual effect at the moment, but I manually verified this in the case of identical types.
parent
ed59210f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
conversion.go
cmd/libs/go2idl/conversion-gen/generators/conversion.go
+3
-6
No files found.
cmd/libs/go2idl/conversion-gen/generators/conversion.go
View file @
7fa1e87d
...
@@ -309,6 +309,9 @@ func isDirectlyConvertible(in, out *types.Type, manualConversions conversionFunc
...
@@ -309,6 +309,9 @@ func isDirectlyConvertible(in, out *types.Type, manualConversions conversionFunc
return
isConvertible
(
in
,
out
.
Underlying
,
manualConversions
)
return
isConvertible
(
in
,
out
.
Underlying
,
manualConversions
)
}
}
if
in
==
out
{
return
true
}
if
in
.
Kind
!=
out
.
Kind
{
if
in
.
Kind
!=
out
.
Kind
{
return
false
return
false
}
}
...
@@ -318,12 +321,6 @@ func isDirectlyConvertible(in, out *types.Type, manualConversions conversionFunc
...
@@ -318,12 +321,6 @@ func isDirectlyConvertible(in, out *types.Type, manualConversions conversionFunc
// We don't support conversion of other types yet.
// We don't support conversion of other types yet.
return
false
return
false
}
}
switch
out
.
Kind
{
case
types
.
Builtin
,
types
.
Struct
,
types
.
Map
,
types
.
Slice
,
types
.
Pointer
:
default
:
// We don't support conversion of other types yet.
return
false
}
switch
in
.
Kind
{
switch
in
.
Kind
{
case
types
.
Builtin
:
case
types
.
Builtin
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment