Hello, i try to port some go code to D
i get this error messages from my current code.
source/protocols.d(40,34): Error: uninitialized variable 'value'
cannot be returned from CTFE
source/protocols.d(41,34): Error: uninitialized variable 'value'
cannot be returned from CTFE
source/protocols.d(42,34): Error: uninitialized variable 'value'
cannot be returned from CTFE
source/protocols.d(43,36): Error: uninitialized variable 'value'
cannot be returned from CTFE
source/protocols.d(44,35): Error: uninitialized variable 'value'
cannot be returned from CTFE
source/protocols.d(46,36): Error: uninitialized variable 'value'
cannot be returned from CTFE
source/protocols.d(47,38): Error: uninitialized variable 'value'
cannot be returned from CTFE
source/protocols.d(48,33): Error: uninitialized variable 'value'
cannot be returned from CTFE
source/protocols.d(49,33): Error: uninitialized variable 'value'
cannot be returned from CTFE
source/protocols.d(50,35): Error: uninitialized variable 'value'
cannot be returned from CTFE
source/protocols.d(51,37): Error: uninitialized variable 'value'
cannot be returned from CTFE
source/protocols.d(52,55): Error: uninitialized variable 'value'
cannot be returned from CTFE
this ist the code in question
https://gist.github.com/erde74/5bd7d91070791142c929258fee8d887b
the go source
https://github.com/jbenet/go-multiaddr/blob/master/protocols.go
i am a bit lost currently and don't know how to fix the error
messages. A hint how to fix this would be create.
i am thinking about to wrap all the funtions into a class, does
this make sense?