-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Closed as not planned
Labels
@HarrisL2
Description
Compiler version
3.7.3-RC2
Minimized code
package issue def foo[A](s: A = null) = ???
scalac local/implicit.scala -d local/out -classpath "local/out"
import issue.* val x = foo[String]()
scalac local/explicit.scala -Yexplicit-nulls -d local/out -classpath "local/out"
Output
-- [E007] Type Mismatch Error: local/explicit.scala:3:8 ------------------------ 3 |val x = foo[String]() | ^^^^^^^^^^^ |Found: Null |Required: String |Note that implicit conversions were not tried because the result of an implicit conversion |must be more specific than String | | longer explanation available when compiling with `-explain` 1 error found
Expectation
The default argument should not throw an error