mighty-gerbils / gerbil

Gerbil Scheme
https://cons.io
GNU Lesser General Public License v2.1
1.13k stars 111 forks source link

Import errors #1143

Open fare opened 4 months ago

fare commented 4 months ago

On either v0.18.1 or master, from a file with these contents:

(import
  (only-in :std/actor-v18/message message::t)
  (only-in :std/net/websocket message::t))

(displayln (struct->list message::t))

In the example above, the actor-v18 message gets imported. If the statements are reordered, the first one is imported. If the import is broken in two statements, the second one is imported.

Expected: a sensible error message about a conflict.

Also, the error message from an empty import statement is not very useful ("Unexpected import")—though the error message is only from gxi and not from gxc(!) that allows the empty import.