﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
1471	[types] Enforce parameter types on specialization	megane		"Currently no enforcing happens if specialization takes place.

Here's a case from scrutiny-tests.
Note that scheme#+ has a specialization for parameters (* *).
When using `-A` flag no specialization takes place, so the enforcing happens.

In this example you'd like to have the type for `x` to be enforced to `number` after the `if`.

{{{
;; noreturn conditional branch enforces ""number"" on x
(define (foo2 x)
  (if (string? x) (error ""foo"") (+ x 3))
  (string-append x ""abc""))

;; $ csc -O3 enforce-fail.scm
;;
;; Warning: in toplevel procedure `foo2':
;;   (enforce-fail.scm:7) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `(not string)'

;; $ csc -A enforce-fail.scm
;;
;; Warning: in toplevel procedure `foo2':
;;   (enforce-fail.scm:7) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `number'
}}}"	enhancement	new	not urgent at all	someday	scrutinizer	5.0.0				medium
