Skip to content

Commit

Permalink
mismatched type error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrredo committed Apr 28, 2023
1 parent 6f8bc6e commit 4751853
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions hello.rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
var bool = "true";
if bool == "true" {
println(bool)
}
var bool = true;
println(bool=="s")
2 changes: 1 addition & 1 deletion lexer/lexerArithmeticOperations.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ loop:
if curType == -1 {
curType = ConvertToTokenType(reflect.TypeOf(va.Value).String())
}
if (curType != ConvertToTokenType(reflect.TypeOf(fmt.Sprint(va.Value)).String()) && curType != c.Type) {
if (curType != ConvertToTokenType(reflect.TypeOf(va.Value).String()) && curType != c.Type) {
fmt.Println(curType, ConvertToTokenType(reflect.TypeOf(fmt.Sprint(va.Value)).String()))
return "", c, err.NewTypeError(l.Scanner.Pos())

Expand Down

0 comments on commit 4751853

Please sign in to comment.