diff options
author | Martin Odersky <odersky@gmail.com> | 2014-10-26 15:46:38 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-10-26 16:24:02 +0100 |
commit | 70946d7e2f8f3ca69b2ebba63f7afe34a53946a6 (patch) | |
tree | 39df50c33520939fc0484cdf3d0df42359da6244 /test/dotc/tests.scala | |
parent | f459bf085d743c801fe724089438c0082014121f (diff) | |
download | dotty-70946d7e2f8f3ca69b2ebba63f7afe34a53946a6.tar.gz dotty-70946d7e2f8f3ca69b2ebba63f7afe34a53946a6.tar.bz2 dotty-70946d7e2f8f3ca69b2ebba63f7afe34a53946a6.zip |
Better tests and bugfix for named args
The original problem was that in an expression
f(x = bar(y = z))
only the outer named arg was eliminated by FirstTransform.
The first error was that the postcondition in FirstTransform did not get to the named arg, because
it got called from the overrdden typed method in TreeChecker, yet function arguments were evaluated
with typedUnadapted.
action: change Retyper and TreeChecker to override typedUndapped instead of typed.
This flushed out the second error: transformOther in FirstTransform needs to recursively transform the argument
of a NamedArg, because the framework itself does not handle NamedArg nodes.
Now, all tests pass except that TreeChecker itself fails -Ycheck:gettersSetters due to a problem
with handling by-name function types. This should be fixed in a separate PR.
Diffstat (limited to 'test/dotc/tests.scala')
-rw-r--r-- | test/dotc/tests.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala index 901167a56..4c6d004bf 100644 --- a/test/dotc/tests.scala +++ b/test/dotc/tests.scala @@ -106,7 +106,7 @@ class tests extends CompilerTest { @Test def dotc_core = compileDir(dotcDir + "tools/dotc/core", twice)(allowDeepSubtypes) @Test def dotc_core_pickling = compileDir(dotcDir + "tools/dotc/core/pickling", twice)(allowDeepSubtypes) - //@Test def dotc_transform = compileDir(dotcDir + "tools/dotc/transform", twice) + @Test def dotc_transform = compileDir(dotcDir + "tools/dotc/transform", twice)(defaultOptions ++ List("-Ycheck:pat,era,lam")) //disabled, awaiting fix for call-by-name function types. @Test def dotc_parsing = compileDir(dotcDir + "tools/dotc/parsing", twice) |