https://issues.dlang.org/show_bug.cgi?id=12461
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from [email protected] --- (In reply to Andrej Mitrovic from comment #1) > But I'm not sure if this is the appropriate fix. > Do you have a better idea? In Haskell this doesn't compile (newtype is a built-in that is similar to Typedef): newtype T = T Int main = do let a = 10 :: T let b = 20 :: T let c = a + b :: T print c You have to ask the compiler to activate the arithmetic operations between two newtypes: {-# LANGUAGE GeneralizedNewtypeDeriving #-} newtype T = T Int deriving (Num, Show) main = do let a = 10 :: T let b = 20 :: T let c = a + b :: T print c And now it prints: T 30 --
