diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t4417.check | 7 | ||||
-rw-r--r-- | test/files/neg/t4417.scala | 17 |
2 files changed, 24 insertions, 0 deletions
diff --git a/test/files/neg/t4417.check b/test/files/neg/t4417.check new file mode 100644 index 0000000000..0a5ea2265b --- /dev/null +++ b/test/files/neg/t4417.check @@ -0,0 +1,7 @@ +t4417.scala:11: error: constructor Pixel$mcD$sp in class Pixel$mcD$sp cannot be accessed in object Pixel + Access to protected constructor Pixel$mcD$sp not permitted because + enclosing object Pixel is not a subclass of + class Pixel$mcD$sp where target is defined + def apply(v: Double): Pixel1d = new Pixel1d(v) + ^ +one error found
\ No newline at end of file diff --git a/test/files/neg/t4417.scala b/test/files/neg/t4417.scala new file mode 100644 index 0000000000..3f6ddc8153 --- /dev/null +++ b/test/files/neg/t4417.scala @@ -0,0 +1,17 @@ + + + + +class Pixel[@specialized T] protected (var v: T) + + +object Pixel { + type Pixel1d = Pixel[Double] + + def apply(v: Double): Pixel1d = new Pixel1d(v) +} + + + + + |