Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why equalityMethodSpecification don't judge bType's Kind()? #657

Open
kafkalm opened this issue Feb 11, 2022 · 0 comments
Open

Why equalityMethodSpecification don't judge bType's Kind()? #657

kafkalm opened this issue Feb 11, 2022 · 0 comments

Comments

@kafkalm
Copy link

kafkalm commented Feb 11, 2022

in equal_method.go: line 38

func (this *equalityMethodSpecification) bothAreSameType() bool {
	this.aType = reflect.TypeOf(this.a)  
	if this.aType == nil {  
		return false  
	}  
	if this.aType.Kind() == reflect.Ptr {  
		this.aType = this.aType.Elem()  
	}  
	this.bType = reflect.TypeOf(this.b)  
	return this.aType == this.bType  
}

if bType is a pointer, it always return false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant