We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc723d4 commit d438bc2Copy full SHA for d438bc2
1 file changed
src/backend/llvm/native-type-resolver.ts
@@ -5,15 +5,7 @@ import {Context} from "./context";
5
import {NativeType} from "./native-type";
6
7
export class NativeTypeResolver {
8
- static getType(type: ts.Type, ctx: Context): NativeType {
9
- if (type.isClass()) {
10
- return new NativeType(
11
- llvm.Type.getInt8PtrTy(
12
- ctx.llvmContext
13
- )
14
- );
15
- }
16
-
+ static getType(type: ts.Type, ctx: Context): NativeType|null {
17
if (type.isNumberLiteral() || (<any>type).intrinsicName === 'number') {
18
return new NativeType(
19
llvm.Type.getDoubleTy(
@@ -135,8 +127,6 @@ export class NativeTypeResolver {
135
127
}
136
128
137
129
138
- throw new Error(
139
- `Unsupported type, it's to dynamic`
140
130
+ return null;
141
131
142
132
0 commit comments