diff --git a/src/aeso_compiler.erl b/src/aeso_compiler.erl index 846ad0a..d0e1181 100644 --- a/src/aeso_compiler.erl +++ b/src/aeso_compiler.erl @@ -76,7 +76,7 @@ file(File, Options0) -> {ok, Bin} -> from_string(Bin, [{src_file, File} | Options]); {error, Error} -> Msg = lists:flatten([File,": ",file:format_error(Error)]), - Pos = aeso_errors:pos(File, 0, 0), + Pos = aeso_errors:pos(0, 0), {error, [aeso_errors:new(file_error, Pos, Msg)]} end. diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index 4b051ae..450ff36 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -35,8 +35,7 @@ simple_compile_test_() -> [ {"Test file not found error", fun() -> {error, Errors} = aeso_compiler:file("does_not_exist.aes"), - ExpErr = <<"In 'does_not_exist.aes' at line 0, col 0:\n" - "does_not_exist.aes: no such file or directory">>, + ExpErr = <<"does_not_exist.aes: no such file or directory">>, check_errors([ExpErr], Errors) end} ] ++ [ {"Testing error messages of " ++ ContractName,