aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Phases.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-09-18 17:38:43 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-10-11 08:24:35 +0200
commit8f18250f4fe494e0b6314fc2cb8e501753e79064 (patch)
tree95a88d863007b226796a95a575bb4c0222afce67 /src/dotty/tools/dotc/core/Phases.scala
parent59ae5e6443980569877b8072f23947493463f1ba (diff)
downloaddotty-8f18250f4fe494e0b6314fc2cb8e501753e79064.tar.gz
dotty-8f18250f4fe494e0b6314fc2cb8e501753e79064.tar.bz2
dotty-8f18250f4fe494e0b6314fc2cb8e501753e79064.zip
Allow relaxed typing of applications
Some transformations encounter applications where new arguments ahve to be supplied. The method type already accounts for these argument but the Application node passed into TreeTransform#transformApply is constructed with a cpy.Apply operation which does a type assignment. That type assignment fails with a parameter mismatch unless relaxedTyping is on.
Diffstat (limited to 'src/dotty/tools/dotc/core/Phases.scala')
-rw-r--r--src/dotty/tools/dotc/core/Phases.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Phases.scala b/src/dotty/tools/dotc/core/Phases.scala
index 5eb8cd920..53c193994 100644
--- a/src/dotty/tools/dotc/core/Phases.scala
+++ b/src/dotty/tools/dotc/core/Phases.scala
@@ -200,6 +200,11 @@ object Phases {
*/
def checkPostCondition(tree: tpd.Tree)(implicit ctx: Context): Unit = ()
+ /** If set, allow missing or superfluous arguments in applications
+ * and type applications.
+ */
+ def relaxedTyping: Boolean = false
+
def exists: Boolean = true
private var myPeriod: Period = Periods.InvalidPeriod