Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Chriscbr committed Sep 27, 2024
1 parent 2387785 commit 4a633da
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/@winglang/wingc/src/type_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,8 @@ where
pub type TypeRef = UnsafeRef<Type>;

// Comparing typerefs may be imprecise because the compiler doesn't do any de-duplication
// of types -- so it's possible two function types with different spans will be considered
// different typerefs, even though they represent the same type.
// But this is ok if you are only using them for classes, enums, structs, and interfaces,
// as these are all unique / nominally typed.
// of types. For example, it's possible two function types or Array<str> types created from different spans
// will be considered different typerefs, even though they represent the same type.

impl Hash for TypeRef {
fn hash<H: Hasher>(&self, state: &mut H) {
Expand Down

0 comments on commit 4a633da

Please sign in to comment.