Skip to content

Conversation

@Andarist
Copy link
Contributor

@jakebailey mentioned this is something the team is considering to do.

# Conflicts:
#	testdata/baselines/reference/submodule/compiler/mappedTypeIndexedAccessConstraint.types
#	testdata/baselines/reference/submodule/compiler/mappedTypeIndexedAccessConstraint.types.diff
#	testdata/baselines/reference/submodule/compiler/objectLiteralIndexerErrors.types.diff
#	testdata/baselines/reference/submodule/compiler/objectLiteralIndexers.types.diff
#	testdata/baselines/reference/submodule/compiler/propertiesAndIndexers.types.diff
#	testdata/baselines/reference/submodule/conformance/objectTypeWithStringNamedNumericProperty.types.diff
return -1
}
int1, err1 := strconv.Atoi(s1.Name)
int2, err2 := strconv.Atoi(s2.Name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid it's not that simple. Consider symbols named "0", "00", and "000" and so on! We'd want a check that the symbol round-trips as a number. Which unfortunately is a more expensive check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I can implement that - as long as it's even something you'd like to see getting in. At the moment, the main user-oriented improvement in this is a better error message here: testdata/baselines/reference/submodule/conformance/arityAndOrderCompatibility01.errors.txt. But at the same time, this test case isn't exercising a particularly popular pattern.

@sandersn
Copy link
Member

@Andarist it sounds like this change might be too expensive if you put in the work to correct it. Do you want to keep working on this PR? Or should we close it?

@Andarist Andarist closed this May 29, 2025
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

Successfully merging this pull request may close these issues.

3 participants