abeln / dotty

Scala with explicit nulls
https://github.com/abeln/dotty/wiki/scala-with-explicit-nulls
Other
23 stars 2 forks source link

Detect NotNull Annotations for Java Methods #33

Closed noti0na1 closed 5 years ago

noti0na1 commented 5 years ago

@abeln I just find, in ClassFileParser, if the value of a final field is not null, the field will have a ConstantType; but in JavaParser, a field will never get a ConstantType.

noti0na1 commented 5 years ago

https://gitter.im/lampepfl/dotty?at=5db0bae3e886fb5aa2e2b61d

@noti0na1 it looks like this was added in 2016 to the JavaParser in scalac, so it's probably just a matter of porting that: scala/scala@81d2c61 though that only supports literals, more complex expressions would require a bit more work on the parser: scala/bug#10410

abeln commented 5 years ago

It's very nice to see this working!

noti0na1 commented 5 years ago

@abeln Updated