hacspec icon indicating copy to clipboard operation
hacspec copied to clipboard

Improve handling of colliding symbols

Open franziskuskiefer opened this issue 3 years ago • 0 comments

We recently ran into the issue where we had

sha256.rs

array!(Digest, 16);

lib.rs

use sha256::*;

type Digest ByteSeq;

fn foo() {
    let d = Digest::new(5);
}

In this case the Digest name clashes. This is fine for rustc but the hacspec typechecker fails when calling new because it thinks it's the array, where new doesn't require any arguments. This creates very hard to track down typechecker errors.

hir_to_rustspec.rs should check names when importing them.

franziskuskiefer avatar Sep 01 '21 11:09 franziskuskiefer