Use `var.@foo` to implement Struct#== with macros and to implement Set#==...
Use `var.@foo` to implement Struct#== with macros and to implement Set#== without needing a helper def. No more magic struct methods hardcoded in the compiler :-)
Showing
- spec/compiler/codegen/struct_spec.cr 0 additions, 90 deletionsspec/compiler/codegen/struct_spec.cr
- spec/compiler/type_inference/struct_spec.cr 0 additions, 9 deletionsspec/compiler/type_inference/struct_spec.cr
- src/compiler/crystal/codegen.cr 6 additions, 57 deletionssrc/compiler/crystal/codegen.cr
- src/compiler/crystal/primitives.cr 0 additions, 5 deletionssrc/compiler/crystal/primitives.cr
- src/compiler/crystal/type_inference.cr 0 additions, 2 deletionssrc/compiler/crystal/type_inference.cr
- src/set.cr 1 addition, 7 deletionssrc/set.cr
- src/struct.cr 7 additions, 0 deletionssrc/struct.cr
Please register or sign in to comment