diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/bug4158.check | 19 | ||||
-rw-r--r-- | test/files/neg/bug4158.scala | 4 |
2 files changed, 23 insertions, 0 deletions
diff --git a/test/files/neg/bug4158.check b/test/files/neg/bug4158.check new file mode 100644 index 0000000000..0d9873dc32 --- /dev/null +++ b/test/files/neg/bug4158.check @@ -0,0 +1,19 @@ +bug4158.scala:3: error: type mismatch; + found : Null(null) + required: Int +Note that implicit conversions are not applicable because they are ambiguous: + both method Integer2intNullConflict in class LowPriorityImplicits of type (x: Null)Int + and method Integer2int in object Predef of type (x: java.lang.Integer)Int + are possible conversion functions from Null(null) to Int + var y = null: Int + ^ +bug4158.scala:2: error: type mismatch; + found : Null(null) + required: Int +Note that implicit conversions are not applicable because they are ambiguous: + both method Integer2intNullConflict in class LowPriorityImplicits of type (x: Null)Int + and method Integer2int in object Predef of type (x: java.lang.Integer)Int + are possible conversion functions from Null(null) to Int + var x: Int = null + ^ +two errors found diff --git a/test/files/neg/bug4158.scala b/test/files/neg/bug4158.scala new file mode 100644 index 0000000000..07aa69a95c --- /dev/null +++ b/test/files/neg/bug4158.scala @@ -0,0 +1,4 @@ +class A { + var x: Int = null + var y = null: Int +}
\ No newline at end of file |