Skip to content

Fix #10567: avoid forcing symbols in classfile parser #11471

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 2 commits into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ class ClassfileParser(
if (argsBuf != null) argsBuf += arg
}
accept('>')
if (skiptvs) tp else tp.appliedTo(argsBuf.toList)
if (skiptvs) tp else AppliedType(tp, argsBuf.toList)
}
else tp
case tp =>
Expand Down
4 changes: 4 additions & 0 deletions tests/pos/i10567/Main_2.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
object Test {
val bldr = SchemaBuilder_1.builder()
val oops = bldr.fixed("foo")
}
17 changes: 17 additions & 0 deletions tests/pos/i10567/SchemaBuilder_1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
public class SchemaBuilder_1 {
public static class Schema {}

public static TypeBuilder<Schema> builder() {
throw new UnsupportedOperationException();
}

public static class NamespacedBuilder<R, S extends NamespacedBuilder<R, S>> {}

public static class FixedBuilder<R> extends NamespacedBuilder<R, FixedBuilder<R>> {}

public static class TypeBuilder<R> {
public FixedBuilder<R> fixed(String name) {
throw new UnsupportedOperationException();
}
}
}
5 changes: 5 additions & 0 deletions tests/pos/i10945/Built_1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public interface Built_1 {
interface Builder<A> extends GeneralBuilder<Built_1, Builder<A>> {}
}

interface GeneralBuilder<R, B extends GeneralBuilder<R, B>> {}
1 change: 1 addition & 0 deletions tests/pos/i10945/Test_2.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
def useBuilder[A](builder: Built_1.Builder[A]): Unit = ???