Skip to content

ClassfileParser: Java8 bytecode (fixes #83) #90

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

Merged
merged 3 commits into from
Mar 22, 2014

Conversation

samuelgruetter
Copy link
Contributor

I went through all commits in

git log v2.10.0..v2.10.4-RC3 --oneline -- src/compiler/scala/tools/nsc/symtab/classfile

and applied them to dotty where possible. Running

bin/dotc tests/pos/test.scala -java-home /usr/lib/jvm/jre-1.8.0

now succeeds, no more errors like in #83

@samuelgruetter
Copy link
Contributor Author

review by @odersky, @retronym

@odersky
Copy link
Contributor

odersky commented Mar 22, 2014

Excellent. The changes look all good to me.

@retronym
Copy link
Member

LGTM.

That's a good start. The type checker and refchecks will need to interpret the default method flag (no need to override it, SAM types can be formed for Java interfaces with some defaults), but you'll pick these up as you import test cases.

case tpnme.CodeATTR =>
if (sym.owner is Flags.Interface) {
sym.setFlag(Flags.DefaultMethod)
ctx.log(s"$sym in ${sym.owner} is a java8+ default method.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is log worthy, one can see this on the flags of the method later on.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added this because scalac also logs it

odersky added a commit that referenced this pull request Mar 22, 2014
ClassfileParser: Java8 bytecode (fixes #83)
@odersky odersky merged commit 398431a into scala:master Mar 22, 2014
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

Successfully merging this pull request may close these issues.

3 participants