Releases: ryanstull/ScalaNullSafe
Releases · ryanstull/ScalaNullSafe
v1.3.0
v1.2.6
v1.2.5
- Upgraded sbt to
1.3.0
- Casting now won't cause the macro to crash
- Skips unnecessary null-checks on non-nullable intermediate results
- Macro now works with multi-arg methods
- Function calls are now flattened. e.g. In
X(Y(a))
the result ofY(a)
won't be null-checked, becausenull
could be a valid input into a method or function. ??
macro is now more efficient and only checks the minimum number of expressions needed to find a non-null value. Before it would check all provided expressions.
v1.2.4
v1.2.3
v1.2.1
v1.2.0
Added ??
macro for null coalescing.
Use:
case class Person(name: String)
val person = Person(null)
assert(??(person.name)("Bob") == "Bob")
val person2: Person = null
val person3 = Person("Sally")
assert(??(person.name,person2.name,person3.name)("No name") == "Sally")