Currently, when using a type as a value, the compiler hits an assert. It should instead emit a diagnostic.
Example
class A {
a: i32 = 1;
}
function id<T>(p: T): T {
return p;
}
export function add(): void {
id<A>({a: i32}); // Note the use of i32
}
Expected
Something similar to:
'i32' only refers to a type, but is being used as a value here.
Actual
Assert