Skip to content

internal compiler error when matching Text to NodeSeq #2883

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

Closed
scabug opened this issue Jan 10, 2010 · 7 comments
Closed

internal compiler error when matching Text to NodeSeq #2883

scabug opened this issue Jan 10, 2010 · 7 comments
Assignees

Comments

@scabug
Copy link

scabug commented Jan 10, 2010

When trying to match a NodeSeq with a Text element case the following internal compiler error is thrown:

Exception in thread "main" scala.tools.nsc.symtab.Types$$TypeError: too many arguments for method body%2: ()java.lang.Object

Example source and full debug compiler output are attached.

This code worked fine in 2.7.7 but causes an internal compiler error in 2.8.0.r20397-b20100107020241 and 2.8.0.r20423-b20100109020145. There are potentially problems with the approach taken in the example code so it's possible it should still throw a compile error, but never an internal compiler error.

Removing the Text case or changing the code to iterate over the NodeSeq and match each individual node (as in the commented out section) allows the code to compile fine.

@scabug
Copy link
Author

scabug commented Jan 10, 2010

Imported From: https://issues.scala-lang.org/browse/SI-2883?orig=1
Reporter: James McCalden (jmccalden)
Attachments:

@scabug
Copy link
Author

scabug commented Jan 10, 2010

James McCalden (jmccalden) said:
Example code

@scabug
Copy link
Author

scabug commented Jan 10, 2010

James McCalden (jmccalden) said:
Compiler output with logging="debug"

@scabug
Copy link
Author

scabug commented Jan 10, 2010

@retronym said:
Probably a duplicate of #2310

@scabug
Copy link
Author

scabug commented Jan 10, 2010

James McCalden (jmccalden) said:
I did wonder about that, but given the work arounds (which are to just stop trying to match a Text against a NodeSeq) I thought it might be more specific to the scala.xml classes. No way to be sure without knowing more about how match works.

@scabug
Copy link
Author

scabug commented Jan 11, 2010

@lindydonna said:
Paul, can you confirm if this is a duplicate of SI-2310?

@scabug
Copy link
Author

scabug commented Jan 11, 2010

@paulp said:
It isn't actually, except in the broadest sense that extractors are super buggy. Fixed in r20450.

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

2 participants