aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/RefChecks.scala
Commit message (Collapse)AuthorAgeFilesLines
* Refactor explanation interpolatorFelix Mulder2016-10-101-1/+1
|
* Fix #1510: Fix error message when abstract member not implemented.Nicolas Stucki2016-09-141-1/+1
|
* New string infterpolatorsMartin Odersky2016-08-161-3/+3
| | | | | | Roll `sm` and `i` into one interpolator (also called `i`) Evolve `d` to `em` interpolator (for error messages) New interpolator `ex` with more explanations, replaces disambiguation.
* Handle MergeErrors in RefChecksMartin Odersky2016-05-191-1/+5
| | | | | Used to throw an uncaught merge error in checkAllOverrides when compiling i1240c.scala.
* Domain checking for named type parametersMartin Odersky2016-03-301-0/+5
| | | | | | Now verifies that the named type parameters of an overriding type or class are the same as the named type parameters of an overridden type.
* Add support for private[this] parameter in value classesVladimirNik2016-02-191-2/+0
|
* Add checks for value classes:VladimirNik2016-02-161-1/+13
| | | | | 1. Add errors in case of incorrect parameter; 2. Improvement to error message if value class is defined as a local class;
* Enforce rule that laziness is preserved when overriding.Martin Odersky2016-02-091-5/+7
|
* Don't flag override errors for synthetic companion objects.Martin Odersky2015-12-191-2/+7
|
* More tweaks to override checks.Martin Odersky2015-12-151-2/+2
|
* Change <:< to overridesMartin Odersky2015-12-151-1/+1
| | | | This is needed to freeze the constraint.
* Check types for overriding conditions.Martin Odersky2015-12-141-5/+15
| | | | Closes #241 -- that took a while!
* Generalize overriding checking from isDefinedMartin Odersky2015-12-141-1/+1
| | | | | | | | Generalize overriding checking from isDefined to all methods added by desugar to a case class. None of these methods has an override so we need to add one in case they do override another method (previously we would flag this as an error).
* Better diagnostics for clashing classesMartin Odersky2015-12-141-4/+15
| | | | | | We do not allow same-named class members in supertraits of a mixin composition anymore. This commit gives a better error message and avoids a crash in RefChecks.
* Make isDefined override if necessaryMartin Odersky2015-11-021-1/+3
| | | | | isDefined is now always auto-generated for case classes. It need to get an automatic override if there is a version that's inherited.
* Refinements to signature matchingMartin Odersky2015-09-301-1/+1
| | | | | | | 1) Matching after erasure also takes wildcards into account (before it didn't). 2) Combine all signature matching operations into a single matchDegree method.
* Check that a self type T is closed.Martin Odersky2015-07-061-7/+13
| | | | | | | | 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.
* Check value class member restrictionsMartin Odersky2015-07-021-2/+14
| | | | | | | | | | | | | | 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-4/+6
|
* Check final and sealed conditionsMartin Odersky2015-07-021-3/+10
| | | | | So far no error was raised for illegal inheritance from final or sealed classes.
* Better error message for RefChecksMartin Odersky2015-06-071-7/+8
| | | | | | | | | | | Trying to diagnose failure of t2503 and t5577 which were moved to disabled in the time the tests did not work. These failed locally for me, but the checkin tests succeeded (since the checkin tests tested something else). Added better diagnostics to RefChecks which now mention candidate implementations of missing abstract members that have the right name but not the right type.
* rename isSourceMethod to isRealMethod, the previous name was inaccurateGuillaume Martres2015-05-091-3/+3
|
* Refchecks runs before resolveSuper: superAccessors not yet materialised.Dmitry Petrashko2015-05-031-0/+1
|
* New miniphase: ExpandPrivateMartin Odersky2015-05-011-29/+1
| | | | | | | | | | | | | A late miniphase which resets private flag of all members that are not accessed from within same class. Replaces logic in RefChecks. Doing this late has two advantages - we can use name expansion, because references are symbolic, so the names of symbols and references to them do not need to correspond anymore. - we can automatically correct for symbols moved in earlier phases (e.g. lifted out by LambdaLift).
* Make sure mixin accessors are not private.Martin Odersky2015-05-011-3/+1
| | | | | | Logic moved from RefChecks to Mixin; implementation is now by name expansion instead of setting NotJavaPrivate flag.
* Move checkCompanionNameClashes from SuperAccessors to RefChecksMartin Odersky2015-04-221-0/+14
| | | | Done in the interest of slimming down and modularizing SuperAccessors.
* Self type inheritance checkMartin Odersky2015-04-131-0/+12
| | | | Check that the self type of a class conforms to the self types of its parent classes.
* Ensure spaces after `if` in Dotty source.Dmitry Petrashko2015-04-091-2/+2
|
* Add spaces around + in dotty source.Dmitry Petrashko2015-04-091-2/+2
|
* #435 Fix conflict between package object and case class with same nameDmitry Petrashko2015-03-261-1/+2
|
* Eliminate unused method from RefChecks.Martin Odersky2014-12-191-6/+0
|
* Remove fruitless overrides of treeTransformPhaseMartin Odersky2014-12-141-1/+0
| | | | | Now the default phase of treeTransformPhase is phase.next, we can remove all overrides that specify the same phase.
* Removed println's left accidentally in code base.Martin Odersky2014-11-261-2/+0
|
* Fix of intersection not emptyMartin Odersky2014-11-261-2/+6
| | | | The bug caused new version of FirstTransform to compile with errors.
* Check that overriding members refine the types of overridden ones.Martin Odersky2014-11-181-8/+11
| | | | | Somehow this was lost in porting (or was this done somewhere else in scalac?).
* Some fixes to override checking in RefChecks.Martin Odersky2014-11-151-10/+10
| | | | `override` was not recognized at all on types.
* Fine-tuning override errors for syntehtic companion objectsMartin Odersky2014-11-141-9/+16
| | | | | | | These may raise real errors, so we cannot exclude them from overriding pairs a priori. But we can avoid reporting any errors if other override errors were reported previously for the same class.
* Fix OverridingPairsMartin Odersky2014-11-141-1/+1
| | | | | | | | OverridingPairs had several bugs which caused pairs to be lost, which caused missing overrides checks. Fixing OverridingPairs revealed several test failures (and a problem in Synthetics generation which was fixed in the last commit). Tests that became negative are all moved into neg/overrides.scala, and the original versions in pos were fixed.
* Move check for casting a primitive to a non-primitive type from erasure to ↵Dmitry Petrashko2014-10-111-0/+16
| | | | refchecks
* Changes from discussion in #171Dmitry Petrashko2014-09-171-0/+3
|
* Make-not privateMartin Odersky2014-08-191-8/+49
| | | | | Refchecks now makes all members not-private that need it. This is done by setting flag NotJavaPrivate. No name change is involved.
* Rename in Phase: name -> phaseNameMartin Odersky2014-08-181-1/+1
| | | | | Most transformations are subclasses of phase. Having a generic name like `name` in scope everywhere is therefore very risky.
* Fix and enable RefChecksMartin Odersky2014-08-131-10/+25
| | | | RefChecks is now enabled. Some of the tests had to be fixed to be refchecks-correct.
* Sperate matchingDecl and mathingMember.Martin Odersky2014-08-111-10/+10
| | | | RefChecks needs both methods.
* Disentangle phases from treetransformsMartin Odersky2014-08-091-69/+73
| | | | | | | | TreeTransforms are no longer phases. This allows to generate new transforms in prepare... methods without running into the problem that thee new transforms are undefined as phases. It also makes for a cleaner separation of concerns.
* Initial version of RefChecksMartin Odersky2014-08-091-0/+1383
This is still disabled, because the prepare machinery in transform does not work yet. Concretely, prepare ops need to return a new TreeTransform but that tree transform has an undefined phaase id. We need some architectural changes to disentangle transforms from phases.