JuliaMath / JuliaMath/MeasureBase.jl

Printing StackOverflowError

Open
#29 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
32
Forks
4
PR merge metrics
No merged PRs in 30d

Description

If one implements custom `AbstractMeasure` and not override any printing methods this method leads to an error:
https://github.com/cscherrer/MeasureBase.jl/blob/master/src/utils.jl#L3

That is most likely because `pprint` falls back to `show` at some point.

Replicate in REPL:
```julia
julia> using MeasureBase: AbstractMeasure
julia> struct A <: AbstractMeasure end
julia> A()
Error showing value of type A:
ERROR: StackOverflowError:
```

Few ways to address it, not sure which one you prefer.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.