better type inference for numerical types; prerequisitive for version 1

This commit is contained in:
Andreas Rumpf 2018-02-02 09:29:05 +01:00
commit bd1dfa4b38
4 changed files with 73 additions and 3 deletions

View file

@ -0,0 +1,12 @@
discard """
output: '''int64
int64'''
"""
import typetraits
proc `@`[T: SomeInteger](x, y: T): T = x
echo(type(5'i64 @ 6'i32))
echo(type(5'i32 @ 6'i64))