-
Notifications
You must be signed in to change notification settings - Fork 24
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
Implement New object definition #175
Merged
NeilKleistGao
merged 63 commits into
hkust-taco:new-definition-typing
from
NeilKleistGao:new-object-definition
Sep 18, 2023
Merged
Implement New object definition #175
NeilKleistGao
merged 63 commits into
hkust-taco:new-definition-typing
from
NeilKleistGao:new-object-definition
Sep 18, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LPTK
reviewed
Aug 25, 2023
LPTK
reviewed
Sep 9, 2023
LPTK
reviewed
Sep 9, 2023
LPTK
reviewed
Sep 11, 2023
LPTK
reviewed
Sep 11, 2023
LPTK
reviewed
Sep 11, 2023
LPTK
reviewed
Sep 11, 2023
LPTK
reviewed
Sep 11, 2023
LPTK
reviewed
Sep 16, 2023
I think a good test to add would be this: abstract class Foo: Int -> Int {
val x = f
fun f = this(0)
}
//│ ╔══[ERROR] Cannot access `this` while initializing field x
//│ ║ l.6: val x = f
//│ ║ ^^^^^
//│ ╟── The access to `this` is here
//│ ║ l.7: fun f = this(0)
//│ ╙── ^^^^
//│ abstract class Foo: Int -> Int {
//│ fun f: nothing
//│ let x: nothing
//│ } Since it accesses |
Co-authored-by: Lionel Parreaux <lionel.parreaux@gmail.com>
LPTK
reviewed
Sep 17, 2023
LPTK
approved these changes
Sep 17, 2023
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.
Ok, I think I'm happy enough with the changes now!
@NeilKleistGao please fix the conflicts and close the remaining conversations, then please merge (with a merge commit). |
fd2215a
into
hkust-taco:new-definition-typing
1 check passed
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issues:
In this PR:
val
s rather thanlet
sval
sconstructor(...)
and has noval
, the parameter is available only in the constructor$unapply
to non-plain classes(i.e.,class ClassName(...)
)$unapply
method invocationsCode generation encountered an error: unresolved symbol
if members only have type signaturesvirtual
keyword forfun
s andval
s.this
when accessing the virtual membersthis
is forbidden in the constructor statements and RHS ofval
s, including directly and indirectlythis
is still allowed if the members do not refer tothis