diff options
author | Paul Phillips <paulp@improving.org> | 2009-02-16 16:28:51 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-02-16 16:28:51 +0000 |
commit | c193d5918c84d7fc85371be67e37ef0addc65077 (patch) | |
tree | c60e3ec7477a1e87b32f62250df7a8936c756292 | |
parent | 10b8c781c2d20d2a00f70a9426951ea374e5d07e (diff) | |
download | scala-c193d5918c84d7fc85371be67e37ef0addc65077.tar.gz scala-c193d5918c84d7fc85371be67e37ef0addc65077.tar.bz2 scala-c193d5918c84d7fc85371be67e37ef0addc65077.zip |
Fix and test case for #1623.
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Types.scala | 2 | ||||
-rw-r--r-- | test/files/neg/bug1623.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug1623.scala | 12 |
3 files changed, 17 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index afaba691df..aa842ce9bb 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -960,7 +960,7 @@ trait Types { override val isTrivial: Boolean = pre.isTrivial // override def isNullable = underlying.isNullable override def isNotNull = underlying.isNotNull - private var underlyingCache: Type = _ + private var underlyingCache: Type = NoType private var underlyingPeriod = NoPeriod override def underlying: Type = { // this kind of caching here won't work in the IDE diff --git a/test/files/neg/bug1623.check b/test/files/neg/bug1623.check new file mode 100644 index 0000000000..cfc2b533d4 --- /dev/null +++ b/test/files/neg/bug1623.check @@ -0,0 +1,4 @@ +bug1623.scala:11: error: class BImpl cannot be instantiated because it does not conform to its self-type test.BImpl with test.A + val b = new BImpl + ^ +one error found diff --git a/test/files/neg/bug1623.scala b/test/files/neg/bug1623.scala new file mode 100644 index 0000000000..d98670a681 --- /dev/null +++ b/test/files/neg/bug1623.scala @@ -0,0 +1,12 @@ +package test + +trait A +trait B + +class BImpl extends B { + this: A => +} + +object Test2 extends Application { + val b = new BImpl +}
\ No newline at end of file |