type shape_t = shape(
	'a' => ?string,
	'always' => string,
	?'nullable' => string
);
function foo(shape_t $s) {
	$type = $s['always'];
	$type = $s['a'];
	$type = Shapes::idx($s, 'b');
	$type = Shapes::idx($s, 'nullable');

	$type = $s['always'];
	$type = Shapes::idx($s, 'nullable', "default");
}

function bar(?shape_t $s) {
	$type = Shapes::idx($s, 'always');
}