File tree 5 files changed +16
-4
lines changed
src/dotty/tools/dotc/core/classfile
tests/pos-java-interop-separate/i3533 5 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -261,11 +261,11 @@ class ClassfileParser(
261
261
addConstructorTypeParams(denot)
262
262
}
263
263
264
- denot.info = cook.apply( pool.getType(in.nextChar) )
264
+ denot.info = pool.getType(in.nextChar)
265
265
if (isEnum) denot.info = ConstantType (Constant (sym))
266
266
if (isConstructor) normalizeConstructorParams()
267
267
setPrivateWithin(denot, jflags)
268
- denot.info = translateTempPoly(parseAttributes(sym, denot.info))
268
+ denot.info = translateTempPoly(cook.apply( parseAttributes(sym, denot.info) ))
269
269
if (isConstructor) normalizeConstructorInfo()
270
270
271
271
if ((denot is Flags .Method ) && (jflags & JAVA_ACC_VARARGS ) != 0 )
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ class CompilationTests extends ParallelTesting {
69
69
),
70
70
scala2Mode
71
71
) +
72
+ compileFilesInDir(" ../tests/pos-special/i3273" , defaultOptions) +
72
73
compileFilesInDir(" ../tests/pos-special/spec-t5545" , defaultOptions) +
73
74
compileFilesInDir(" ../tests/pos-special/strawman-collections" , defaultOptions) +
74
75
compileFile(" ../scala2-library/src/library/scala/collection/immutable/IndexedSeq.scala" , defaultOptions) +
@@ -109,7 +110,6 @@ class CompilationTests extends ParallelTesting {
109
110
implicit val testGroup : TestGroup = TestGroup (" posTwice" )
110
111
compileFile(" ../tests/pos/Labels.scala" , defaultOptions) +
111
112
compileFilesInDir(" ../tests/pos-java-interop" , defaultOptions) +
112
- compileFilesInDir(" ../tests/pos-java-interop-separate" , defaultOptions) +
113
113
compileFile(" ../tests/pos/t2168.scala" , defaultOptions) +
114
114
compileFile(" ../tests/pos/erasure.scala" , defaultOptions) +
115
115
compileFile(" ../tests/pos/Coder.scala" , defaultOptions) +
Original file line number Diff line number Diff line change @@ -376,7 +376,10 @@ trait ParallelTesting extends RunnerOrchestration { self =>
376
376
377
377
// Compile with a try to catch any StackTrace generated by the compiler:
378
378
try {
379
- driver.process(allArgs ++ files.map(_.getAbsolutePath), reporter = reporter)
379
+ // If a test contains a Java file that cannot be parsed by Dotty's Java source parser, its
380
+ // name must contain the string "JAVA_ONLY".
381
+ val dottyFiles = files.filterNot(_.getName.contains(" JAVA_ONLY" )).map(_.getAbsolutePath)
382
+ driver.process(allArgs ++ dottyFiles, reporter = reporter)
380
383
381
384
val javaFiles = files.filter(_.getName.endsWith(" .java" )).map(_.getAbsolutePath)
382
385
val javaErrors = compileWithJavac(javaFiles)
Original file line number Diff line number Diff line change
1
+ object Test {
2
+ TryMe_JAVA_ONLY_1 .ifYouCan(list => list.size())
3
+ }
Original file line number Diff line number Diff line change
1
+ import java .util .function .Function ;
2
+
3
+ public class TryMe_JAVA_ONLY_1 {
4
+ public static void ifYouCan (Function <java .util .List , Integer > f ) {
5
+ }
6
+ }
You can’t perform that action at this time.
0 commit comments