Skip to content

Commit

Permalink
Revert "deprecation warning for old parametric method syntax. fixes J…
Browse files Browse the repository at this point in the history
…uliaLang#11310 (JuliaLang#22834)"

This partially reverts commit c6e51d0.
  • Loading branch information
yuyichao committed Sep 19, 2017
1 parent f9824a4 commit c3cbdb7
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -788,9 +788,12 @@
(sig (car temp))
(params (cdr temp)))
(if (pair? params)
(syntax-deprecation #f
(string "inner constructor " name "(...)" (linenode-string (function-body-lineno body)))
(deparse `(where (call (curly ,name ,@params) ...) ,@params))))
(let* ((lnos (filter (lambda (e) (and (pair? e) (eq? (car e) 'line)))
body))
(lno (if (null? lnos) '() (car lnos))))
(syntax-deprecation #f
(string "inner constructor " name "(...)" (linenode-string lno))
(deparse `(where (call (curly ,name ,@params) ...) ,@params)))))
`(,keyword ,sig ,(ctor-body body params)))))))

(define (function-body-lineno body)
Expand Down Expand Up @@ -1072,16 +1075,6 @@
(eq? (caar argl) 'parameters))))))
(name (if (or (decl? name) (and (pair? name) (eq? (car name) 'curly)))
#f name)))
(if has-sp
(syntax-deprecation #f
(string "parametric method syntax " (deparse (cadr e))
(linenode-string (function-body-lineno body)))
(deparse `(where (call ,(or name
(cadr (cadr (cadr e))))
,@(if (has-parameters? argl)
(cons (car argl) (cddr argl))
(cdr argl)))
,@raw-typevars))))
(expand-forms
(method-def-expr name sparams argl body isstaged rett))))
(else
Expand Down

0 comments on commit c3cbdb7

Please sign in to comment.