aboutsummaryrefslogtreecommitdiff
path: root/test/dotc
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Disable -Ycheck:labelDefs"Martin Odersky2015-08-051-1/+1
| | | | This reverts commit c8afd79b4c7f145ba090a2d936d627c3ab35b1c2.
* Add LiftTry phaseMartin Odersky2015-08-051-1/+1
| | | | | Phase lifts tries that would be illegal because they execute on non-empty expression stacks.
* Disable -Ycheck:labelDefsMartin Odersky2015-08-041-1/+1
| | | | | Disable the check because if fails for desugar.scala and also in some dotty files. This test failed before the addition of NonLocalReturns.
* Merge pull request #735 from dotty-staging/ycheck-methodsodersky2015-08-041-1/+1
|\ | | | | Ycheck that methods defined in ClassInfo exist in tree.
| * Compile dotty.*, not only dotty.tools.Dmitry Petrashko2015-07-231-1/+1
| |
* | Merge pull request #724 from dotty-staging/labels-YcheckDmitry Petrashko2015-07-221-3/+8
|\ \ | | | | | | Enable Ycheck after labelDef. Fixes #701
| * | Disable Ycheck:all until #725 is fixed.Dmitry Petrashko2015-07-201-1/+1
| | |
| * | Enable -Ycheck:all in Jenkins.Dmitry Petrashko2015-07-201-3/+8
| | | | | | | | | | | | | | | Done by setting an environment variable and checking it in runtime. This enables Ycheck:all for all kinds of tests, including partest.
| * | Enable Ycheck after labelDef. Fixes #701Dmitry Petrashko2015-07-131-1/+1
| |/
* | Merge pull request #719 from dotty-staging/fix/doubledefsDmitry Petrashko2015-07-201-1/+1
|\ \ | | | | | | Avoid crashes on double definitions
| * | Added testMartin Odersky2015-07-101-1/+1
| | |
* | | Don't add lower bounds of abstract types to the implicit scopeGuillaume Martres2015-07-111-0/+1
| |/ |/| | | | | | | | | | | | | As the spec[1] says: "The parts of a type T are [...] if T is an abstract type, the parts of its upper bound;" [1]: http://www.scala-lang.org/files/archive/spec/2.11/07-implicits.html#implicit-parameters
* | Merge pull request #708 from dotty-staging/add/check-reentrantodersky2015-07-061-1/+1
|\ \ | | | | | | Check that dotty is reentrant
| * | Add -Ycheck-reentrant to dotty test.Martin Odersky2015-07-061-1/+1
| | |
* | | Check that a self type T is closed.Martin Odersky2015-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | What is checked: A self type T is a subtype of all selftypes of classes refernced by T. That is, a self type has to subsume all self types of its required type. Ot, otherwise said, requirements must be closed; you cannot discover new ones in following them.
* | | Error instead of crash when sigName comes up with a missing reference.Martin Odersky2015-07-061-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A TypeRef can have be unresolved, either because it refers to something that's missing from the classpath or because of transitive self type references. Instead of crashing in sigName, we now report the error. Achieved by defining a new exception type, MissingType, which derives from TypeError. This catches t7933.scala, now integrated in the neg/selfreq.scala. The problem there was a reference to AbsSettings, which was not a member of StandardScalaSettings.this, but was a member of the required type of AbsSettings, which itself appeared in the required type of StandardScalaSettings. We will outlaw in the next commit such transitive required references. Also collapsed TypeError and FatalTypeError. It was a misnomer anyway. Fatal were those type errors that were caught and reported! Open: Where else we should check for unresolved NamedTypes.
* | Merge pull request #694 from dotty-staging/fix/dependent-methodsodersky2015-07-061-1/+1
|\ \ | |/ |/| Fix/dependent methods
| * Avoid follow-on errors after implicit argument errors.Martin Odersky2015-06-231-1/+1
| | | | | | | | Previously, we could die with a <notype> when an implicit argument was not found.
* | Merge pull request #695 from dotty-staging/fix/source-positionsDmitry Petrashko2015-07-021-0/+1
|\ \ | | | | | | Avoid crasher when first token of a program is in error
| * | Avoid crasher when first token of a program is in errorMartin Odersky2015-06-251-0/+1
| |/ | | | | | | | | This used to give a crash in SourcePositiom, promoted by feeding its calculations with a negative offset.
* | Check value class member restrictionsMartin Odersky2015-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to SIP 15 a value class C must obey the following restrictions: C may not have secondary constructors. C may not declare fields (other than the parameter of a value class). C may not contain object definitions. C may not have initialization statements. These are enforced by this commit. We are still missing restrictions on value class paremeters. We should review what the right set of conditions is (probably we want to admit non-vals, and maybe even multiple parameters).
* | Check that value classes are staticMartin Odersky2015-07-021-0/+2
|/
* Implement trait parametersMartin Odersky2015-06-191-0/+1
| | | | | | Add necessary logic to Mixin. Also add tests that all parameterized traits are called with parameters set.
* Implement checking for illegal parent trait constructor calls.Martin Odersky2015-06-191-0/+1
| | | | | A parent trait may not be parameterized (as in T()) if the calling class does not directly implement that trait.
* Fix stack overflow when testing for shadowingMartin Odersky2015-06-191-0/+1
| | | | | | | | | Shadowing tests could go into an infinite recursion when the found sahdwoing member itself needs an implicit that is resolved and then shadowed again by the same member. A test case is neg/arrayclone-new.scala. This caused a SO before, now gives two errors.
* Delete test which no longer appliesMartin Odersky2015-06-061-1/+0
| | | | | neg/projections required certain types of the form C#T to be ill-formed. This is no longer done.
* Skolemize unstable prefixes in asSeenFromMartin Odersky2015-06-061-2/+1
| | | | | | | | | | | Skolemize unstable prefixes in asSeenFrom provided - the prefix appears at least once in non-variant or contra-variant position - we are in phase typer. After typer, we have already established soundness, so there's no need to do skolemization again. We can simply do the (otherwise unsound) substitution from this-type to prefix.
* Eliminate `_' from rhs of ValDefsMartin Odersky2015-05-291-1/+1
| | | | Previously was only done for DefDefs. Caused backend failure.
* Run partest directory as whole by default.Dmitry Petrashko2015-05-131-2/+2
|
* Removing pickle tests because directory doesn't exist anymore.vsalvis2015-05-121-3/+4
|
* Run tests for partestvsalvis2015-05-121-1/+7
|
* Re-enable testsMartin Odersky2015-05-111-4/+4
| | | | | Most tests were still commented out in last merge. Also, an outdated comment in TreeTypeMap was removed.
* Do not try to compile dotty runtime yet. Problems with DottyPredef.Dmitry Petrashko2015-05-081-1/+1
|
* Data race in typer: seems due to presence of DottyPredef both on class path ↵Dmitry Petrashko2015-05-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and in compiled source. [error] Test dotc.tests.dotty failed: java.lang.AssertionError: assertion failed: data race? overwriting symbol of dotty.DottyPredef$ / TypeRef(ThisType(TypeRef(NoPrefix,dotty)),DottyPredef$) / class dotty.tools.dotc.core.Types$CachedTypeRef / 9007 / 9748, took 1.276 sec [error] at scala.Predef$.assert(Predef.scala:165) [error] at dotty.tools.dotc.core.Types$NamedType.checkSymAssign(Types.scala:1263) [error] at dotty.tools.dotc.core.Types$NamedType.setDenot(Types.scala:1293) [error] at dotty.tools.dotc.core.Types$NamedType.withDenot(Types.scala:1286) [error] at dotty.tools.dotc.core.Types$TypeRef$.apply(Types.scala:1669) [error] at dotty.tools.dotc.core.Types$Type.select(Types.scala:819) [error] at dotty.tools.dotc.typer.Namer.moduleValSig(Namer.scala:602) [error] at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:465) [error] at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:499) [error] at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:495) [error] at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:161) [error] at dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:143) [error] at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:253) [error] at dotty.tools.dotc.core.SymDenotations$SymDenotation.flags(SymDenotations.scala:97) [error] at dotty.tools.dotc.core.SymDenotations$SymDenotation.is(SymDenotations.scala:119) [error] at dotty.tools.dotc.core.SymDenotations$SymDenotation.isStable(SymDenotations.scala:464) [error] at dotty.tools.dotc.core.Types$Type.widenIfUnstable(Types.scala:691) [error] at dotty.tools.dotc.core.Types$Type$$anonfun$member$1.apply(Types.scala:394) [error] at dotty.tools.dotc.core.Types$Type$$anonfun$member$1.apply(Types.scala:394) [error] at dotty.tools.dotc.util.Stats$.track(Stats.scala:35) [error] at dotty.tools.dotc.core.Types$Type.member(Types.scala:393) [error] at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.wildImportRef$1(Typer.scala:192) [error] at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.findRef$1(Typer.scala:240) [error] at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.apply(Typer.scala:263) [error] at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.apply(Typer.scala:79) [error] at dotty.tools.dotc.util.Stats$.track(Stats.scala:35) [error] at dotty.tools.dotc.typer.Typer.typedIdent(Typer.scala:79) [error] at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1017) [error] at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1076) [error] at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1088) [error] at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1086) [error] at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:147) [error] at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:51) [error] at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1086) [error] at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1125) [error] at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:961) [error] at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:960) [error] at dotty.tools.dotc.util.Stats$.track(Stats.scala:35) [error] at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:960) [error] at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1066) [error] at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1078) [error] at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1088) [error] at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1086) [error] at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:147) [error] at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:51) [error] at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1086) [error] at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1125) [error] at dotty.tools.dotc.typer.FrontEnd$$anonfun$typeCheck$1.apply$mcV$sp(FrontEnd.scala:41) [error] at dotty.tools.dotc.typer.FrontEnd.monitor(FrontEnd.scala:18) [error] at dotty.tools.dotc.typer.FrontEnd.typeCheck(FrontEnd.scala:39) [error] at dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:52) [error] at dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:52) [error] at scala.collection.immutable.List.foreach(List.scala:381) [error] at dotty.tools.dotc.typer.FrontEnd.runOn(FrontEnd.scala:52) [error] at dotty.tools.dotc.Run$$anonfun$compileSources$1$$anonfun$apply$mcV$sp$3.apply(Run.scala:55) [error] at dotty.tools.dotc.Run$$anonfun$compileSources$1$$anonfun$apply$mcV$sp$3.apply(Run.scala:52) [error] at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) [error] at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) [error] at dotty.tools.dotc.Run$$anonfun$compileSources$1.apply$mcV$sp(Run.scala:52) [error] at dotty.tools.dotc.Run$$anonfun$compileSources$1.apply(Run.scala:47) [error] at dotty.tools.dotc.Run$$anonfun$compileSources$1.apply(Run.scala:47) [error] at dotty.tools.dotc.util.Stats$.monitorHeartBeat(Stats.scala:68) [error] at dotty.tools.dotc.Run.compileSources(Run.scala:46) [error] at dotty.tools.dotc.Run.compile(Run.scala:33) [error] at dotty.tools.dotc.Driver.doCompile(Driver.scala:20) [error] at dotty.tools.dotc.Bench$.dotty$tools$dotc$Bench$$super$doCompile(Bench.scala:38) [error] at dotty.tools.dotc.Bench$$anonfun$doCompile$1.apply(Bench.scala:38) [error] at dotty.tools.dotc.Bench$$anonfun$doCompile$1.apply(Bench.scala:36) [error] at dotty.tools.dotc.Bench$$anonfun$ntimes$1.apply(Bench.scala:30) [error] at dotty.tools.dotc.Bench$$anonfun$ntimes$1.apply(Bench.scala:30) [error] at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:142) [error] at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:142) [error] at scala.collection.immutable.Range.foreach(Range.scala:166) [error] at scala.collection.TraversableOnce$class.foldLeft(TraversableOnce.scala:142) [error] at scala.collection.AbstractTraversable.foldLeft(Traversable.scala:104) [error] at scala.collection.TraversableOnce$class.$div$colon(TraversableOnce.scala:136) [error] at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:104) [error] at dotty.tools.dotc.Bench$.ntimes(Bench.scala:30) [error] at dotty.tools.dotc.Bench$.doCompile(Bench.scala:36) [error] at dotty.tools.dotc.Driver.process(Driver.scala:31) [error] at dotty.tools.dotc.Bench$.dotty$tools$dotc$Bench$$super$process(Bench.scala:53) [error] at dotty.tools.dotc.Bench$$anonfun$process$1.apply(Bench.scala:53) [error] at dotty.tools.dotc.Bench$$anonfun$process$1.apply(Bench.scala:53) [error] at dotty.tools.dotc.Bench$$anonfun$ntimes$1.apply(Bench.scala:30) [error] at dotty.tools.dotc.Bench$$anonfun$ntimes$1.apply(Bench.scala:30) [error] at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:142) [error] at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:142) [error] at scala.collection.immutable.Range.foreach(Range.scala:166) [error] at scala.collection.TraversableOnce$class.foldLeft(TraversableOnce.scala:142) [error] at scala.collection.AbstractTraversable.foldLeft(Traversable.scala:104) [error] at scala.collection.TraversableOnce$class.$div$colon(TraversableOnce.scala:136) [error] at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:104) [error] at dotty.tools.dotc.Bench$.ntimes(Bench.scala:30) [error] at dotty.tools.dotc.Bench$.process(Bench.scala:53) [error] at test.CompilerTest.compileArgs(CompilerTest.scala:159) [error] at test.CompilerTest.compileDir(CompilerTest.scala:104) [error] at dotc.tests.dotty(tests.scala:141)
* Compile Dotty including runtime and utils.Dmitry Petrashko2015-05-081-6/+6
|
* New miniphase: ExpandSAMsMartin Odersky2015-05-021-3/+0
| | | | The phase replaces SAM closures with anonymous classes when necessary.
* Enable untried pos tests related to value classesGuillaume Martres2015-05-011-1/+1
| | | | | Each test needs to have its own package because pos_all will try to compile the whole valueclasses directory at once.
* Erasure: properly handle null in value classesGuillaume Martres2015-05-011-0/+1
| | | | This fixes the issues reported in SI-5866 and SI-8097
* Enable emmiting byte code for all tests. Compile Dotty.Dmitry Petrashko2015-04-301-28/+13
| | | | Hurray!
* Merge pull request #495 from dotty-staging/refactor/SuperAccessorsDmitry Petrashko2015-04-281-2/+0
|\ | | | | Refactor/super accessors
| * Super accessor refactoringMartin Odersky2015-04-221-2/+0
| | | | | | | | | | | | | | | | | | New phase: PostTransform, runs after Typer. SuperAccessors and ParamForwarders (renamed from ForwardParamAccessors) are helper objects of post transform. Next: Add instChecks as well.
* | Add a neg test for SAMs.Dmitry Petrashko2015-04-231-0/+1
|/
* Merge pull request #474 from dotty-staging/alt/instantiation-checksDmitry Petrashko2015-04-201-0/+2
|\ | | | | Alt/instantiation checks (2)
| * Added phase to check `New` nodes for instantiability.Martin Odersky2015-04-131-0/+1
| | | | | | | | | | | | - Abstract classes cannot be instantiated (exceptions: parent news and Java annotations) - Instantiateed class must conform to its self type.
| * Self type inheritance checkMartin Odersky2015-04-131-0/+1
| | | | | | | | Check that the self type of a class conforms to the self types of its parent classes.
* | Partest for Dotty with pos tests and neg tests with error countvsalvis2015-04-172-53/+66
|/
* Remove trailing spaces in Dotty source.Dmitry Petrashko2015-04-091-2/+2
|
* Replace tabs with 4 spaces in Dotty source.Dmitry Petrashko2015-04-091-1/+1
|
* Disabled -Yno-double-bindings for a neg test.Martin Odersky2015-04-091-1/+1
| | | | | | The test introduced a double definition, which led to a double binding. With -Yno-double-bindings this cauases an assertion violation instead of a reported error.
* Make -Yno-double-bindings the default for all tests.Martin Odersky2015-04-091-3/+3
|