File tree Expand file tree Collapse file tree 5 files changed +16
-4
lines changed
src/dotty/tools/dotc/core/classfile
tests/pos-java-interop-separate/i3533 Expand file tree Collapse file tree 5 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -261,11 +261,11 @@ class ClassfileParser(
261261 addConstructorTypeParams(denot)
262262 }
263263
264- denot.info = cook.apply( pool.getType(in.nextChar) )
264+ denot.info = pool.getType(in.nextChar)
265265 if (isEnum) denot.info = ConstantType (Constant (sym))
266266 if (isConstructor) normalizeConstructorParams()
267267 setPrivateWithin(denot, jflags)
268- denot.info = translateTempPoly(parseAttributes(sym, denot.info))
268+ denot.info = translateTempPoly(cook.apply( parseAttributes(sym, denot.info) ))
269269 if (isConstructor) normalizeConstructorInfo()
270270
271271 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 {
6969 ),
7070 scala2Mode
7171 ) +
72+ compileFilesInDir(" ../tests/pos-special/i3273" , defaultOptions) +
7273 compileFilesInDir(" ../tests/pos-special/spec-t5545" , defaultOptions) +
7374 compileFilesInDir(" ../tests/pos-special/strawman-collections" , defaultOptions) +
7475 compileFile(" ../scala2-library/src/library/scala/collection/immutable/IndexedSeq.scala" , defaultOptions) +
@@ -109,7 +110,6 @@ class CompilationTests extends ParallelTesting {
109110 implicit val testGroup : TestGroup = TestGroup (" posTwice" )
110111 compileFile(" ../tests/pos/Labels.scala" , defaultOptions) +
111112 compileFilesInDir(" ../tests/pos-java-interop" , defaultOptions) +
112- compileFilesInDir(" ../tests/pos-java-interop-separate" , defaultOptions) +
113113 compileFile(" ../tests/pos/t2168.scala" , defaultOptions) +
114114 compileFile(" ../tests/pos/erasure.scala" , defaultOptions) +
115115 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 =>
376376
377377 // Compile with a try to catch any StackTrace generated by the compiler:
378378 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)
380383
381384 val javaFiles = files.filter(_.getName.endsWith(" .java" )).map(_.getAbsolutePath)
382385 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