#2707 compilerDoc::DocPod ctor

SlimerDude Tue 3 Jul 2018

DocPod.load() allows a null Env parameter, because the Env is only used for logging. But if you call...

compilerDoc::DocPod(null, `myPod.pod`.toFile)

it gives:

Failed reading pod doc for myPod.pod
  sys::NullErr: Coerce to non-null
    fan.sys.NullErr.makeCoerce (NullErr.java:38)
    compilerDoc::DocPod.load (DocPod.fan:19)

I believe the ctor arg just needs to be nullable:

diff -r 3ff2a9aa4338 src/compilerDoc/fan/model/DocPod.fan
--- a/src/compilerDoc/fan/model/DocPod.fan	Tue Jun 05 10:39:07 2018 -0400
+++ b/src/compilerDoc/fan/model/DocPod.fan	Tue Jul 03 19:46:18 2018 +0100
@@ -20,7 +20,7 @@

-  @NoDoc new make(DocEnv env, File file)
+  @NoDoc new make(DocEnv? env, File file)

brian Mon 5 Nov 2018

Sorry, just seeing this now Steve. I pushed a fix.

Login or Signup to reply.