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

fix: Corrected the comparison between an untyped constant and an interface #1732

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

ltzmaxwell
Copy link
Contributor

@ltzmaxwell ltzmaxwell commented Mar 5, 2024

This error is identified by #1426, here is a quick fix.
It can also be seen as the beginning of a refactoring effort on #1426 to break it down into smaller ones.

Reproduction of this issue:

package main

func foo() uint64 {
	return 100
}

func bar() interface{} {
	return foo()
}

func main() {
	println(100 == bar())

	println(100 == foo())

	println(uint64(100) == bar())

}

https://go.dev/play/p/ftkZeNziwdM

@ltzmaxwell ltzmaxwell requested review from a team as code owners March 5, 2024 02:35
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Mar 5, 2024
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.51%. Comparing base (bfc9e2c) to head (1c0a58b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1732      +/-   ##
==========================================
+ Coverage   44.82%   47.51%   +2.69%     
==========================================
  Files         459      388      -71     
  Lines       67677    61331    -6346     
==========================================
- Hits        30338    29144    -1194     
+ Misses      34797    29747    -5050     
+ Partials     2542     2440     -102     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ltzmaxwell ltzmaxwell changed the title Fix: Corrected the comparison between an untyped constant and an interface to address unexpected behavior Fix: Corrected the comparison between an untyped constant and an interface Mar 5, 2024
@ltzmaxwell ltzmaxwell changed the title Fix: Corrected the comparison between an untyped constant and an interface fix: Corrected the comparison between an untyped constant and an interface Mar 5, 2024
@zivkovicmilos
Copy link
Member

zivkovicmilos commented Mar 27, 2024

Looking into why the CI is failing now, please wait for the merge

EDIT:
Merged master into the branch and the problem was fixed, it was failing locally as well 🤷‍♂️

@zivkovicmilos zivkovicmilos merged commit 55056c5 into gnolang:master Mar 27, 2024
185 of 187 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants