diff options
author | Paul Phillips <paulp@improving.org> | 2012-02-04 11:56:16 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-02-04 12:59:08 -0800 |
commit | 3a6b1124f18acf95923e228f6f41bdf3c23e0173 (patch) | |
tree | 4f934f594942d6366e3ca75663721e15ccb53c1a | |
parent | 6b8aed72e4f7a7135a434533399a772bf7078101 (diff) | |
download | scala-3a6b1124f18acf95923e228f6f41bdf3c23e0173.tar.gz scala-3a6b1124f18acf95923e228f6f41bdf3c23e0173.tar.bz2 scala-3a6b1124f18acf95923e228f6f41bdf3c23e0173.zip |
Guard List_apply from premature forcitude.
Solved the annotation cycle puzzle. Was being burned again by
the hack which preferentially treats List() as Nil to avoid List's
extractor.
This commit includes a new starr which fully bootstraps.
Also at this point traits can extend Any and will not be given
an AnyRef parent (until erasure.) This is the case for AnyVal
and NotNull.
-rw-r--r-- | lib/scala-compiler.jar.desired.sha1 | 2 | ||||
-rw-r--r-- | lib/scala-library-src.jar.desired.sha1 | 2 | ||||
-rw-r--r-- | lib/scala-library.jar.desired.sha1 | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 5 |
4 files changed, 7 insertions, 4 deletions
diff --git a/lib/scala-compiler.jar.desired.sha1 b/lib/scala-compiler.jar.desired.sha1 index cc8631c6d4..22e714ad41 100644 --- a/lib/scala-compiler.jar.desired.sha1 +++ b/lib/scala-compiler.jar.desired.sha1 @@ -1 +1 @@ -65ea33d0d4cc4aab5472f123524640fd1fab0a85 ?scala-compiler.jar +83df84e719c0f966c67855a1b453aaff2c01e4f7 ?scala-compiler.jar diff --git a/lib/scala-library-src.jar.desired.sha1 b/lib/scala-library-src.jar.desired.sha1 index 81d1f677a5..cb39ee8604 100644 --- a/lib/scala-library-src.jar.desired.sha1 +++ b/lib/scala-library-src.jar.desired.sha1 @@ -1 +1 @@ -d92a0fd350a661b4ba55f1aeea43a2ba5dec4629 ?scala-library-src.jar +04d9d47973b10ec7353e2a8199b1bd5c62fb540a ?scala-library-src.jar diff --git a/lib/scala-library.jar.desired.sha1 b/lib/scala-library.jar.desired.sha1 index 975649f4b4..009d5f82ea 100644 --- a/lib/scala-library.jar.desired.sha1 +++ b/lib/scala-library.jar.desired.sha1 @@ -1 +1 @@ -ff3132990962fd0b779a5e8ceef163acdf0c3e29 ?scala-library.jar +c8e01ec6416bd883e996cf8c6916bf0173c31486 ?scala-library.jar diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index fdeab7b565..1d84f7fdaf 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -2525,8 +2525,11 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { /** This is translating uses of List() into Nil. This is less * than ideal from a consistency standpoint, but it shouldn't be * altered without due caution. + * ... this also causes bootstrapping cycles if List_apply is + * forced during kind-arity checking, so it is guarded by additional + * tests to ensure we're sufficiently far along. */ - if (fun.symbol == List_apply && args.isEmpty && !forInteractive) + if (args.isEmpty && !forInteractive && fun.symbol.isInitialized && ListModule.hasCompleteInfo && (fun.symbol == List_apply)) atPos(tree.pos)(gen.mkNil setType restpe) else constfold(treeCopy.Apply(tree, fun, args1) setType ifPatternSkipFormals(restpe)) |