Skip to content

Commit

Permalink
Compiler: set require location so --prelude can work with relative …
Browse files Browse the repository at this point in the history
…files
  • Loading branch information
asterite committed Dec 30, 2016
1 parent 60d9c4f commit 49aa490
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/crystal/compiler.cr
Expand Up @@ -173,7 +173,8 @@ module Crystal
nodes = Expressions.from(nodes)

# Prepend the prelude to the parsed program
nodes = Expressions.new([Require.new(prelude), nodes] of ASTNode)
location = Location.new(program.filename, 1, 1)
nodes = Expressions.new([Require.new(prelude).at(location), nodes] of ASTNode)

# And normalize
program.normalize(nodes)
Expand Down

0 comments on commit 49aa490

Please sign in to comment.