Bug #59
Typing hole when using dot operator
Status: | New | Start date: | 01/29/2009 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - | |||
Platform: | All | Triage Stage: | ||
Resolution: |
Description
There is a serious typing hole that allows for exemple to apply a binary operation to only one argument.
define Int add(Int a, Int b) = a + b. define Int -> Int id(Int -> Int f) = f. define $U $T x .$T -> $U f = f(x). define Int bad_operation (Int n) = n . id (add).
History
#1
Updated by SpiceGuid - about 16 years ago
Certainly n . id (add) is the same as add(n), isn't it ?
So, why does it compile ?