Skip to content

Commit

Permalink
tyck: Add note about constraints on type instantiations
Browse files Browse the repository at this point in the history
  • Loading branch information
CohenArthur committed Sep 30, 2024
1 parent ec95b99 commit 1088161
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions typecheck/src/generics/constraint_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
//! type instantiations will not have any constraints, as they do not perform any
//! function calls in their declarations. As a consequence, only function calls
//! will be considered for all examples in this module.
// FIXME: Actually, type instantiations can have constraints, because type definitions
// can contain default fields which can be instantiated from a generic type's field, w/
// structural typing
// e.g.
//
// ```rust
// type HasDefault[T](foo: T.make_foo())
// ```

use std::collections::HashMap;

Expand Down

0 comments on commit 1088161

Please sign in to comment.