logtalk3 icon indicating copy to clipboard operation
logtalk3 copied to clipboard

B-Prolog 8.1 sub_atom/5 bug

Open pmoura opened this issue 11 years ago • 0 comments

The B-Prolog 8.1 implementation of the standard sub_atom/5 predicate can return an integer instead a (sub-)atom. For example:

| ?- sub_atom('foo#0', 4, _, 0, Atom).     
Atom = 0
yes
| ?- sub_atom('foo#0', 4, _, 0, Atom), atom(Atom).
no

This bug is exposed by Logtalk in some of the unit tests for the built-in logtalk object and in errors when converting internal entity prefixes back to entity names.

pmoura avatar Apr 21 '14 09:04 pmoura