Araq/Nimrod — Issue #78: Unclear "type mismatch" compile error.
Author: dom96
Created: 2011-12-21 18:51:21+00:00
State: open

When compiling the following file: ``one.nim``

```nimrod
import two, three

proc test(testing: two.typ) =
nil

var s: three.typ
test(s)
```

With the following two files named ``two.nim`` and ``three.nim`` respectively:

```nimrod
type
typ* = distinct string
```

```nimrod
type
typ* = distinct int
```

Nimrod produces an error message as follows:

```
one.nim(7, 5) Error: type mismatch: got (typ)
but expected one of:
test(testing: typ)
```

Perhaps in this particular example this is very easy to figure out. But when working with gtk and all its different modules this can become very confusing.

Make this error message much clearer please.