diff --git a/.gitignore b/.gitignore index 4c65f9b5126f..26f6023c0133 100644 --- a/.gitignore +++ b/.gitignore @@ -75,8 +75,6 @@ compiler/after-pickling.txt bench/compile.txt *.dotty-ide-version -*.decompiled.out - # The vscode app for testing vscode-dotty/.vscode-test diff --git a/compiler/test/dotc/pos-decompilation.blacklist b/compiler/test/dotc/pos-decompilation.blacklist deleted file mode 100644 index a34f0537541d..000000000000 --- a/compiler/test/dotc/pos-decompilation.blacklist +++ /dev/null @@ -1,25 +0,0 @@ -# Stackoverflow on bootstrapped -large.scala -large2.scala - -# NPE -i2888.scala -tcpoly_overloaded.scala -tcpoly_boundedmonad.scala -tcpoly_checkkinds_mix.scala - -# Did not survive addition of type ascriptions -i3050.scala -i4006b.scala -i4006c.scala - -# Decompiling RecThis as "this" is incorrect -avoid.scala - -# Need to print empty tree for implicit match -implicit-match.scala -implicit-match-nested.scala -implicit-match-and-inline-match.scala - -# Need to add backquotes around "macro" since it's a keyword -macro-deprecate-dont-touch-backquotedidents.scala diff --git a/compiler/test/dotc/pos-recompilation.whitelist b/compiler/test/dotc/pos-recompilation.whitelist deleted file mode 100644 index bea58e3d9894..000000000000 --- a/compiler/test/dotc/pos-recompilation.whitelist +++ /dev/null @@ -1,1077 +0,0 @@ -A -abstract -alias -aliases -annot-bootstrap -annot-inner -anonBridge -anonClassSubtyping -array-clone -array-interfaces -array-overload -Arrays -arrays2 -arrays3 -automatic-tupling-of-function-parameters -autoTuplingTest -avoid -B -backquoted_type_operator -basicFromTasty -bigint -bubbleUpNothing -builders -byNameVarargs -capturedVars2 -caseaccs -caseClassInMethod -cfcrash -chan -checkInstantiable -class-dependent-extension-method -class-refinement -classWithCompObj -cls1 -clsrefine -Coder -CoderTrait -collectGenericCC -collections_1 -comp-rec-test -compile1 -conforms -conformsWild -constants -constfold -constraining-lub -contextbounds-implicits-old -contrib467 -curried -cyclics-pos -debug-reset-local-attrs -default-param-interface -default-super -delambdafy-lambdalift -dependent-extractors -dependent-implicits -depmet_implicit_chaining_zw -depmet_implicit_norm_ret -dynamicExtendsNoImport -elidable-tparams -ensuring -enum-interop -erased-args-lifted -erased-asInstanceOf -erased-deep-context -erased-lub-2 -erased-typedef -erasure -erasure-array -erasure-nsquared -eta -exbound -exhaust_2 -exhaust_alternatives -existentials -existentials-harmful -explicitOuter -exponential-spec -extmethods -extmethods-2 -extractor-types -extractors -finalvals -flatten -Foo -freezeBounds -function-arity -functions1 -gadts2 -gen-traversable-methods -GenericTraversableTemplate -getset -gosh -gui -harmonize -hashhash-overloads -HelloWorld -hk-deep-subtype -hk-reduce-variance -hk-subtyping -hkarray -hkgadt -hklub0 -homonym -hygiene -i0268 -i0290-type-bind -i0290-type-bind-2 -i0306 -i0400 -i1036 -i1047 -i1052 -i1103 -i1130 -i1131 -i1174 -i1181 -i1181b -i1181c -i1202b -i1202c -i1216 -i1216a -i1235 -i1269 -i1285 -i1318 -i1352 -i1366 -i1378 -i1385 -i1401 -i1432 -i1442 -i1444 -i1500 -i1515 -i1542 -i1544 -i1570 -i1590 -i1637 -i1638 -i1642 -i1661 -i1664 -i1687 -i1687b -i1704 -i1723 -i1737 -i1747 -i1751 -i1755 -i1756 -i1765 -i1776 -i1777 -i1793 -i1795 -i1797 -i1865 -i1866 -i1867 -i1868 -i1891 -i1960 -i1961 -i1975 -i1976 -i1990 -i2009 -i2056 -i2066 -i2071 -i2071_1 -i2081 -i2104 -i2104b -i2140 -i2166 -i2188 -i2192 -i2201a -i2201c -i2212 -i2218 -i2234 -i2292 -i2324 -i2345 -i2367 -i2378 -i2390 -i2426 -i2437a -i2437b -i2527 -i2527b -i262-null-subtyping -i2697 -i2732 -i2741 -i2745 -i2833 -i2840 -i2856 -i2858 -i2888 -i2903 -i2944 -i2945 -i2948 -i2949 -i2974 -i2981 -i2982 -i2989 -i2998 -i3050 -i3082 -i3129 -i3130a -i3130b -i3130c -i3130d -i3149a -i3168 -i3171 -i3207 -i324 -i3252 -i3343 -i3412 -i342 -i3433 -i3471 -i3479 -i3480 -i3488 -i3500 -i3538 -i3540 -i3542-1 -i3542-2 -i3553 -i3561 -i3585 -i3588 -i3590 -i3591 -i3596 -i3607 -i3608 -i3633 -i3638 -i3702 -i3703 -i3736 -i3857 -i3873 -i3909 -i3917 -i3945 -i3956 -i3971 -i4006 -i4006b -i4006c -i4177 -i4180 -i4198 -i4203 -i4318 -i4322 -i4380b -i4395 -i4395b -i4430 -i4449 -i4466a -i4466b -i4493-c -i4514 -i4526-2 -i4526a -i4526b -i4586 -i4623 -i4678 -i4720 -i4773 -i4774a -i4774c -i4774d -i480 -i480a -i4819 -i4984 -i4999 -i5090 -i5997 -i518 -i5188 -i523 -i536 -i540 -i566 -i576 -i618 -i739 -i743 -i782 -i815 -i830 -i831 -i864 -i877 -i878 -i903 -i938 -i939 -i947 -i974 -i982 -i998 -imp2-pos -implicit-anyval-2.10 -implicit-divergent -implicit-infix-ops -implicit-lower-bound -implicit-scope-loop -implicit-unwrap-tc -implicit_cache -implicitonSelect -implicits -implicits1 -inf -inferbroadtype -init -inline-case-intrinsics -inline-i2570 -inline-named-typeargs -inline-t2425 -inlineAccesses -inliner2 -innerclass -irrefutable -itay -iterator-traversable-mix -KillLambdaLift -kinds -kinzer -ksbug1 -Labels -lambda -lambdalift -lambdalift-1 -lambdalift1 -lambdalift_1 -large -large2 -largecasetest -lazyvals -leak-inferred -leaks -lexical -list-extractor -list-optim-check -listpattern -literals -local-objects -localmodules -lookupswitch -macro-deprecate-dont-touch-backquotedidents -Map -match -matthias3 -matthias4 -matthias5 -maxim1 -methodTypes -michel2 -michel3 -michel4 -michel5 -misc-unapply_pos -modules -modules1 -Monoid -namedTypeParams -native-warning -needstypeearly -nested -nested2 -nestedLambdas -new-array -nonlocal-unchecked -null -nullarify -nullary_poly -orinf -ostermann -overloaded -overloadedAccess -override -override-via-self -overrideDataRace -overzealous-assert-genbcode -packageobject -packageobjs -paramAliases -paramcycle -partialApplications -partialfun -pat_gilles -pat_iuli -patdef -patmat-extract-tparam -patmatSeq -patterns1213 -patterns2 -philippe1 -philippe2 -philippe3 -philippe4 -pickleinf -poly-override -polyalias -polymorphic-case-class -polytypes -prefix -printbounds -private-leak -privates -propagate -quote-1 -quote-lift-inline-params-b -quote-non-static-macro -range -rangepos -rangepos-anonapply -rangepos-patmat -rbtree -rebind -relax_implicit_divergence -repeatedArgs213 -resultGuidesInference -return_thistype -S1 -S3 -S5 -S8 -sammy_poly -sammy_scope -sammy_twice -sbtDotrTest -scoping1 -scoping2 -scoping3 -sealed-final -selfSym -selftypes -sets -SI-4012-b -SI-5788 -SI-7060 -SI-7100 -sigs -simple -simple-exceptions -simple-repeated-args -simpleAnnot -simpleCaseClass-1 -simpleCaseClass-2 -simpleCaseClass-3 -simpleCaseObject -simpleClass -simpleClass-2 -simpleClass-3 -simpleConstructor -simpleDoWhile -simpleExtractors-1 -simpleExtractors-2 -simpleInline -simpleMatchCase -simpleMatchRef -simpleRefinement -simpleSetter -simpleSingleton -simpleSuper -simpleTry -simpleTypeSelect -simpleWhile -singletons -singletontrait -sip23-symbols -sort -spec -spec-asseenfrom -spec-constr-new -spec-constr-old -spec-cyclic -spec-doubledef-old -spec-fields-old -spec-foo -spec-Function1 -spec-funs -spec-groups -spec-lists -spec-localdefs -spec-maps -spec-params-old -spec-partially -spec-partialmap -spec-polymeth -spec-private -spec-super -spec-t6286 -spec-tailcall -spec-thistype -spec-vector -specialize10 -staleSymbol -strings -strip-tvars-for-lubbasetypes -subtyping -sudoku -supercalls -switch-small -switchUnbox -synthetics -t0002 -t0017 -t0020 -t0029 -t0030 -t0031 -t0032 -t0049 -t0053 -t0054 -t0055 -t0061 -t0064 -t0068 -t0069 -t0076 -t0081 -t0082 -t0085 -t0091 -t0093 -t0123 -t0154 -t0204 -t0227 -t0273 -t0301 -t0304 -t0305 -t0438 -t0453 -t0504 -t0591 -t0599 -t0644 -t0654 -t0674 -t0710 -t0770 -t0786 -t0851 -t0872 -t0904 -t0905 -t1000 -t1027 -t1034 -t10387b -t1048 -t1049 -t10533 -t1056 -t1070 -t1090 -t1107a -t1119 -t1123 -t112606A -t1131 -t1133 -t1136 -t1146 -t115 -t1159 -t116 -t1164 -t1168 -t1185 -t1203a -t121 -t1210a -t122 -t1226 -t1236a -t124 -t1260 -t1272 -t1318 -t1385 -t1391 -t1422_pos -t1439 -t1480 -t1500a -t151 -t1513a -t1513b -t1560 -t1565 -t1569 -t1569a -t159 -t1591_pos -t160 -t1625 -t1625b -t1642b -t1659 -t1675 -t1693 -t1722-A -t175 -t1756 -t177 -t1785 -t1786-cycle -t1789 -t1798 -t183 -t1832 -t1843 -t1858 -t1987a -t1996 -t2018 -t2023 -t2081 -t2082 -t2094 -t210 -t211 -t2119 -t2127 -t2133 -t2171 -t2187 -t2187-2 -t2194 -t2208_pos -t2234 -t2260 -t2261 -t2293 -t2305 -t2331 -t2405 -t2421 -t2421b_pos -t2421c -t2425 -t2429 -t245 -t2500 -t2504 -t252 -t2545 -t2591 -t2619 -t262 -t2624 -t2635 -t2665 -t2667 -t2669 -t267 -t2683 -t2691 -t2693 -t2708 -t2712-1 -t2712-2 -t2712-4 -t2712-6 -t2794 -t2795-new -t2795-old -t2797 -t2799 -t2809 -t284-pos -t287 -t289 -t2913 -t2939 -t2945 -t295 -t296 -t2973 -t2991 -t3020 -t304 -t3079 -t3106 -t3136 -t3137 -t3160 -t3174b -t318 -t319 -t3252 -t3274 -t3278 -t3312 -t3371 -t3373 -t3411 -t3420 -t3430 -t344 -t3440 -t3477 -t348plus -t3494 -t3495 -t3534 -t3560 -t3570 -t3578 -t3582 -t3582b -t359 -t360 -t361 -t3612 -t3631 -t3670 -t3671 -t3676 -t3688 -t372 -t374 -t3774 -t3792 -t3800 -t3808 -t3837 -t3859 -t3861 -t3869 -t3883 -t389 -t3890 -t3898 -t3924 -t3927 -t397 -t3972 -t3986 -t402 -t4020 -t4036 -t4052 -t4062 -t4112 -t415 -t4173 -t4176 -t4176b -t4188 -t419 -t4220 -t4243 -t4257 -t4266 -t4269 -t4275 -t430-feb09 -t4305 -t432 -t4336 -t439 -t443 -t4430 -t4432 -t4494 -t4501 -t4524 -t4545 -t4547 -t4579 -t4593 -t460 -t464 -t4651 -t4692 -t4716 -t4717 -t4758 -t4760 -t4786 -t4812 -t4831 -t4840 -t4853 -t4859 -t4869 -t4910 -t4911 -t4938 -t4975 -t5012 -t5029 -t5031_2 -t5041 -t5070 -t5071 -t5084 -t5099 -t5137 -t514 -t516 -t5175 -t522 -t5240 -t5245 -t5305 -t5313 -t5330b -t5444 -t5508 -t5508-min -t5508-min-okay -t5508-min-okay2 -t5542 -t5606 -t5643 -t566 -t5683 -t5726 -t5769 -t5779-numeq-warn -t5796 -t5816-noclash -t5829 -t5846 -t5859 -t5862 -t5886 -t5892 -t5897 -t592 -t5930 -t5932 -t596 -t5967 -t5968 -t599 -t6008 -t6022 -t6033 -t604 -t6040 -t607 -t6072 -t6091 -t611 -t6117 -t613 -t6145 -t6146 -t615 -t616 -t6184 -t6201 -t6205 -t6208 -t6210 -t6225 -t6225b -t6231 -t6231b -t6274 -t6275 -t6278-synth-def -t628 -t6301 -t6311 -t6335 -t640 -t6482 -t651 -t6514 -t6537 -t6547 -t6551 -t6552 -t6595 -t6600 -t6664 -t6664b -t6675 -t6712 -t6722 -t6745 -t675 -t6771 -t6780 -t6815 -t6815_import -t684 -t6896 -t690 -t6925 -t694 -t6963c -t6966 -t697 -t698 -t7011 -t7022 -t704 -t7091 -t7180 -t7183 -t720 -t7200b -t7233 -t7233b -t7285a -t7296 -t7369 -t7377b -t7427 -t7433 -t7486 -t7520 -t756 -t757 -t757a -t758 -t759 -t762 -t7668 -t767 -t7689 -t7690 -t7716 -t7782 -t7782b -t7788 -t780 -t7853 -t7853-partial-function -t788 -t7928 -t796 -t8023 -t8023b -t803 -t8045 -t805 -t8054 -t8060 -t807 -t812 -t8120 -t8128 -t8132 -t8177d -t8177e -t8177h -t8207 -t8219 -t8230a -t8237 -t8300-conversions-a -t8300-conversions-b -t8300-overloading -t8300-patmat-a -t8300-patmat-b -t8301 -t8301b -t8306 -t8315 -t8315b -t8324 -t8363 -t8364 -t8367 -t8369a -t839 -t851 -t873 -t892 -t9004 -t911 -t927 -t946 -t9795 -t9844 -tcpoly_boundedmonad -tcpoly_bounds1 -tcpoly_checkkinds_mix -tcpoly_gm -tcpoly_higherorder_bound_method -tcpoly_infer_ticket474 -tcpoly_late_method_params -tcpoly_method -tcpoly_overloaded -tcpoly_param_scoping -tcpoly_return_overriding -tcpoly_subst -tcpoly_typesub -tcpoly_wildcards -ted -test1 -test4refine -test5refine -testcast -testCoercionThis -this-types -thistype -thistypes -ticket2201 -tparam_inf -trait-parents -traits -transparent -tryWithoutHandler -typealias_dubious -typealiases -typedapply -typeinferNull -typetestcast -unapply -unapplyContexts2 -unapplyGeneric -unapplyNeedsMemberType -unapplyVal -unchecked-a -valdefs -vararg-pattern -varargs -varargs-position -variances -variances-flip -variances_pos -virtpatmat_alts_subst -virtpatmat_anonfun_for -virtpatmat_binding_opt -virtpatmat_exhaust -virtpatmat_exhaust_unchecked -virtpatmat_exist2 -virtpatmat_exist3 -virtpatmat_exist_uncurry -virtpatmat_gadt_array -virtpatmat_infer_single_1 -virtpatmat_reach_const -widen-existential -wildcardInInfixType -X -xml-pos -Z -zoo diff --git a/compiler/test/dotc/run-decompilation.blacklist b/compiler/test/dotc/run-decompilation.blacklist deleted file mode 100644 index 07f14e74001f..000000000000 --- a/compiler/test/dotc/run-decompilation.blacklist +++ /dev/null @@ -1,2 +0,0 @@ -# Stackoverflow -t10594.scala diff --git a/compiler/test/dotc/run-recompilation.whitelist b/compiler/test/dotc/run-recompilation.whitelist deleted file mode 100644 index 05833f953d6b..000000000000 --- a/compiler/test/dotc/run-recompilation.whitelist +++ /dev/null @@ -1,8 +0,0 @@ -literals -puzzle -simpleClass -t4300 -t8100 -t889 -valueclasses-pavlov -virtpatmat_alts \ No newline at end of file diff --git a/compiler/test/dotty/tools/TestSources.scala b/compiler/test/dotty/tools/TestSources.scala index 587db0a4efb2..aff6ef0544c9 100644 --- a/compiler/test/dotty/tools/TestSources.scala +++ b/compiler/test/dotty/tools/TestSources.scala @@ -18,25 +18,17 @@ object TestSources { // pos tests lists def posFromTastyBlacklistFile: String = "compiler/test/dotc/pos-from-tasty.blacklist" - def posDecompilationBlacklistFile: String = "compiler/test/dotc/pos-decompilation.blacklist" - def posRecompilationWhitelistFile: String = "compiler/test/dotc/pos-recompilation.whitelist" def posTestPicklingBlacklistFile: String = "compiler/test/dotc/pos-test-pickling.blacklist" def posFromTastyBlacklisted: List[String] = loadList(posFromTastyBlacklistFile) - def posDecompilationBlacklisted: List[String] = loadList(posDecompilationBlacklistFile) - def posRecompilationWhitelist: List[String] = loadList(posRecompilationWhitelistFile) def posTestPicklingBlacklisted: List[String] = loadList(posTestPicklingBlacklistFile) // run tests lists def runFromTastyBlacklistFile: String = "compiler/test/dotc/run-from-tasty.blacklist" - def runDecompilationBlacklistFile: String = "compiler/test/dotc/run-decompilation.blacklist" - def runRecompilationWhitelistFile: String = "compiler/test/dotc/run-recompilation.whitelist" def runTestPicklingBlacklistFile: String = "compiler/test/dotc/run-test-pickling.blacklist" def runFromTastyBlacklisted: List[String] = loadList(runFromTastyBlacklistFile) - def runDecompilationBlacklisted: List[String] = loadList(runDecompilationBlacklistFile) - def runRecompilationWhitelist: List[String] = loadList(runRecompilationWhitelistFile) def runTestPicklingBlacklisted: List[String] = loadList(runTestPicklingBlacklistFile) // load lists diff --git a/compiler/test/dotty/tools/dotc/FromTastyTests.scala b/compiler/test/dotty/tools/dotc/FromTastyTests.scala index fddb97abe16b..151d0826a176 100644 --- a/compiler/test/dotty/tools/dotc/FromTastyTests.scala +++ b/compiler/test/dotty/tools/dotc/FromTastyTests.scala @@ -29,9 +29,7 @@ class FromTastyTests extends ParallelTesting { implicit val testGroup: TestGroup = TestGroup("posTestFromTasty") compileTastyInDir(s"tests${JFile.separator}pos", defaultOptions, - fromTastyFilter = FileFilter.exclude(TestSources.posFromTastyBlacklisted), - decompilationFilter = FileFilter.exclude(TestSources.posDecompilationBlacklisted), - recompilationFilter = FileFilter.include(TestSources.posRecompilationWhitelist) + fromTastyFilter = FileFilter.exclude(TestSources.posFromTastyBlacklisted) ).checkCompile() } @@ -43,9 +41,7 @@ class FromTastyTests extends ParallelTesting { implicit val testGroup: TestGroup = TestGroup("runTestFromTasty") compileTastyInDir(s"tests${JFile.separator}run", defaultOptions, - fromTastyFilter = FileFilter.exclude(TestSources.runFromTastyBlacklisted), - decompilationFilter = FileFilter.exclude(TestSources.runDecompilationBlacklisted), - recompilationFilter = FileFilter.include(TestSources.runRecompilationWhitelist) + fromTastyFilter = FileFilter.exclude(TestSources.runFromTastyBlacklisted) ).checkRuns() } } diff --git a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala index fbd025b36b1c..514ba94ec6a1 100644 --- a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala +++ b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala @@ -1367,7 +1367,7 @@ trait ParallelTesting extends RunnerOrchestration { self => * Tests in the first part of the tuple must be executed before the second. * Both testsRequires explicit delete(). */ - def compileTastyInDir(f: String, flags0: TestFlags, fromTastyFilter: FileFilter, decompilationFilter: FileFilter, recompilationFilter: FileFilter)( + def compileTastyInDir(f: String, flags0: TestFlags, fromTastyFilter: FileFilter)( implicit testGroup: TestGroup): TastyCompilationTest = { val outDir = defaultOutputDir + testGroup + JFile.separator val flags = flags0 and "-Yretain-trees" @@ -1387,8 +1387,7 @@ trait ParallelTesting extends RunnerOrchestration { self => flags: TestFlags, outDir: JFile, fromTasty: Boolean = false, - decompilation: Boolean = false - ) extends JointCompilationSource(name, Array(file), flags, outDir, fromTasty, decompilation) { + ) extends JointCompilationSource(name, Array(file), flags, outDir, fromTasty) { override def buildInstructions(errors: Int, warnings: Int): String = { val runOrPos = if (file.getPath.startsWith(s"tests${JFile.separator}run${JFile.separator}")) "run" else "pos" @@ -1412,48 +1411,27 @@ trait ParallelTesting extends RunnerOrchestration { self => } // TODO add SeparateCompilationSource from tasty? - val targets2 = - filteredFiles - .filter(f => decompilationFilter.accept(f.getName)) - .map { f => - val classpath = createOutputDirsForFile(f, sourceDir, outDir) - new JointCompilationSourceFromTasty(testGroup.name, f, flags.withClasspath(classpath.getPath), classpath, decompilation = true) - } - // Create a CompilationTest and let the user decide whether to execute a pos or a neg test val generateClassFiles = compileFilesInDir(f, flags0, fromTastyFilter) - val decompilationDir = outDir + sourceDir.getName + "_decompiled" - - if (targets2.isEmpty) - new JFile(decompilationDir).mkdirs() - new TastyCompilationTest( generateClassFiles.keepOutput, new CompilationTest(targets).keepOutput, - new CompilationTest(targets2).keepOutput, - recompilationFilter, - decompilationDir, shouldDelete = true ) } - class TastyCompilationTest(step1: CompilationTest, step2: CompilationTest, step3: CompilationTest, - recompilationFilter: FileFilter, decompilationDir: String, shouldDelete: Boolean)(implicit testGroup: TestGroup) { + class TastyCompilationTest(step1: CompilationTest, step2: CompilationTest, shouldDelete: Boolean)(implicit testGroup: TestGroup) { def keepOutput: TastyCompilationTest = - new TastyCompilationTest(step1, step2, step3, recompilationFilter, decompilationDir, shouldDelete) + new TastyCompilationTest(step1, step2, shouldDelete) def checkCompile()(implicit summaryReport: SummaryReporting): this.type = { step1.checkCompile() // Compile all files to generate the class files with tasty step2.checkCompile() // Compile from tasty - step3.checkCompile() // Decompile from tasty - - val step4 = compileFilesInDir(decompilationDir, defaultOptions, recompilationFilter).keepOutput - step4.checkCompile() // Recompile decompiled code if (shouldDelete) - (step1 + step2 + step3 + step4).delete() + (step1 + step2).delete() this } @@ -1461,13 +1439,9 @@ trait ParallelTesting extends RunnerOrchestration { self => def checkRuns()(implicit summaryReport: SummaryReporting): this.type = { step1.checkCompile() // Compile all files to generate the class files with tasty step2.checkRuns() // Compile from tasty - step3.checkCompile() // Decompile from tasty - - val step4 = compileFilesInDir(decompilationDir, defaultOptions, recompilationFilter).keepOutput - step4.checkRuns() // Recompile decompiled code if (shouldDelete) - (step1 + step2 + step3 + step4).delete() + (step1 + step2).delete() this } diff --git a/docs/docs/contributing/testing.md b/docs/docs/contributing/testing.md index e0ddac74f07b..c12f3fe0eac3 100644 --- a/docs/docs/contributing/testing.md +++ b/docs/docs/contributing/testing.md @@ -101,7 +101,7 @@ with `with-compiler` in their name. ### From TASTy tests -`testCompilation` has a additional mode to run tests that compile code from a `.tasty` file, decompile a `.tasty` file and recompile the decompiled tasty. +`testCompilation` has an additional mode to run tests that compile code from a `.tasty` file. Modify blacklist and whitelists in `compiler/test/dotc` to enable or disable tests from `.tasty` files. ```bash @@ -109,4 +109,4 @@ with `with-compiler` in their name. > testCompilation --from-tasty ``` - This mode can be combined with `--update-checkfiles` to update the `.decompiled` files or can be run under `dotty-compiler-bootstrapped/testCompilation` to test on a bootstrapped Dotty compiler. \ No newline at end of file + This mode can be run under `dotty-compiler-bootstrapped/testCompilation` to test on a bootstrapped Dotty compiler. diff --git a/tests/pos/classWithCompObj.decompiled b/tests/pos/classWithCompObj.decompiled deleted file mode 100644 index 7e8b55d1fea6..000000000000 --- a/tests/pos/classWithCompObj.decompiled +++ /dev/null @@ -1,2 +0,0 @@ -class Foo() -object Foo diff --git a/tests/pos/conforms.decompiled b/tests/pos/conforms.decompiled deleted file mode 100644 index 42980919c8bd..000000000000 --- a/tests/pos/conforms.decompiled +++ /dev/null @@ -1,3 +0,0 @@ -object Test { - def f[A, B](x: A)(implicit e: scala.Predef.<:<[A, B]): B = e.apply(x) -} diff --git a/tests/pos/i0306.decompiled b/tests/pos/i0306.decompiled deleted file mode 100644 index bfc2f03c76ab..000000000000 --- a/tests/pos/i0306.decompiled +++ /dev/null @@ -1,15 +0,0 @@ -object bar { - class C[T <: scala.Seq[_ >: scala.Nothing <: scala.Any]]() - val x: scala.AnyRef = new bar.C[scala.collection.Seq[_ >: scala.Nothing <: scala.Any]]() - val y: scala.collection.Seq[_ >: scala.Nothing <: scala.Any] = bar.x match { - case x: bar.C[u] => - def xx: u = xx - - ((xx: u): scala.collection.Seq[_ >: scala.Nothing <: scala.Any]) - } - val z: java.lang.String = { - def xx: scala.Predef.String = xx - - (xx: java.lang.String) - } -} \ No newline at end of file diff --git a/tests/pos/i1181.decompiled b/tests/pos/i1181.decompiled deleted file mode 100644 index 0af84b96234f..000000000000 --- a/tests/pos/i1181.decompiled +++ /dev/null @@ -1,7 +0,0 @@ -object Test { - def foo[M[_$1]](x: M[scala.Int]): M[scala.Int] = x - type Alias[A] = scala.Tuple2[A, A] - val x: Test.Alias[scala.Int] = scala.Tuple2.apply[scala.Int, scala.Int](1, 2) - Test.foo[Test.Alias](Test.x) - Test.foo[[A >: scala.Nothing <: scala.Any] => scala.Tuple2[A, A]](Test.x) -} diff --git a/tests/pos/i1444.decompiled b/tests/pos/i1444.decompiled deleted file mode 100644 index c1e68ba01756..000000000000 --- a/tests/pos/i1444.decompiled +++ /dev/null @@ -1,10 +0,0 @@ -object Test { - class Cls(implicit x: Test.X) - class ClsImpl() extends Test.Cls()(Test.AnX) - trait Tr1(implicit x: Test.X) extends java.lang.Object - class TrtImpl() extends Test.Tr1()(Test.AnX) - trait Tr2()(implicit x: Test.X) extends java.lang.Object - class Tr2Impl() extends Test.Tr2()(Test.AnX) - trait X() extends java.lang.Object - object AnX extends Test.X -} diff --git a/tests/pos/i1570.decompiled b/tests/pos/i1570.decompiled deleted file mode 100644 index cb017e9fa3e6..000000000000 --- a/tests/pos/i1570.decompiled +++ /dev/null @@ -1,4 +0,0 @@ -object Test { - inline def foo(n: scala.Int): scala.Int = Test.bar(n) - inline def bar(n: scala.Int): scala.Int = n -} diff --git a/tests/pos/i2104b.decompiled b/tests/pos/i2104b.decompiled deleted file mode 100644 index 620bbc7ab092..000000000000 --- a/tests/pos/i2104b.decompiled +++ /dev/null @@ -1,38 +0,0 @@ -trait Cons[+H, +T]() extends java.lang.Object -object Cons { - def apply[H, T](h: H, t: T): Cons[H, T] = scala.Predef.??? - def unapply[H, T](t: Cons[H, T]): scala.Option[Pair[H, T]] = scala.Predef.??? -} -case class Pair[A, B](_1: A, _2: B) { - override def hashCode(): scala.Int = { - var acc: scala.Int = 2479866 - acc = scala.runtime.Statics.mix(acc, scala.runtime.Statics.anyHash(Pair.this._1)) - acc = scala.runtime.Statics.mix(acc, scala.runtime.Statics.anyHash(Pair.this._2)) - scala.runtime.Statics.finalizeHash(acc, 2) - } - override def equals(x$0: scala.Any): scala.Boolean = Pair.this.eq(x$0.$asInstanceOf$[java.lang.Object]).||(x$0 match { - case x$0: Pair[Pair.this.A, Pair.this.B] @scala.unchecked => - Pair.this._1.==(x$0._1).&&(Pair.this._2.==(x$0._2)) - case _ => - false - }) - override def toString(): java.lang.String = scala.runtime.ScalaRunTime._toString(Pair.this) - override def canEqual(that: scala.Any): scala.Boolean = that.isInstanceOf[Pair[Pair.this.A, Pair.this.B] @scala.unchecked] - override def productArity: scala.Int = 2 - override def productPrefix: java.lang.String = "Pair" - override def productElement(n: scala.Int): scala.Any = n match { - case 0 => - Pair.this._1 - case 1 => - Pair.this._2 - case _ => - throw new java.lang.IndexOutOfBoundsException(n.toString()) - } -} -object Pair extends scala.AnyRef -object Test { - def main(args: scala.Array[scala.Predef.String]): scala.Unit = Cons.apply[scala.Option[scala.Int], scala.None.type](scala.Option.apply[scala.Int](1), scala.None) match { - case Cons(scala.Some(i), scala.None) => - () - } -} \ No newline at end of file diff --git a/tests/pos/i4526-2.decompiled b/tests/pos/i4526-2.decompiled deleted file mode 100644 index 2190e3e2d670..000000000000 --- a/tests/pos/i4526-2.decompiled +++ /dev/null @@ -1 +0,0 @@ -class Foo(x: scala.Int, y: scala.Int) diff --git a/tests/pos/i4526a.decompiled b/tests/pos/i4526a.decompiled deleted file mode 100644 index 3893db5e8287..000000000000 --- a/tests/pos/i4526a.decompiled +++ /dev/null @@ -1,5 +0,0 @@ -package bar { - class Foo() { - protected[bar] def foo(): scala.Int = 0 - } -} diff --git a/tests/pos/i4526b.decompiled b/tests/pos/i4526b.decompiled deleted file mode 100644 index 2dbcb0846c9f..000000000000 --- a/tests/pos/i4526b.decompiled +++ /dev/null @@ -1,8 +0,0 @@ -class Foo() { - def justdoit(f: scala.Either[scala.Int, scala.Predef.String]): scala.Predef.String = f match { - case scala.Left(i) => - i.toString() - case scala.Right(s) => - (s: java.lang.String) - } -} diff --git a/tests/pos/i4678.decompiled b/tests/pos/i4678.decompiled deleted file mode 100644 index 2ab33c74dcc2..000000000000 --- a/tests/pos/i4678.decompiled +++ /dev/null @@ -1,8 +0,0 @@ -class Foo() { - val x: scala.Int = (1: @annot1 @annot2 @annot3 @annot4 @annot5) -} -class annot1() extends scala.annotation.Annotation -class annot2() extends scala.annotation.Annotation -class annot3() extends scala.annotation.Annotation -class annot4() extends scala.annotation.Annotation -class annot5() extends scala.annotation.Annotation diff --git a/tests/pos/i566.decompiled b/tests/pos/i566.decompiled deleted file mode 100644 index 8ec06555e1aa..000000000000 --- a/tests/pos/i566.decompiled +++ /dev/null @@ -1,5 +0,0 @@ -class Test() { - type T = scala.Predef.String - type U - scala.reflect.classTag[Test.this.T](scala.reflect.ClassTag.apply[Test.this.T](classOf[java.lang.String])) -} diff --git a/tests/pos/i5997.decompiled b/tests/pos/i5997.decompiled deleted file mode 100644 index 4a61210ebb13..000000000000 --- a/tests/pos/i5997.decompiled +++ /dev/null @@ -1,16 +0,0 @@ -class Test() { - val v1: scala.Option[scala.Int] = (if (true) scala.Some.apply[scala.Int](1) else scala.None).map[scala.Int](((v: scala.Int) => v.+(1))) - val v2: scala.Option[scala.Int] = (try scala.Some.apply[scala.Int](1) finally ()).map[scala.Int](((v: scala.Int) => v.+(1))) - val v3: scala.Option[scala.Int] = (1 match { - case _ => - scala.Some.apply[scala.Int](1) - }).map[scala.Int](((v: scala.Int) => v.+(1))) - val v4: java.lang.String = (while (true) ()).toString() - def v5: scala.Option[scala.Predef.String] = scala.Some.apply[java.lang.String]((return scala.Some.apply[java.lang.String]("a")).toString()) - def foo(x: scala.Boolean): scala.Boolean = x.unary_! - def bar(): scala.Int = (if (true) 1 else 2) match { - case x => - (x: scala.Int) - } - def baz(): scala.Any = (if (true) ((x: scala.Any) => scala.Predef.identity[scala.Any](x)) else ((x: scala.Any) => scala.Predef.identity[scala.Any](x))).apply(0) -} diff --git a/tests/pos/lambda.decompiled b/tests/pos/lambda.decompiled deleted file mode 100644 index 2242d1df2366..000000000000 --- a/tests/pos/lambda.decompiled +++ /dev/null @@ -1,6 +0,0 @@ -package foo { - class Foo() { - ((x: scala.Int) => 2) - val a: scala.Function1[scala.Int, scala.Int] = ((x: scala.Int) => x.*(x)) - } -} diff --git a/tests/pos/methodTypes.decompiled b/tests/pos/methodTypes.decompiled deleted file mode 100644 index a6fa344b4913..000000000000 --- a/tests/pos/methodTypes.decompiled +++ /dev/null @@ -1,5 +0,0 @@ -class Foo() { - val x: scala.Int = 1 - def y: scala.Int = 2 - def z(): scala.Int = 3 -} diff --git a/tests/pos/selftypes.decompiled b/tests/pos/selftypes.decompiled deleted file mode 100644 index e9a2f3cea7cf..000000000000 --- a/tests/pos/selftypes.decompiled +++ /dev/null @@ -1,11 +0,0 @@ -object selftypes { - trait A() extends java.lang.Object { self: selftypes.AB => - type AA = scala.List[this.BX] - class AX() - } - trait B() extends java.lang.Object { self: selftypes.AB => - type BB = B.this.AA - class BX() - } - class AB() extends selftypes.A with selftypes.B -} diff --git a/tests/pos/simple-repeated-args.decompiled b/tests/pos/simple-repeated-args.decompiled deleted file mode 100644 index e44f1e74a86b..000000000000 --- a/tests/pos/simple-repeated-args.decompiled +++ /dev/null @@ -1,4 +0,0 @@ -class Foo() { - scala.List.apply[scala.Any](1, "2", '3') - scala.Array.apply(1) -} diff --git a/tests/pos/simpleAnnot.decompiled b/tests/pos/simpleAnnot.decompiled deleted file mode 100644 index 9e2fad75f946..000000000000 --- a/tests/pos/simpleAnnot.decompiled +++ /dev/null @@ -1,7 +0,0 @@ -class Foo() { - @annot type A = scala.Int - @annot val a: scala.Int = scala.Predef.??? - val b: scala.Int @annot = scala.Predef.??? - def c(x: scala.Int): scala.Int = (x: @annot) -} -class annot() extends scala.annotation.Annotation diff --git a/tests/pos/simpleCaseClass-1.decompiled b/tests/pos/simpleCaseClass-1.decompiled deleted file mode 100644 index 115d3d35d3ec..000000000000 --- a/tests/pos/simpleCaseClass-1.decompiled +++ /dev/null @@ -1,18 +0,0 @@ -case class A() { - override def hashCode(): scala.Int = 1914112431 - override def equals(x$0: scala.Any): scala.Boolean = A.this.eq(x$0.$asInstanceOf$[java.lang.Object]).||(x$0 match { - case x$0: A @scala.unchecked => - true - case _ => - false - }) - override def toString(): java.lang.String = scala.runtime.ScalaRunTime._toString(A.this) - override def canEqual(that: scala.Any): scala.Boolean = that.isInstanceOf[A @scala.unchecked] - override def productArity: scala.Int = 0 - override def productPrefix: java.lang.String = "A" - override def productElement(n: scala.Int): scala.Any = n match { - case _ => - throw new java.lang.IndexOutOfBoundsException(n.toString()) - } -} -object A extends scala.Function0[A] diff --git a/tests/pos/simpleCaseClass-2.decompiled b/tests/pos/simpleCaseClass-2.decompiled deleted file mode 100644 index cfbe7fbcc6b9..000000000000 --- a/tests/pos/simpleCaseClass-2.decompiled +++ /dev/null @@ -1,24 +0,0 @@ -case class A(x: scala.Int) { - override def hashCode(): scala.Int = { - var acc: scala.Int = 65 - acc = scala.runtime.Statics.mix(acc, A.this.x) - scala.runtime.Statics.finalizeHash(acc, 1) - } - override def equals(x$0: scala.Any): scala.Boolean = A.this.eq(x$0.$asInstanceOf$[java.lang.Object]).||(x$0 match { - case x$0: A @scala.unchecked => - A.this.x.==(x$0.x) - case _ => - false - }) - override def toString(): java.lang.String = scala.runtime.ScalaRunTime._toString(A.this) - override def canEqual(that: scala.Any): scala.Boolean = that.isInstanceOf[A @scala.unchecked] - override def productArity: scala.Int = 1 - override def productPrefix: java.lang.String = "A" - override def productElement(n: scala.Int): scala.Any = n match { - case 0 => - A.this._1 - case _ => - throw new java.lang.IndexOutOfBoundsException(n.toString()) - } -} -object A extends scala.Function1[scala.Int, A] diff --git a/tests/pos/simpleCaseClass-3.decompiled b/tests/pos/simpleCaseClass-3.decompiled deleted file mode 100644 index a2af5c0c086f..000000000000 --- a/tests/pos/simpleCaseClass-3.decompiled +++ /dev/null @@ -1,24 +0,0 @@ -case class A[T](x: T) { - override def hashCode(): scala.Int = { - var acc: scala.Int = 65 - acc = scala.runtime.Statics.mix(acc, scala.runtime.Statics.anyHash(A.this.x)) - scala.runtime.Statics.finalizeHash(acc, 1) - } - override def equals(x$0: scala.Any): scala.Boolean = A.this.eq(x$0.$asInstanceOf$[java.lang.Object]).||(x$0 match { - case x$0: A[A.this.T] @scala.unchecked => - A.this.x.==(x$0.x) - case _ => - false - }) - override def toString(): java.lang.String = scala.runtime.ScalaRunTime._toString(A.this) - override def canEqual(that: scala.Any): scala.Boolean = that.isInstanceOf[A[A.this.T] @scala.unchecked] - override def productArity: scala.Int = 1 - override def productPrefix: java.lang.String = "A" - override def productElement(n: scala.Int): scala.Any = n match { - case 0 => - A.this._1 - case _ => - throw new java.lang.IndexOutOfBoundsException(n.toString()) - } -} -object A extends scala.AnyRef \ No newline at end of file diff --git a/tests/pos/simpleCaseObject.decompiled b/tests/pos/simpleCaseObject.decompiled deleted file mode 100644 index 0b0f9dc24d01..000000000000 --- a/tests/pos/simpleCaseObject.decompiled +++ /dev/null @@ -1,13 +0,0 @@ -package foo { - case object Foo { - override def hashCode(): scala.Int = 1045991777 - override def toString(): java.lang.String = "Foo" - override def canEqual(that: scala.Any): scala.Boolean = that.isInstanceOf[foo.Foo.type @scala.unchecked] - override def productArity: scala.Int = 0 - override def productPrefix: java.lang.String = "Foo" - override def productElement(n: scala.Int): scala.Any = n match { - case _ => - throw new java.lang.IndexOutOfBoundsException(n.toString()) - } - } -} diff --git a/tests/pos/simpleClass-2.decompiled b/tests/pos/simpleClass-2.decompiled deleted file mode 100644 index 0c1687a8557e..000000000000 --- a/tests/pos/simpleClass-2.decompiled +++ /dev/null @@ -1,6 +0,0 @@ -package foo { - class A() extends foo.B -} -package foo { - class B() -} diff --git a/tests/pos/simpleClass-3.decompiled b/tests/pos/simpleClass-3.decompiled deleted file mode 100644 index e66adc16c902..000000000000 --- a/tests/pos/simpleClass-3.decompiled +++ /dev/null @@ -1,3 +0,0 @@ -class A() extends B with C -trait B() extends java.lang.Object -trait C() extends java.lang.Object diff --git a/tests/pos/simpleClass.decompiled b/tests/pos/simpleClass.decompiled deleted file mode 100644 index 89372cde3b95..000000000000 --- a/tests/pos/simpleClass.decompiled +++ /dev/null @@ -1,6 +0,0 @@ -package foo { - class A() -} -package foo { - class B() extends foo.A -} diff --git a/tests/pos/simpleConstructor.decompiled b/tests/pos/simpleConstructor.decompiled deleted file mode 100644 index c90a8ef747a5..000000000000 --- a/tests/pos/simpleConstructor.decompiled +++ /dev/null @@ -1,2 +0,0 @@ -class A(a: scala.Int, val b: scala.Int, var c: scala.Int) -class B(protected val x: scala.Int, protected[B] val y: scala.Int, private[B] val z: scala.Int) diff --git a/tests/pos/simpleDoWhile.decompiled b/tests/pos/simpleDoWhile.decompiled deleted file mode 100644 index 5832ad51ee66..000000000000 --- a/tests/pos/simpleDoWhile.decompiled +++ /dev/null @@ -1,6 +0,0 @@ -class Foo() { - def foo: scala.Unit = { - var i: scala.Int = 1 - do i = 0 while (i.!=(0)) - } -} diff --git a/tests/pos/simpleExtractors-1.decompiled b/tests/pos/simpleExtractors-1.decompiled deleted file mode 100644 index f79cf694d907..000000000000 --- a/tests/pos/simpleExtractors-1.decompiled +++ /dev/null @@ -1,30 +0,0 @@ -object Bar { - def unapply(arg: scala.Any): scala.Option[scala.Any] = scala.Some.apply[scala.Any](arg) -} -object BarSeq { - def unapplySeq(arg: scala.Any): scala.Option[scala.Seq[scala.Any]] = scala.Some.apply[scala.collection.immutable.List[scala.Any]](scala.List.apply[scala.Any](arg)) -} -object Baz { - def unapply[T](arg: T): scala.Option[T] = scala.Some.apply[T](arg) -} -object BazSeq { - def unapplySeq[T](arg: T): scala.Option[scala.Seq[T]] = scala.Some.apply[scala.collection.immutable.List[T]](scala.List.apply[T](arg)) -} -class Foo() { - def bar(x: scala.Any): scala.Unit = x match { - case Bar(a) => - scala.Predef.println(a) - case BarSeq(a) => - scala.Predef.println(a) - case BarSeq(a, b) => - scala.Predef.println(a) - } - def baz(x: scala.Any): scala.Unit = x match { - case Baz(a) => - scala.Predef.println(a) - case BazSeq(a) => - scala.Predef.println(a) - case BazSeq(a, b) => - scala.Predef.println(a) - } -} diff --git a/tests/pos/simpleExtractors-2.decompiled b/tests/pos/simpleExtractors-2.decompiled deleted file mode 100644 index a1ae9ab59e89..000000000000 --- a/tests/pos/simpleExtractors-2.decompiled +++ /dev/null @@ -1,10 +0,0 @@ -class Foo() { - def bar(x: scala.Any): scala.Unit = x match { - case scala.Some(scala.Some(i: scala.Int)) => - scala.Predef.println(i) - case scala.Some(s @ scala.Some(i)) => - scala.Predef.println(s) - case s @ scala.Some(r @ scala.Some(i)) => - scala.Predef.println(s) - } -} diff --git a/tests/pos/simpleInline.decompiled b/tests/pos/simpleInline.decompiled deleted file mode 100644 index 9e2332d08fd2..000000000000 --- a/tests/pos/simpleInline.decompiled +++ /dev/null @@ -1,4 +0,0 @@ -class Foo() { - inline def foo: scala.Int = (9: scala.Int) - def bar: scala.Int = (9: scala.Int) -} diff --git a/tests/pos/simpleMatchCase.decompiled b/tests/pos/simpleMatchCase.decompiled deleted file mode 100644 index 438549c3b8af..000000000000 --- a/tests/pos/simpleMatchCase.decompiled +++ /dev/null @@ -1,7 +0,0 @@ -class Foo() { - def foo: scala.Unit = "c" match { - case x => - scala.Predef.println("a") - scala.Predef.println("b") - } -} diff --git a/tests/pos/simpleMatchRef.decompiled b/tests/pos/simpleMatchRef.decompiled deleted file mode 100644 index 4c9de151d293..000000000000 --- a/tests/pos/simpleMatchRef.decompiled +++ /dev/null @@ -1,10 +0,0 @@ -class Foo() { - val X: scala.Int = scala.Predef.??? - def foo(x: scala.Any): scala.Unit = x match { - case Foo.this.X => - scala.Predef.println("a") - case Y => - scala.Predef.println("b") - } -} -object Y diff --git a/tests/pos/simpleRefinement.decompiled b/tests/pos/simpleRefinement.decompiled deleted file mode 100644 index 1183bec1dba4..000000000000 --- a/tests/pos/simpleRefinement.decompiled +++ /dev/null @@ -1,48 +0,0 @@ -trait Bar() extends java.lang.Object { - type S - type T - type U <: [X] => scala.Any - val x: scala.Any - def y: scala.Any - def z(): scala.Any - def z2()(): scala.Any - def w[T]: scala.Any - def w2[T](a: scala.Null)(b: scala.Null): scala.Any -} -class Foo() { - val bar: Bar { - type S >: scala.Int <: scala.Int - type T >: scala.Function1[scala.Int, scala.Int] <: scala.Function1[scala.Int, scala.Int] - type U >: [X >: scala.Nothing <: scala.Any] => scala.Int <: [X >: scala.Nothing <: scala.Any] => scala.Int - val x: scala.Long - def y: scala.Boolean - def z(): scala.Char - def z2()(): scala.Char - def w[T >: scala.Nothing <: scala.Any]: scala.Predef.String - def w2[T >: scala.Nothing <: scala.Any](a: scala.Null)(b: scala.Null): scala.Null - } = { - final class $anon() extends Bar { - type S = scala.Int - type T = scala.Function1[scala.Int, scala.Int] - type U[X] = scala.Int - val x: scala.Long = 2L - def y: scala.Boolean = true - def z(): scala.Char = 'f' - def z2()(): scala.Char = 'g' - def w[T]: scala.Predef.String = "a" - def w2[T](a: scala.Null)(b: scala.Null): scala.Null = null - } - - (new $anon(): Bar { - type S >: scala.Int <: scala.Int - type T >: scala.Function1[scala.Int, scala.Int] <: scala.Function1[scala.Int, scala.Int] - type U >: [X >: scala.Nothing <: scala.Any] => scala.Int <: [X >: scala.Nothing <: scala.Any] => scala.Int - val x: scala.Long - def y: scala.Boolean - def z(): scala.Char - def z2()(): scala.Char - def w[T >: scala.Nothing <: scala.Any]: scala.Predef.String - def w2[T >: scala.Nothing <: scala.Any](a: scala.Null)(b: scala.Null): scala.Null - }) - } -} \ No newline at end of file diff --git a/tests/pos/simpleSetter.decompiled b/tests/pos/simpleSetter.decompiled deleted file mode 100644 index a46d68aaf439..000000000000 --- a/tests/pos/simpleSetter.decompiled +++ /dev/null @@ -1,4 +0,0 @@ -object Test { - var name: scala.Predef.String = "foo" - Test.name = Test.name.+("123") -} diff --git a/tests/pos/simpleSingleton.decompiled b/tests/pos/simpleSingleton.decompiled deleted file mode 100644 index dee824af39d1..000000000000 --- a/tests/pos/simpleSingleton.decompiled +++ /dev/null @@ -1,13 +0,0 @@ -class Foo() { - def foo(x: scala.Int): scala.Unit = { - val a: x.type = x - val b: Foo.type = Foo - val c: Foo.Bar.type = Foo.Bar - val d: 1 = 1 - val e: "abc" = "abc" - () - } -} -object Foo { - object Bar -} diff --git a/tests/pos/simpleSuper.decompiled b/tests/pos/simpleSuper.decompiled deleted file mode 100644 index 4b50ea391d07..000000000000 --- a/tests/pos/simpleSuper.decompiled +++ /dev/null @@ -1,15 +0,0 @@ -package foo { - class A() { - def foo: scala.Int = 1 - } -} -package foo { - trait B() extends java.lang.Object { - def foo: scala.Int = 2 - } -} -package foo { - class C() extends foo.A with foo.B { - override def foo: scala.Int = super.foo.+(super[B].foo) - } -} diff --git a/tests/pos/simpleTry.decompiled b/tests/pos/simpleTry.decompiled deleted file mode 100644 index be21c783bb43..000000000000 --- a/tests/pos/simpleTry.decompiled +++ /dev/null @@ -1,6 +0,0 @@ -class Foo() { - try 3 catch { - case e: scala.Throwable => - 4 - } finally scala.Predef.println(6) -} diff --git a/tests/pos/simpleTypeSelect.decompiled b/tests/pos/simpleTypeSelect.decompiled deleted file mode 100644 index b45bfd991992..000000000000 --- a/tests/pos/simpleTypeSelect.decompiled +++ /dev/null @@ -1,6 +0,0 @@ -trait Foo() extends java.lang.Object { - type Bar -} -object Test { - val x: Foo#Bar = scala.Predef.??? -} diff --git a/tests/pos/simpleWhile.decompiled b/tests/pos/simpleWhile.decompiled deleted file mode 100644 index f16b7efa1ebd..000000000000 --- a/tests/pos/simpleWhile.decompiled +++ /dev/null @@ -1,6 +0,0 @@ -class Foo() { - def foo: scala.Unit = { - var i: scala.Int = 1 - while (i.!=(0)) i = 0 - } -} diff --git a/tests/pos/t0905.decompiled b/tests/pos/t0905.decompiled deleted file mode 100644 index bab9c41c52ec..000000000000 --- a/tests/pos/t0905.decompiled +++ /dev/null @@ -1,6 +0,0 @@ -object Test { - trait A[T]() extends java.lang.Object - def f(implicit p: Test.A[_ >: scala.Nothing <: scala.Any]): scala.Null = null - implicit val x: Test.A[_ >: scala.Nothing <: scala.Any] = null - scala.Predef.println(Test.f(Test.x)) -} diff --git a/tests/pos/t116.decompiled b/tests/pos/t116.decompiled deleted file mode 100644 index 65089dcda98e..000000000000 --- a/tests/pos/t116.decompiled +++ /dev/null @@ -1,7 +0,0 @@ -class C() { - def this(x: scala.Int) = { - this() - class D() extends C - () - } -} diff --git a/tests/pos/t3869.decompiled b/tests/pos/t3869.decompiled deleted file mode 100644 index 9050bcdfb62e..000000000000 --- a/tests/pos/t3869.decompiled +++ /dev/null @@ -1,4 +0,0 @@ -object Test { - def f: scala.Unit = try return () finally while (true) () - def main(args: scala.Array[scala.Predef.String]): scala.Unit = Test.f -} diff --git a/tests/pos/t6225b.decompiled b/tests/pos/t6225b.decompiled deleted file mode 100644 index b086a631c622..000000000000 --- a/tests/pos/t6225b.decompiled +++ /dev/null @@ -1,8 +0,0 @@ -package library.x { - class X() { - class Foo() - } -} -package library { - package object y extends library.x.X -} diff --git a/tests/pos/t704.decompiled b/tests/pos/t704.decompiled deleted file mode 100644 index 6003562eac60..000000000000 --- a/tests/pos/t704.decompiled +++ /dev/null @@ -1,25 +0,0 @@ -class C() extends E -trait D() extends java.lang.Object { - val x: java.lang.String = "xxxx should appear twice" - object xxxx { - scala.Console.println(D.this.x) - } - def get_xxxx: scala.AnyRef = D.this.xxxx -} -trait E() extends java.lang.Object with D { - def f(): scala.Unit = { - val y: java.lang.String = "yyyy should appear twice" - object yyyy { - val x1: scala.AnyRef = E.this.get_xxxx - scala.Console.println(y) - } - yyyy - () - } -} -object Go extends D { - def main(args: scala.Array[scala.Predef.String]): scala.Unit = { - new C().f() - new C().f() - } -} diff --git a/tests/pos/varargs-position.decompiled b/tests/pos/varargs-position.decompiled deleted file mode 100644 index 73d602b8ba5f..000000000000 --- a/tests/pos/varargs-position.decompiled +++ /dev/null @@ -1,12 +0,0 @@ -object varargspos { - def g(a: scala.Int, x: scala.Int*): scala.Int = a.+(x.length) - varargspos.g(1, 2, 3, 4) - val xs: scala.collection.immutable.List[scala.Int] = scala.Nil.::[scala.Int](2).::[scala.Int](1) - val a: scala.Int = 8 - val b: scala.Int = 7 - varargspos.g(5, varargspos.xs: _*) - varargspos.g(3, scala.Nil: _*) - varargspos.g(varargspos.a, varargspos.xs: _*) - varargspos.g(varargspos.a, varargspos.b, 2, 3) - varargspos.g(1) -} diff --git a/tests/run/classof-object.decompiled b/tests/run/classof-object.decompiled deleted file mode 100644 index 9a5a1f455fa1..000000000000 --- a/tests/run/classof-object.decompiled +++ /dev/null @@ -1,3 +0,0 @@ -object Test { - def main(args: scala.Array[scala.Predef.String]): scala.Unit = if (scala.Predef.classOf[Test.type].==(Test.getClass()).unary_!) dotty.DottyPredef.assertFail() else () -} diff --git a/tests/run/literals.decompiled b/tests/run/literals.decompiled deleted file mode 100644 index 9a2ce3f78b4b..000000000000 --- a/tests/run/literals.decompiled +++ /dev/null @@ -1,97 +0,0 @@ -object Test { - def αρετη: java.lang.String = "alpha rho epsilon tau eta" - case class GGG(i: scala.Int) { - override def hashCode(): scala.Int = { - var acc: scala.Int = 767242539 - acc = scala.runtime.Statics.mix(acc, GGG.this.i) - scala.runtime.Statics.finalizeHash(acc, 1) - } - override def equals(x$0: scala.Any): scala.Boolean = GGG.this.eq(x$0.$asInstanceOf$[java.lang.Object]).||(x$0 match { - case x$0: Test.GGG @scala.unchecked => - GGG.this.i.==(x$0.i) - case _ => - false - }) - override def toString(): java.lang.String = scala.runtime.ScalaRunTime._toString(GGG.this) - override def canEqual(that: scala.Any): scala.Boolean = that.isInstanceOf[Test.GGG @scala.unchecked] - override def productArity: scala.Int = 1 - override def productPrefix: java.lang.String = "GGG" - override def productElement(n: scala.Int): scala.Any = n match { - case 0 => - GGG.this._1 - case _ => - throw new java.lang.IndexOutOfBoundsException(n.toString()) - } - def αα(that: Test.GGG): scala.Int = GGG.this.i.+(that.i) - } - object GGG extends scala.Function1[scala.Int, Test.GGG] - def check_success[a](name: scala.Predef.String, closure: => a, expected: a): scala.Unit = { - scala.Predef.print("test ".+(name)) - try { - val actual: a = closure - if (actual.==(expected)) scala.Predef.print(" was successful") else scala.Predef.print(" failed: expected ".+(expected).+(", found ").+(actual)) - } catch { - case exception: scala.Throwable => - scala.Predef.print(" raised exception ".+(exception)) - } - scala.Predef.println() - } - def main(args: scala.Array[scala.Predef.String]): scala.Unit = { - Test.check_success[scala.Char]("\'\\u0024\' == \'$\'", '$', '$') - Test.check_success[scala.Char]("\'\\u005f\' == \'_\'", '_', '_') - Test.check_success[scala.Char]("65.asInstanceOf[Char] == \'A\'", 65.asInstanceOf[scala.Char], 'A') - Test.check_success[java.lang.String]("\"\\141\\142\" == \"ab\"", "ab", "ab") - Test.check_success[java.lang.String]("\"\\0x61\\0x62\".trim() == \"x61\\0x62\"", "\00x61\00x62".substring(1), "x61\00x62") - scala.Predef.println() - Test.check_success[scala.Boolean]("(65 : Byte) == \'A\'", (65: scala.Byte).==('A'), true) - scala.Predef.println() - Test.check_success[scala.Int]("0X01 == 1", 1, 1) - Test.check_success[scala.Int]("0x01 == 1", 1, 1) - Test.check_success[scala.Int]("0x10 == 16", 16, 16) - Test.check_success[scala.Int]("0xa == 10", 10, 10) - Test.check_success[scala.Int]("0x0a == 10", 10, 10) - Test.check_success[scala.Int]("+0x01 == 1", 1.unary_+, 1) - Test.check_success[scala.Int]("+0x10 == 16", 16.unary_+, 16) - Test.check_success[scala.Int]("+0xa == 10", 10.unary_+, 10) - Test.check_success[scala.Int]("+0x0a == 10", 10.unary_+, 10) - Test.check_success[scala.Int]("-0x01 == -1", -1, -1) - Test.check_success[scala.Int]("-0x10 == -16", -16, -16) - Test.check_success[scala.Int]("-0xa == -10", -10, -10) - Test.check_success[scala.Int]("-0x0a == -10", -10, -10) - Test.check_success[scala.Int]("0x7fffffff == 2147483647", 2147483647, 2147483647) - Test.check_success[scala.Int]("0x80000000 == -2147483648", -2147483648, -2147483648) - Test.check_success[scala.Int]("0xffffffff == -1", -1, -1) - scala.Predef.println() - Test.check_success[scala.Long]("1l == 1L", 1L, 1L) - Test.check_success[scala.Long]("1L == 1l", 1L, 1L) - Test.check_success[scala.Long]("1.asInstanceOf[Long] == 1l", 1.asInstanceOf[scala.Long], 1L) - Test.check_success[scala.Long]("0x7fffffffffffffffL == 9223372036854775807L", 9223372036854775807L, 9223372036854775807L) - Test.check_success[scala.Long]("0x8000000000000000L == -9223372036854775808L", -9223372036854775808L, -9223372036854775808L) - Test.check_success[scala.Long]("0xffffffffffffffffL == -1L", -1L, -1L) - scala.Predef.println() - Test.check_success[scala.Float]("1e1f == 10.0f", 10.0f, 10.0f) - Test.check_success[scala.Float](".3f == 0.3f", 0.3f, 0.3f) - Test.check_success[scala.Float]("0f == 0.0f", 0.0f, 0.0f) - Test.check_success[scala.Float]("3.14f == 3.14f", 3.14f, 3.14f) - Test.check_success[scala.Float]("6.022e23f == 6.022e23f", 6.022E23f, 6.022E23f) - Test.check_success[scala.Float]("09f == 9.0f", 9.0f, 9.0f) - Test.check_success[scala.Float]("1.asInstanceOf[Float] == 1.0", 1.asInstanceOf[scala.Float], 1.0f) - Test.check_success[scala.Float]("1l.asInstanceOf[Float] == 1.0", 1L.asInstanceOf[scala.Float], 1.0f) - scala.Predef.println() - Test.check_success[scala.Double]("1e1 == 10.0", 10.0, 10.0) - Test.check_success[scala.Double](".3 == 0.3", 0.3, 0.3) - Test.check_success[scala.Double]("0.0 == 0.0", 0.0, 0.0) - Test.check_success[scala.Double]("0d == 0.0", 0.0, 0.0) - Test.check_success[scala.Double]("01.23 == 1.23", 1.23, 1.23) - Test.check_success[scala.Double]("01.23d == 1.23d", 1.23, 1.23) - Test.check_success[scala.Double]("3.14 == 3.14", 3.14, 3.14) - Test.check_success[scala.Double]("1e-9d == 1.0e-9", 1.0E-9, 1.0E-9) - Test.check_success[scala.Double]("1e137 == 1.0e137", 1.0E137, 1.0E137) - Test.check_success[scala.Double]("1.asInstanceOf[Double] == 1.0", 1.asInstanceOf[scala.Double], 1.0) - Test.check_success[scala.Double]("1l.asInstanceOf[Double] == 1.0", 1L.asInstanceOf[scala.Double], 1.0) - scala.Predef.println() - Test.check_success[scala.Int]("\"\".length()", "\032".length(), 1) - val ggg: scala.Int = Test.GGG.apply(1).αα(Test.GGG.apply(2)) - Test.check_success[scala.Int]("ggg == 3", ggg, 3) - } -} diff --git a/tests/run/puzzle.decompiled b/tests/run/puzzle.decompiled deleted file mode 100644 index a5184ddf0b16..000000000000 --- a/tests/run/puzzle.decompiled +++ /dev/null @@ -1,11 +0,0 @@ -/** Decompiled from out/runTestFromTasty/run/puzzle/Test.class */ -object Test { - def main(args: scala.Array[scala.Predef.String]): scala.Unit = { - scala.Predef.println(if (false) 5.0 else 53.0) - val x: scala.Double = if (false) 5.0 else 53.0 - scala.Predef.println(x) - val z: scala.Long = 1L - val y: scala.Float = scala.Long.long2float(z) - () - } -} diff --git a/tests/run/simpleClass.decompiled b/tests/run/simpleClass.decompiled deleted file mode 100644 index c5c1aeb6cff0..000000000000 --- a/tests/run/simpleClass.decompiled +++ /dev/null @@ -1,12 +0,0 @@ -object Test { - def main(args: scala.Array[scala.Predef.String]): scala.Unit = { - scala.Predef.println(new foo.A().getClass().getName()) - scala.Predef.println(new foo.B().getClass().getName()) - } -} -package foo { - class A() -} -package foo { - class B() extends foo.A -} diff --git a/tests/run/t4300.decompiled b/tests/run/t4300.decompiled deleted file mode 100644 index 5e4c21872830..000000000000 --- a/tests/run/t4300.decompiled +++ /dev/null @@ -1,26 +0,0 @@ -trait A() extends java.lang.Object { - def f(): scala.Unit = scala.Predef.println("A") -} -class B() extends A { - def b(): scala.Unit = super[A].f() - trait C() extends java.lang.Object { - def c(): scala.Unit = B.super[A].f() - } - def g(): scala.Unit = scala.Predef.intWrapper(0).until(1).foreach[scala.Unit](((i: scala.Int) => super[A].f())) - def h(): scala.Unit = scala.Predef.intWrapper(0).until(1).foreach[scala.Unit](((i: scala.Int) => B.super[A].f())) - override def f(): scala.Unit = scala.Predef.println("B") -} -object Test { - def main(args: scala.Array[scala.Predef.String]): scala.Unit = { - val b: B = new B() - b.b() - - { - final class $anon() extends b.C - - (new $anon(): b.C) - }.c() - b.g() - b.h() - } -} diff --git a/tests/run/t8100.decompiled b/tests/run/t8100.decompiled deleted file mode 100644 index 6433606ca230..000000000000 --- a/tests/run/t8100.decompiled +++ /dev/null @@ -1,7 +0,0 @@ -object Test { - import scala.util.{Try} - def main(args: scala.Array[scala.Predef.String]): scala.Unit = { - def stream: scala.collection.immutable.Stream[scala.None.type] = scala.Stream.from(0).take(100000).map[scala.None.type, scala.collection.immutable.Stream[scala.None.type]](((n: scala.Int) => scala.None))(scala.collection.immutable.Stream.canBuildFrom[scala.None.type]) - scala.Predef.println(scala.util.Try.apply[scala.Int](stream.flatten[scala.Nothing](((xo: scala.None.type) => scala.Option.option2Iterable[scala.Nothing](xo))).length)) - } -} diff --git a/tests/run/t889.decompiled b/tests/run/t889.decompiled deleted file mode 100644 index c82bde8ced14..000000000000 --- a/tests/run/t889.decompiled +++ /dev/null @@ -1,9 +0,0 @@ -object Test extends dotty.runtime.LegacyApp { - val a: scala.collection.immutable.List[java.lang.String] = scala.List.apply[java.lang.String]("a") - Test.a match { - case scala.Seq("a", "b", rest: _*) => - scala.Predef.println("a, b, ".+(rest)) - case scala.Seq(first, rest: _*) => - scala.Predef.println("first: ".+(first).+(", rest: ").+(rest)) - } -} diff --git a/tests/run/valueclasses-pavlov.decompiled b/tests/run/valueclasses-pavlov.decompiled deleted file mode 100644 index 47919c57f946..000000000000 --- a/tests/run/valueclasses-pavlov.decompiled +++ /dev/null @@ -1,41 +0,0 @@ -final class Box1(val value: scala.Predef.String) extends scala.AnyVal { - override def hashCode(): scala.Int = Box1.this.value.hashCode() - override def equals(x$0: scala.Any): scala.Boolean = x$0 match { - case x$0: Box1 @scala.unchecked => - Box1.this.value.==(x$0.value) - case _ => - false - } -} -object Box1 extends scala.AnyRef -final class Box2(val value: scala.Predef.String) extends scala.AnyVal with Foo { - override def hashCode(): scala.Int = Box2.this.value.hashCode() - override def equals(x$0: scala.Any): scala.Boolean = x$0 match { - case x$0: Box2 @scala.unchecked => - Box2.this.value.==(x$0.value) - case _ => - false - } - def box1(x: Box1): scala.Predef.String = "box1: ok" - def box2(x: Box2): scala.Predef.String = "box2: ok" -} -object Box2 extends scala.AnyRef -class C(x: scala.Predef.String) { - def this() = { - this("") - () - } -} -trait Foo() extends scala.Any { - def box1(x: Box1): scala.Predef.String - def box2(x: Box2): scala.Predef.String -} -object Test { - def main(args: scala.Array[scala.Predef.String]): scala.Unit = { - val b1: Box1 = new Box1("") - val b2: Box2 = new Box2("") - val f: Foo = b2 - scala.Predef.println(f.box1(b1)) - scala.Predef.println(f.box2(b2)) - } -} diff --git a/tests/run/virtpatmat_alts.decompiled b/tests/run/virtpatmat_alts.decompiled deleted file mode 100644 index f969bab0819e..000000000000 --- a/tests/run/virtpatmat_alts.decompiled +++ /dev/null @@ -1,16 +0,0 @@ -object Test extends dotty.runtime.LegacyApp { - scala.Tuple2.apply[scala.Boolean, scala.Boolean](true, true) match { - case (scala.Tuple2(true, true) | scala.Tuple2(false, false)) => - 1 - } - scala.List.apply[scala.Int](5) match { - case (scala.::(1, scala.Nil) | scala.::(2, scala.Nil)) => - scala.Predef.println("FAILED") - case scala.::(x @ (4 | 5 | 6), scala.Nil) => - scala.Predef.println("OK ".+(x)) - case scala.::(7, scala.Nil) => - scala.Predef.println("FAILED") - case scala.Nil => - scala.Predef.println("FAILED") - } -}