Skip to content
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

Inner class of a generic class #107

Open
Aurel300 opened this issue Jul 28, 2023 · 1 comment
Open

Inner class of a generic class #107

Aurel300 opened this issue Jul 28, 2023 · 1 comment

Comments

@Aurel300
Copy link
Contributor

javap scala.Option produces:

public abstract class scala.Option<A> implements scala.collection.IterableOnce<A>, scala.Product, java.io.Serializable {
  // ...
  public final scala.Option<A>.WithFilter withFilter(scala.Function1<A, java.lang.Object>);
  // ...
}

The type scala.Option<A>.WithFilter cannot be parsed with the current grammar, so:

unexpected token `...  final scala.Option<A> <<< . >>> WithFilter withFilter( ...` at offset 1632, expected one of `["\"\\\"\"", "\"&\"", "\")\"", "\",\"", "\"...\"", "\";\"", "\">\"", "\"[\"", "\"implements\"", "\"{\"", "r#\"[a-zA-Z_$][a-zA-Z0-9_$]*\"#"]`

I assume this should be fixed by extending ClassRef, which currently only expects generics at the end of a dotpath, not in the middle:

ClassRef: ClassRef = {
<name:DotId> => ClassRef { name, generics: vec![] },
<name:DotId> "<" <generics:Comma<RefType>> ">" => ClassRef { <> },
};

@Aurel300
Copy link
Contributor Author

Ah, this is actually resolved by #102.

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

No branches or pull requests

1 participant