diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-08-05 01:01:32 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-08-05 01:01:32 -0700 |
commit | fb9dad23be85763ff70e256bc76617e14f13c950 (patch) | |
tree | 154a4eb15aec61c644d78256f0cb07bedc5028af /test/files/neg | |
parent | e6e09b16aa646289f0440e136ded1e84f5290a80 (diff) | |
parent | 816c291006296835f51806462b35136740f3e013 (diff) | |
download | scala-fb9dad23be85763ff70e256bc76617e14f13c950.tar.gz scala-fb9dad23be85763ff70e256bc76617e14f13c950.tar.bz2 scala-fb9dad23be85763ff70e256bc76617e14f13c950.zip |
Merge pull request #1051 from lrytz/t6074
SI-6074 disallow implicit enrichment with constructor
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t6074.check | 4 | ||||
-rw-r--r-- | test/files/neg/t6074.scala | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/files/neg/t6074.check b/test/files/neg/t6074.check new file mode 100644 index 0000000000..38670e5b3d --- /dev/null +++ b/test/files/neg/t6074.check @@ -0,0 +1,4 @@ +t6074.scala:5: error: constructor A in class A cannot be accessed in object T + def t = new A() + ^ +one error found diff --git a/test/files/neg/t6074.scala b/test/files/neg/t6074.scala new file mode 100644 index 0000000000..8c14f00f19 --- /dev/null +++ b/test/files/neg/t6074.scala @@ -0,0 +1,6 @@ +class A private () { } +class B { } +object T { + implicit def a2b(a: A): B = null + def t = new A() +} |