-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for of package.foo
#134
Comments
Ouch, this even broke the build… |
I feel like a better way to implement |
Sure, I agree, that's better. It's what I do for types. |
I suspect that would be slightly better from the perspective of writing a backend. What I have now is this pattern in a couple places: if (that.receiverExpression is Package) {
// treat as BaseExpression using that.nameAndArgs
} |
Oh, I didn’t even realize that |
+1 for this feature! Compilation currently fails with:
|
For now my incredibly awesome workaround is: diff --git i/source/ceylon/ast/redhat/CaseTypes.ceylon w/source/ceylon/ast/redhat/CaseTypes.ceylon
index 4d9ff8b..e1cb29a 100644
--- i/source/ceylon/ast/redhat/CaseTypes.ceylon
+++ w/source/ceylon/ast/redhat/CaseTypes.ceylon
@@ -29,7 +29,7 @@ shared CaseTypes caseTypesToCeylon(JCaseTypes caseTypes, Anything(JNode, Node) u
(This trick originally comes from ceylon.formatter.)
*/
assert (nonempty cases
- = concatenate(CeylonIterable(caseTypes.types), CeylonIterable(caseTypes.baseMemberExpressions))
+ = concatenate(CeylonIterable(caseTypes.types), CeylonIterable(caseTypes.baseMemberExpressions).narrow<JBaseMemberExpression>())
.sort(byIncreasing(compose(Token.tokenIndex, JNode.token))));
PrimaryType|MemberName primaryTypeOrMemberNameToCeylon(JStaticType|JBaseMemberExpression that, Anything(JNode, Node) update = noop) {
switch (that) |
Until we properly implement #134, this hack (copied from @jvasileff’s GitHub comment [1]) at least lets ceylon.ast.redhat compile. [1]: #134 (comment)
I’ve added your workaround for now (with you as Git author, since I literally just pasted your diff into |
I’m postponing this issue, because it’s not clear to me what the proper fix should look like and I don’t want to block the 1.3.3 release any longer. |
See eclipse-archived/ceylon#4368 and eclipse-archived/ceylon@7a102d2.
The text was updated successfully, but these errors were encountered: