hongbo/linked hashset test
- failed: the location of first argument cannot be None
cc @lijunchen
Observed Problems in linked_hash_set_test.mbt
-
Comment Misplacement: The commented line (
// @json.inspect!([..h])) has been uncommented and moved to the next line (@json.inspect!([..h])). This change might not be intentional, and it's important to ensure that this line is supposed to be executed as code. If it's for debugging purposes and you wish to keep it as a comment, revert it back to a comment. -
Potential Redundancy: The line
@json.inspect!([..h])might be redundant since you are already inspectingvright after it, andvis set to[..h]. If the intention was to inspect the set before converting it to an array, it would make more sense to keep both lines. However, if inspecting the arrayvis sufficient, consider removing@json.inspect!([..h])to avoid redundant outputs. -
Syntax in Comments: Ensure that any code-like syntax within comments is purely for documentation purposes and does not mislead future developers into thinking it's executable code. In this case, it seems like a debugging statement was commented out and then uncommented, which could lead to confusion if not properly documented.
Suggestions
-
Review Debugging Statements: Ensure that all debugging statements (like
@json.inspect!) are necessary and serve a clear purpose. If they are no longer needed, remove them to keep the code clean and free of potential clutter. -
Document Changes: If the uncommenting of
@json.inspect!([..h])was intentional, add a comment explaining why this line is necessary or what it helps to debug. This will aid in understanding the code better in the future. -
Check for Redundancy: If the output of
@json.inspect!([..h])is the same as@json.inspect!(v, content=[1, 2, 3, 4, 5]), consider removing the former to avoid redundant outputs in the testing phase.
These observations and suggestions aim to enhance clarity, reduce redundancy, and ensure that debugging statements are both necessary and well-documented.
The array spread's location info looks lost; I've filed an issue in moonc repo.
fixed in master