-
Notifications
You must be signed in to change notification settings - Fork 61
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
Misc cleanup of errors and docs #1720
base: main
Are you sure you want to change the base?
Changes from 2 commits
b0bc2d1
2f5faef
0345ff0
b799641
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,10 +123,10 @@ object ErrorMessageFormatter { | |
*/ | ||
private fun divisionByZero(error: PError): String { | ||
val dividendType = error.getOrNull("DIVIDEND_TYPE", PType::class.java) | ||
val dividendTypeStr = prepare(dividendType.toString(), " of ") | ||
val dividendTypeStr = prepare(dividendType.toString(), " of type ") | ||
val dividend = error.getOrNull("DIVIDEND", String::class.java) | ||
val dividendStr = prepare(dividend.toString(), " -- ", " / 0") | ||
return "Division$dividendTypeStr by zero$dividendStr$dividendTypeStr." | ||
val dividendStr = prepare(dividend.toString(), " ") | ||
return "Cannot divide$dividendStr$dividendTypeStr by zero." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (self-review) error message follows what's suggested from PError. This new error allows for reuse for |
||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,8 @@ public class Identifier private constructor( | |
) : Iterable<Identifier.Simple> { | ||
|
||
/** | ||
* Returns the unqualified name part. | ||
* Returns the right-most simple identifier of the qualified identifier. For example, for an identifier | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (self-review) copied from AST's Identifier javadoc |
||
* a.b.c this method would return c. | ||
*/ | ||
public fun getIdentifier(): Simple = identifier | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(self-review) lists should be
@NotNull
rather than@Nullable
. Taken from #1692